mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
Original commit message from CVS:
* configure.ac: * gst/modplug/Makefile.am: * gst/modplug/gstmodplug.cc: * gst/modplug/gstmodplug.h: * gst/modplug/libmodplug/sndfile.cpp: * gst/modplug/libmodplug/sndfile.h: modplug plugin ported to 0.10 (#332598, patch by: Jonathan Matthew <jonathan at kaolin wh9 net>).
This commit is contained in:
parent
e276fe38ba
commit
55e2df5153
7 changed files with 564 additions and 540 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-03-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* configure.ac:
|
||||
* gst/modplug/Makefile.am:
|
||||
* gst/modplug/gstmodplug.cc:
|
||||
* gst/modplug/gstmodplug.h:
|
||||
* gst/modplug/libmodplug/sndfile.cpp:
|
||||
* gst/modplug/libmodplug/sndfile.h:
|
||||
modplug plugin ported to 0.10 (#332598, patch by:
|
||||
Jonathan Matthew <jonathan at kaolin wh9 net>).
|
||||
|
||||
2006-03-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/libmms/gstmms.c: (gst_mms_urihandler_init),
|
||||
|
|
|
@ -290,7 +290,9 @@ GST_PLUGINS_ALL="\
|
|||
|
||||
dnl see if we can build C++ plug-ins
|
||||
if test "x$HAVE_CXX" = "xyes"; then
|
||||
GST_PLUGINS_ALL="$GST_PLUGINS_ALL"
|
||||
GST_PLUGINS_ALL="$GST_PLUGINS_ALL \
|
||||
modplug \
|
||||
"
|
||||
else
|
||||
AC_MSG_WARN([Not compiling plug-ins requiring C++ compiler])
|
||||
fi
|
||||
|
@ -723,6 +725,8 @@ gst-plugins-bad.spec
|
|||
gst/Makefile
|
||||
gst/cdxaparse/Makefile
|
||||
gst/freeze/Makefile
|
||||
gst/modplug/Makefile
|
||||
gst/modplug/libmodplug/Makefile
|
||||
gst/speed/Makefile
|
||||
gst/qtdemux/Makefile
|
||||
gst/tta/Makefile
|
||||
|
|
|
@ -5,6 +5,6 @@ plugin_LTLIBRARIES = libgstmodplug.la
|
|||
libgstmodplug_la_SOURCES = gstmodplug.cc
|
||||
libgstmodplug_la_CXXFLAGS = $(GST_CFLAGS)
|
||||
libgstmodplug_la_LIBADD = $(top_builddir)/gst/modplug/libmodplug/libmodplug.la
|
||||
libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||
libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -lstdc++
|
||||
|
||||
noinst_HEADERS = gstmodplug.h
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -21,12 +21,9 @@
|
|||
#ifndef __GST_MODPLUG_H__
|
||||
#define __GST_MODPLUG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/bytestream/bytestream.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MODPLUG \
|
||||
(gst_modplug_get_type())
|
||||
|
@ -34,46 +31,48 @@ extern "C" {
|
|||
#define GST_MODPLUG(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MODPLUG,GstModPlug))
|
||||
#define GST_MODPLUG_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ULAW,GstModPlug))
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MODPLUG,GstModPlug))
|
||||
#define GST_IS_MODPLUG(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MODPLUG))
|
||||
#define GST_IS_MODPLUG_CLASS(obj) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MODPLUG))
|
||||
|
||||
struct _GstModPlug {
|
||||
GstElement element;
|
||||
GstPad *sinkpad, *srcpad;
|
||||
guint8 *buffer_in;
|
||||
GstByteStream *bs;
|
||||
GstElement element;
|
||||
|
||||
GstPad *sinkpad;
|
||||
GstPad *srcpad;
|
||||
|
||||
/* properties */
|
||||
const gchar *songname;
|
||||
gboolean reverb;
|
||||
gint reverb_depth;
|
||||
gint reverb_delay;
|
||||
gboolean megabass;
|
||||
gint megabass_amount;
|
||||
gint megabass_range;
|
||||
gboolean surround;
|
||||
gint surround_depth;
|
||||
gint surround_delay;
|
||||
gboolean noise_reduction;
|
||||
gboolean _16bit;
|
||||
gboolean oversamp;
|
||||
gint channel;
|
||||
gint frequency;
|
||||
gboolean reverb;
|
||||
gint reverb_depth;
|
||||
gint reverb_delay;
|
||||
gboolean megabass;
|
||||
gint megabass_amount;
|
||||
gint megabass_range;
|
||||
gboolean surround;
|
||||
gint surround_depth;
|
||||
gint surround_delay;
|
||||
gboolean noise_reduction;
|
||||
gboolean _16bit;
|
||||
gboolean oversamp;
|
||||
gint channel;
|
||||
gint frequency;
|
||||
|
||||
guchar *audiobuffer;
|
||||
gint32 length;
|
||||
guint state;
|
||||
guint bitsPerSample;
|
||||
gboolean need_discont;
|
||||
gboolean eos;
|
||||
gint64 seek_at;
|
||||
guint64 song_size;
|
||||
guint64 timestamp;
|
||||
/* state */
|
||||
GstBuffer *buffer;
|
||||
|
||||
CSoundFile *mSoundFile;
|
||||
gboolean opened; /* set to TRUE when mSoundFile is created */
|
||||
gint32 read_bytes;
|
||||
gint32 read_samples;
|
||||
|
||||
gint64 seek_at; /* pending seek, or -1 */
|
||||
gint64 song_size; /* size of the raw song data in bytes */
|
||||
gint64 song_length; /* duration of the song in nanoseconds */
|
||||
gint64 offset; /* current position in samples */
|
||||
gint64 timestamp;
|
||||
|
||||
CSoundFile *mSoundFile;
|
||||
};
|
||||
|
||||
struct _GstModPlugClass {
|
||||
|
@ -83,13 +82,8 @@ struct _GstModPlugClass {
|
|||
typedef struct _GstModPlug GstModPlug;
|
||||
typedef struct _GstModPlugClass GstModPlugClass;
|
||||
|
||||
GstPad *srcpad;
|
||||
int need_sync;
|
||||
GType gst_modplug_get_type (void);
|
||||
|
||||
GType gst_modplug_get_type(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MODPLUG_H__ */
|
||||
|
|
|
@ -1175,7 +1175,8 @@ UINT CSoundFile::ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR lpMemFile,
|
|||
short int *pSample = (short int *)pIns->pSample;
|
||||
for (UINT j=0; j<len; j+=2)
|
||||
{
|
||||
*pSample++ = bswapLE16(*pSample);
|
||||
short int s = bswapLE16(*pSample);
|
||||
*pSample++ = s;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1366,7 +1367,8 @@ UINT CSoundFile::ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR lpMemFile,
|
|||
WORD *pSampleW = (WORD *)pIns->pSample;
|
||||
for (UINT j=0; j<len; j+=2) // swaparoni!
|
||||
{
|
||||
*pSampleW++ = bswapLE16(*pSampleW);
|
||||
WORD s = bswapLE16(*pSampleW);
|
||||
*pSampleW++ = s;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -448,6 +448,7 @@ typedef struct _MODCOMMAND
|
|||
class IMixPlugin
|
||||
{
|
||||
public:
|
||||
virtual ~IMixPlugin() {};
|
||||
virtual int AddRef() = 0;
|
||||
virtual int Release() = 0;
|
||||
virtual void SaveAllParameters() = 0;
|
||||
|
|
Loading…
Reference in a new issue