removal of //-style comments don't link plugins to core libs -- the versioning is done internally to the plugins with...

Original commit message from CVS:
* removal of //-style comments
* don't link plugins to core libs -- the versioning is done internally to the plugins with the plugin_info struct,
and symbol resolution is lazy, so we can always know if a plugin can be loaded by the plugin_info data. in theory.
This commit is contained in:
Andy Wingo 2002-03-19 04:10:06 +00:00
parent 0dc999da00
commit 4359de2616
89 changed files with 1916 additions and 1940 deletions

View file

@ -10,7 +10,7 @@ BUILT_SOURCES = \
libgstidentity2_la_SOURCES = gst-identity2.gob $(GOB_FILES_ID)
libgstidentity2_la_CFLAGS = $(GST_CFLAGS)
libgstidentity2_la_LIBADD = $(GST_LIBS)
libgstidentity2_la_LIBADD =
%.c %.h %-private.h: %.gob
gob $<

View file

@ -21,7 +21,7 @@ CLEANFILES = gst_artsio.h gst_artsio.cc gst_artsio.mcopclass gst_artsio.mcoptype
libgstarts_la_SOURCES = gst_arts.c gst_artsio.cc gst_artsio_impl.cc
libgstarts_la_CFLAGS = $(GST_CFLAGS)
libgstarts_la_CXXFLAGS = $(ARTS_CXXFLAGS) $(GST_CFLAGS)
libgstarts_la_LIBADD = $(GST_LIBS) $(ARTS_LIBS) -lartsflow
libgstarts_la_LIBADD = $(ARTS_LIBS) -lartsflow
libgstarts_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
EXTRA_DIST = gst_artsio.idl

View file

@ -21,7 +21,7 @@
#include <math.h>
#include <sys/soundcard.h>
//#define DEBUG_ENABLED
/*#define DEBUG_ENABLED */
#include "gst_arts.h"
#include "gst_artsio_impl.h"
@ -115,7 +115,7 @@ static void gst_arts_loop (GstElement *element);
static GstElementClass *parent_class = NULL;
//static guint gst_arts_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_arts_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_arts_get_type (void)
@ -159,7 +159,7 @@ gst_arts_init (GstARTS *arts)
arts->sinkpad = gst_pad_new_from_template(GST_PADTEMPLATE_GET(sink_temp),"sink");
gst_element_add_pad(GST_ELEMENT(arts),arts->sinkpad);
// arts->srcpad = gst_pad_new_from_template(GST_PADTEMPLATE_GET(src_temp),"src");
/* arts->srcpad = gst_pad_new_from_template(GST_PADTEMPLATE_GET(src_temp),"src"); */
arts->srcpad = gst_pad_new_from_template(mad_src_template_factory (), "src");
gst_element_add_pad(GST_ELEMENT(arts),arts->srcpad);
@ -223,7 +223,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
g_return_val_if_fail(gstarts != NULL, FALSE);
gst_elementfactory_add_padtemplate(gstarts, GST_PADTEMPLATE_GET(sink_temp));
// gst_elementfactory_add_padtemplate(gstarts, GST_PADTEMPLATE_GET(src_temp));
/* gst_elementfactory_add_padtemplate(gstarts, GST_PADTEMPLATE_GET(src_temp)); */
gst_elementfactory_add_padtemplate(gstarts, mad_src_template_factory ());
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (gstarts));

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libartsdsink.la
libartsdsink_la_SOURCES = gstartsdsink.c
libartsdsink_la_CFLAGS = $(GST_CFLAGS) $(ARTSC_CFLAGS)
libartsdsink_la_LIBADD = $(GST_LIBS) $(ARTSC_LIBS)
libartsdsink_la_LIBADD = $(ARTSC_LIBS)
libartsdsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstartsdsink.h

View file

@ -126,7 +126,7 @@ gst_artsdsink_channels_get_type (void)
static GstElementClass *parent_class = NULL;
//static guint gst_artsdsink_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_artsdsink_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_artsdsink_get_type (void)
@ -162,19 +162,19 @@ gst_artsdsink_class_init (GstArtsdsinkClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MUTE,
g_param_spec_boolean("mute","mute","mute",
TRUE,G_PARAM_READWRITE)); // CHECKME
TRUE,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DEPTH,
g_param_spec_enum("depth","depth","depth",
GST_TYPE_ARTSDSINK_DEPTHS,16,G_PARAM_READWRITE)); // CHECKME!
GST_TYPE_ARTSDSINK_DEPTHS,16,G_PARAM_READWRITE)); /* CHECKME! */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CHANNELS,
g_param_spec_enum("channels","channels","channels",
GST_TYPE_ARTSDSINK_CHANNELS,2,G_PARAM_READWRITE)); // CHECKME!
GST_TYPE_ARTSDSINK_CHANNELS,2,G_PARAM_READWRITE)); /* CHECKME! */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_RATE,
g_param_spec_int("frequency","frequency","frequency",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_NAME,
g_param_spec_string("name","name","name",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_artsdsink_set_property;
gobject_class->get_property = gst_artsdsink_get_property;
@ -193,7 +193,7 @@ gst_artsdsink_init(GstArtsdsink *artsdsink)
artsdsink->connected = FALSE;
artsdsink->mute = FALSE;
// FIXME: get default from somewhere better than just putting them inline.
/* FIXME: get default from somewhere better than just putting them inline. */
artsdsink->signd = TRUE;
artsdsink->depth = 16;
artsdsink->channels = 2;
@ -209,7 +209,7 @@ gst_artsdsink_sync_parms (GstArtsdsink *artsdsink)
if (!artsdsink->connected) return TRUE;
// Need to set stream to use new parameters: only way to do this is to reopen.
/* Need to set stream to use new parameters: only way to do this is to reopen. */
gst_artsdsink_close_audio (artsdsink);
return gst_artsdsink_open_audio (artsdsink);
}
@ -347,12 +347,12 @@ gst_artsdsink_open_audio (GstArtsdsink *sink)
const char * connname = "gstreamer";
int errcode;
// Name used by aRtsd for this connection.
/* Name used by aRtsd for this connection. */
if (sink->connect_name != NULL) connname = sink->connect_name;
// FIXME: this should only ever happen once per process.
// Really, artsc needs to be made thread safe to fix this (and other related
// problems).
/* FIXME: this should only ever happen once per process. */
/* Really, artsc needs to be made thread safe to fix this (and other related */
/* problems). */
errcode = arts_init();
if(errcode < 0) {
fprintf(stderr,"arts_init error: %s\n", arts_error_text(errcode));
@ -362,8 +362,8 @@ gst_artsdsink_open_audio (GstArtsdsink *sink)
GST_DEBUG (0, "artsdsink: attempting to open connection to aRtsd server\n");
sink->stream = arts_play_stream(sink->frequency, sink->depth,
sink->channels, connname);
// FIXME: check connection
// GST_DEBUG (0, "artsdsink: can't open connection to aRtsd server\n");
/* FIXME: check connection */
/* GST_DEBUG (0, "artsdsink: can't open connection to aRtsd server\n"); */
GST_FLAG_SET (sink, GST_ARTSDSINK_OPEN);
sink->connected = TRUE;

View file

@ -4,12 +4,12 @@ plugin_LTLIBRARIES = libafsink.la libafsrc.la
libafsink_la_SOURCES = gstafsink.c
libafsink_la_CFLAGS = $(GST_CFLAGS) $(AUDIOFILE_CFLAGS)
libafsink_la_LIBADD = $(GST_LIBS) $(AUDIOFILE_LIBS)
libafsink_la_LIBADD = $(AUDIOFILE_LIBS)
libafsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libafsrc_la_SOURCES = gstafsrc.c
libafsrc_la_CFLAGS = $(GST_CFLAGS) $(AUDIOFILE_CFLAGS)
libafsrc_la_LIBADD = $(GST_LIBS) $(AUDIOFILE_LIBS)
libafsrc_la_LIBADD = $(AUDIOFILE_LIBS)
libafsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstafsink.h gstafsrc.h

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstgsm.la
libgstgsm_la_SOURCES = gstgsm.c gstgsmdec.c gstgsmenc.c
libgstgsm_la_CFLAGS = $(GST_CFLAGS)
libgstgsm_la_LIBADD = $(GST_LIBS) $(GSM_LIBS)
libgstgsm_la_LIBADD = $(GSM_LIBS)
libgstgsm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstgsmenc.h gstgsmdec.h

View file

@ -52,7 +52,7 @@ static void gst_gsmdec_chain (GstPad *pad, GstBuffer *buf);
static GstPadConnectReturn gst_gsmdec_sinkconnect (GstPad *pad, GstCaps *caps);
static GstElementClass *parent_class = NULL;
//static guint gst_gsmdec_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_gsmdec_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_gsmdec_get_type(void) {
@ -141,7 +141,7 @@ gst_gsmdec_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL);
//g_return_if_fail(GST_IS_BUFFER(buf));
/*g_return_if_fail(GST_IS_BUFFER(buf)); */
gsmdec = GST_GSMDEC (gst_pad_get_parent (pad));

View file

@ -16,7 +16,7 @@ endif
libgstcolorspace_la_SOURCES = gstcolorspace.c yuv2yuv.c yuv2rgb.c rgb2yuv.c $(ARCHSRCS)
libgstcolorspace_la_CFLAGS = $(GST_CFLAGS)
libgstcolorspace_la_LIBADD = $(GST_LIBS) $(PLUGIN_EXTRA_LIBS)
libgstcolorspace_la_LIBADD = $(PLUGIN_EXTRA_LIBS)
libgstcolorspace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstcolorspace.h yuv2rgb.h

View file

@ -97,7 +97,7 @@ static void gst_colorspace_chain (GstPad *pad, GstBuffer *buf);
static GstElementStateReturn
gst_colorspace_change_state (GstElement *element);
// FIXME
/* FIXME */
extern void gst_colorspace_yuy2_to_i420 (unsigned char *src, unsigned char *dest,
guint width, guint height);
extern void gst_colorspace_rgb32_to_i420 (unsigned char *src, unsigned char *dest,
@ -106,7 +106,7 @@ extern void gst_colorspace_rgb32_to_yv12 (unsigned char *src, unsigned char *de
guint width, guint height);
static GstElementClass *parent_class = NULL;
//static guint gst_colorspace_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_colorspace_signals[LAST_SIGNAL] = { 0 }; */
static GstBufferPool*
colorspace_get_bufferpool (GstPad *pad)

View file

@ -30,7 +30,7 @@
# include <Hermes/Hermes.h>
#endif
// #include <gst/meta/audioraw.h>
/* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus

View file

@ -24,7 +24,7 @@
#include "yuv2rgb.h"
//#undef HAVE_LIBMMX
/*#undef HAVE_LIBMMX */
#ifdef HAVE_LIBMMX
#include "mmx.h"
@ -116,7 +116,7 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
to_space = gst_caps_get_fourcc_int (to, "format");
to_bpp = gst_caps_get_int (to, "bpp");
// FIXME we leak new here.
/* FIXME we leak new here. */
g_return_val_if_fail (to_space == GST_STR_FOURCC ("RGB "), NULL);
switch(from_space) {
@ -186,9 +186,9 @@ static void gst_colorspace_yuv420P_to_rgb32(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb32(space->color_tables,
src, // Y component
src+size, // cr component
src+size+(size>>2), // cb component
src, /* Y component */
src+size, /* cr component */
src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@ -202,9 +202,9 @@ static void gst_colorspace_yuv420P_to_rgb24(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb24(space->color_tables,
src, // Y component
src+size, // cr component
src+size+(size>>2), // cb component
src, /* Y component */
src+size, /* cr component */
src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@ -218,9 +218,9 @@ static void gst_colorspace_yuv420P_to_rgb16(GstColorSpaceConverter *space, unsig
size = space->width * space->height;
gst_colorspace_yuv_to_rgb16(space->color_tables,
src, // Y component
src+size, // cr component
src+size+(size>>2), // cb component
src, /* Y component */
src+size, /* cr component */
src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@ -235,9 +235,9 @@ static void gst_colorspace_yuv420P_to_bgr32_mmx(GstColorSpaceConverter *space, u
size = space->width * space->height;
gst_colorspace_yuv_to_bgr32_mmx(NULL,
src, // Y component
src+size, // cr component
src+size+(size>>2), // cb component
src, /* Y component */
src+size, /* cr component */
src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@ -250,9 +250,9 @@ static void gst_colorspace_yuv420P_to_bgr16_mmx(GstColorSpaceConverter *space, u
size = space->width * space->height;
gst_colorspace_yuv_to_bgr16_mmx(NULL,
src, // Y component
src+size, // cr component
src+size+(size>>2), // cb component
src, /* Y component */
src+size, /* cr component */
src+size+(size>>2), /* cb component */
dest,
space->height,
space->width);
@ -675,10 +675,10 @@ gst_colorspace_yuv_to_rgb32(tables, lum, cb, cr, out, rows, cols)
}
#ifdef HAVE_LIBMMX
static mmx_t MMX_80w = (mmx_t)(long long)0x0080008000800080LL; //dd 00080 0080h, 000800080h
static mmx_t MMX_80w = (mmx_t)(long long)0x0080008000800080LL; /*dd 00080 0080h, 000800080h */
static mmx_t MMX_00FFw = (mmx_t)(long long)0x00ff00ff00ff00ffLL; //dd 000FF 00FFh, 000FF00FFh
static mmx_t MMX_FF00w = (mmx_t)(long long)0xff00ff00ff00ff00LL; //dd 000FF 00FFh, 000FF00FFh
static mmx_t MMX_00FFw = (mmx_t)(long long)0x00ff00ff00ff00ffLL; /*dd 000FF 00FFh, 000FF00FFh */
static mmx_t MMX_FF00w = (mmx_t)(long long)0xff00ff00ff00ff00LL; /*dd 000FF 00FFh, 000FF00FFh */
static mmx_t MMX32_Vredcoeff = (mmx_t)(long long)0x0059005900590059LL;
static mmx_t MMX32_Ubluecoeff = (mmx_t)(long long)0x0072007200720072LL;
@ -695,7 +695,7 @@ gst_colorspace_yuv_to_bgr32_mmx(tables, lum, cr, cb, out, rows, cols)
int cols, rows;
{
guint32 *row1 = (guint32 *)out; // 32 bit target
guint32 *row1 = (guint32 *)out; /* 32 bit target */
int cols4 = cols>>2;
int y, x;
@ -703,109 +703,109 @@ gst_colorspace_yuv_to_bgr32_mmx(tables, lum, cr, cb, out, rows, cols)
for (y=rows>>1; y; y--) {
for (x=cols4; x; x--) {
// create Cr (result in mm1)
movd_m2r(*(mmx_t *)cb, mm1); // 0 0 0 0 v3 v2 v1 v0
pxor_r2r(mm7, mm7); // 00 00 00 00 00 00 00 00
movd_m2r(*(mmx_t *)lum, mm2); // 0 0 0 0 l3 l2 l1 l0
punpcklbw_r2r(mm7, mm1); // 0 v3 0 v2 00 v1 00 v0
punpckldq_r2r(mm1, mm1); // 00 v1 00 v0 00 v1 00 v0
psubw_m2r(MMX_80w, mm1); // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0
/* create Cr (result in mm1) */
movd_m2r(*(mmx_t *)cb, mm1); /* 0 0 0 0 v3 v2 v1 v0 */
pxor_r2r(mm7, mm7); /* 00 00 00 00 00 00 00 00 */
movd_m2r(*(mmx_t *)lum, mm2); /* 0 0 0 0 l3 l2 l1 l0 */
punpcklbw_r2r(mm7, mm1); /* 0 v3 0 v2 00 v1 00 v0 */
punpckldq_r2r(mm1, mm1); /* 00 v1 00 v0 00 v1 00 v0 */
psubw_m2r(MMX_80w, mm1); /* mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 */
// create Cr_g (result in mm0)
movq_r2r(mm1, mm0); // r1 r1 r0 r0 r1 r1 r0 r0
pmullw_m2r(MMX32_Vgrncoeff, mm0); // red*-46dec=0.7136*64
pmullw_m2r(MMX32_Vredcoeff, mm1); // red*89dec=1.4013*64
psraw_i2r(6, mm0); // red=red/64
psraw_i2r(6, mm1); // red=red/64
/* create Cr_g (result in mm0) */
movq_r2r(mm1, mm0); /* r1 r1 r0 r0 r1 r1 r0 r0 */
pmullw_m2r(MMX32_Vgrncoeff, mm0); /* red*-46dec=0.7136*64 */
pmullw_m2r(MMX32_Vredcoeff, mm1); /* red*89dec=1.4013*64 */
psraw_i2r(6, mm0); /* red=red/64 */
psraw_i2r(6, mm1); /* red=red/64 */
// create L1 L2 (result in mm2,mm4)
// L2=lum+cols
movq_m2r(*(mmx_t *)(lum+cols),mm3); // 0 0 0 0 L3 L2 L1 L0
punpckldq_r2r(mm3, mm2); // L3 L2 L1 L0 l3 l2 l1 l0
movq_r2r(mm2, mm4); // L3 L2 L1 L0 l3 l2 l1 l0
pand_m2r(MMX_FF00w, mm2); // L3 0 L1 0 l3 0 l1 0
pand_m2r(MMX_00FFw, mm4); // 0 L2 0 L0 0 l2 0 l0
psrlw_i2r(8, mm2); // 0 L3 0 L1 0 l3 0 l1
/* create L1 L2 (result in mm2,mm4) */
/* L2=lum+cols */
movq_m2r(*(mmx_t *)(lum+cols),mm3); /* 0 0 0 0 L3 L2 L1 L0 */
punpckldq_r2r(mm3, mm2); /* L3 L2 L1 L0 l3 l2 l1 l0 */
movq_r2r(mm2, mm4); /* L3 L2 L1 L0 l3 l2 l1 l0 */
pand_m2r(MMX_FF00w, mm2); /* L3 0 L1 0 l3 0 l1 0 */
pand_m2r(MMX_00FFw, mm4); /* 0 L2 0 L0 0 l2 0 l0 */
psrlw_i2r(8, mm2); /* 0 L3 0 L1 0 l3 0 l1 */
// create R (result in mm6)
movq_r2r(mm2, mm5); // 0 L3 0 L1 0 l3 0 l1
movq_r2r(mm4, mm6); // 0 L2 0 L0 0 l2 0 l0
paddsw_r2r(mm1, mm5); // lum1+red:x R3 x R1 x r3 x r1
paddsw_r2r(mm1, mm6); // lum1+red:x R2 x R0 x r2 x r0
packuswb_r2r(mm5, mm5); // R3 R1 r3 r1 R3 R1 r3 r1
packuswb_r2r(mm6, mm6); // R2 R0 r2 r0 R2 R0 r2 r0
pxor_r2r(mm7, mm7); // 00 00 00 00 00 00 00 00
punpcklbw_r2r(mm5, mm6); // R3 R2 R1 R0 r3 r2 r1 r0
/* create R (result in mm6) */
movq_r2r(mm2, mm5); /* 0 L3 0 L1 0 l3 0 l1 */
movq_r2r(mm4, mm6); /* 0 L2 0 L0 0 l2 0 l0 */
paddsw_r2r(mm1, mm5); /* lum1+red:x R3 x R1 x r3 x r1 */
paddsw_r2r(mm1, mm6); /* lum1+red:x R2 x R0 x r2 x r0 */
packuswb_r2r(mm5, mm5); /* R3 R1 r3 r1 R3 R1 r3 r1 */
packuswb_r2r(mm6, mm6); /* R2 R0 r2 r0 R2 R0 r2 r0 */
pxor_r2r(mm7, mm7); /* 00 00 00 00 00 00 00 00 */
punpcklbw_r2r(mm5, mm6); /* R3 R2 R1 R0 r3 r2 r1 r0 */
// create Cb (result in mm1)
movd_m2r(*(mmx_t *)cr, mm1); // 0 0 0 0 u3 u2 u1 u0
punpcklbw_r2r(mm7, mm1); // 0 u3 0 u2 00 u1 00 u0
punpckldq_r2r(mm1, mm1); // 00 u1 00 u0 00 u1 00 u0
psubw_m2r(MMX_80w, mm1); // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0
// create Cb_g (result in mm5)
movq_r2r(mm1, mm5); // u1 u1 u0 u0 u1 u1 u0 u0
pmullw_m2r(MMX32_Ugrncoeff, mm5); // blue*-109dec=1.7129*64
pmullw_m2r(MMX32_Ubluecoeff, mm1); // blue*114dec=1.78125*64
psraw_i2r(6, mm5); // blue=red/64
psraw_i2r(6, mm1); // blue=blue/64
/* create Cb (result in mm1) */
movd_m2r(*(mmx_t *)cr, mm1); /* 0 0 0 0 u3 u2 u1 u0 */
punpcklbw_r2r(mm7, mm1); /* 0 u3 0 u2 00 u1 00 u0 */
punpckldq_r2r(mm1, mm1); /* 00 u1 00 u0 00 u1 00 u0 */
psubw_m2r(MMX_80w, mm1); /* mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 */
/* create Cb_g (result in mm5) */
movq_r2r(mm1, mm5); /* u1 u1 u0 u0 u1 u1 u0 u0 */
pmullw_m2r(MMX32_Ugrncoeff, mm5); /* blue*-109dec=1.7129*64 */
pmullw_m2r(MMX32_Ubluecoeff, mm1); /* blue*114dec=1.78125*64 */
psraw_i2r(6, mm5); /* blue=red/64 */
psraw_i2r(6, mm1); /* blue=blue/64 */
// create G (result in mm7)
movq_r2r(mm2, mm3); // 0 L3 0 L1 0 l3 0 l1
movq_r2r(mm4, mm7); // 0 L2 0 L0 0 l2 0 l1
paddsw_r2r(mm5, mm3); // lum1+Cb_g:x G3t x G1t x g3t x g1t
paddsw_r2r(mm5, mm7); // lum1+Cb_g:x G2t x G0t x g2t x g0t
paddsw_r2r(mm0, mm3); // lum1+Cr_g:x G3 x G1 x g3 x g1
paddsw_r2r(mm0, mm7); // lum1+blue:x G2 x G0 x g2 x g0
packuswb_r2r(mm3, mm3); // G3 G1 g3 g1 G3 G1 g3 g1
packuswb_r2r(mm7, mm7); // G2 G0 g2 g0 G2 G0 g2 g0
punpcklbw_r2r(mm3, mm7); // G3 G2 G1 G0 g3 g2 g1 g0
/* create G (result in mm7) */
movq_r2r(mm2, mm3); /* 0 L3 0 L1 0 l3 0 l1 */
movq_r2r(mm4, mm7); /* 0 L2 0 L0 0 l2 0 l1 */
paddsw_r2r(mm5, mm3); /* lum1+Cb_g:x G3t x G1t x g3t x g1t */
paddsw_r2r(mm5, mm7); /* lum1+Cb_g:x G2t x G0t x g2t x g0t */
paddsw_r2r(mm0, mm3); /* lum1+Cr_g:x G3 x G1 x g3 x g1 */
paddsw_r2r(mm0, mm7); /* lum1+blue:x G2 x G0 x g2 x g0 */
packuswb_r2r(mm3, mm3); /* G3 G1 g3 g1 G3 G1 g3 g1 */
packuswb_r2r(mm7, mm7); /* G2 G0 g2 g0 G2 G0 g2 g0 */
punpcklbw_r2r(mm3, mm7); /* G3 G2 G1 G0 g3 g2 g1 g0 */
// create B (result in mm5)
movq_r2r(mm2, mm3); // 0 L3 0 L1 0 l3 0 l1
movq_r2r(mm4, mm5); // 0 L2 0 L0 0 l2 0 l1
paddsw_r2r(mm1, mm3); // lum1+blue:x B3 x B1 x b3 x b1
paddsw_r2r(mm1, mm5); // lum1+blue:x B2 x B0 x b2 x b0
packuswb_r2r(mm3, mm3); // B3 B1 b3 b1 B3 B1 b3 b1
packuswb_r2r(mm5, mm5); // B2 B0 b2 b0 B2 B0 b2 b0
punpcklbw_r2r(mm3, mm5); // B3 B2 B1 B0 b3 b2 b1 b0
/* create B (result in mm5) */
movq_r2r(mm2, mm3); /* 0 L3 0 L1 0 l3 0 l1 */
movq_r2r(mm4, mm5); /* 0 L2 0 L0 0 l2 0 l1 */
paddsw_r2r(mm1, mm3); /* lum1+blue:x B3 x B1 x b3 x b1 */
paddsw_r2r(mm1, mm5); /* lum1+blue:x B2 x B0 x b2 x b0 */
packuswb_r2r(mm3, mm3); /* B3 B1 b3 b1 B3 B1 b3 b1 */
packuswb_r2r(mm5, mm5); /* B2 B0 b2 b0 B2 B0 b2 b0 */
punpcklbw_r2r(mm3, mm5); /* B3 B2 B1 B0 b3 b2 b1 b0 */
// fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb)
/* fill destination row1 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */
pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
pxor_r2r(mm4, mm4); // 0 0 0 0 0 0 0 0
movq_r2r(mm6, mm1); // R3 R2 R1 R0 r3 r2 r1 r0
movq_r2r(mm5, mm3); // B3 B2 B1 B0 b3 b2 b1 b0
// process lower lum
punpcklbw_r2r(mm4, mm1); // 0 r3 0 r2 0 r1 0 r0
punpcklbw_r2r(mm4, mm3); // 0 b3 0 b2 0 b1 0 b0
movq_r2r(mm1, mm2); // 0 r3 0 r2 0 r1 0 r0
movq_r2r(mm3, mm0); // 0 b3 0 b2 0 b1 0 b0
punpcklwd_r2r(mm1, mm3); // 0 r1 0 b1 0 r0 0 b0
punpckhwd_r2r(mm2, mm0); // 0 r3 0 b3 0 r2 0 b2
pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
pxor_r2r(mm4, mm4); /* 0 0 0 0 0 0 0 0 */
movq_r2r(mm6, mm1); /* R3 R2 R1 R0 r3 r2 r1 r0 */
movq_r2r(mm5, mm3); /* B3 B2 B1 B0 b3 b2 b1 b0 */
/* process lower lum */
punpcklbw_r2r(mm4, mm1); /* 0 r3 0 r2 0 r1 0 r0 */
punpcklbw_r2r(mm4, mm3); /* 0 b3 0 b2 0 b1 0 b0 */
movq_r2r(mm1, mm2); /* 0 r3 0 r2 0 r1 0 r0 */
movq_r2r(mm3, mm0); /* 0 b3 0 b2 0 b1 0 b0 */
punpcklwd_r2r(mm1, mm3); /* 0 r1 0 b1 0 r0 0 b0 */
punpckhwd_r2r(mm2, mm0); /* 0 r3 0 b3 0 r2 0 b2 */
pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
movq_r2r(mm7, mm1); // G3 G2 G1 G0 g3 g2 g1 g0
punpcklbw_r2r(mm1, mm2); // g3 0 g2 0 g1 0 g0 0
punpcklwd_r2r(mm4, mm2); // 0 0 g1 0 0 0 g0 0
por_r2r(mm3, mm2); // 0 r1 g1 b1 0 r0 g0 b0
movq_r2m(mm2, *(mmx_t *)row1); // wrote out ! row1
pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
movq_r2r(mm7, mm1); /* G3 G2 G1 G0 g3 g2 g1 g0 */
punpcklbw_r2r(mm1, mm2); /* g3 0 g2 0 g1 0 g0 0 */
punpcklwd_r2r(mm4, mm2); /* 0 0 g1 0 0 0 g0 0 */
por_r2r(mm3, mm2); /* 0 r1 g1 b1 0 r0 g0 b0 */
movq_r2m(mm2, *(mmx_t *)row1); /* wrote out ! row1 */
pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
punpcklbw_r2r(mm1, mm4); // g3 0 g2 0 g1 0 g0 0
punpckhwd_r2r(mm2, mm4); // 0 0 g3 0 0 0 g2 0
por_r2r(mm0, mm4); // 0 r3 g3 b3 0 r2 g2 b2
movq_r2m(mm4, *(mmx_t *)(row1+2)); // wrote out ! row1
pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
punpcklbw_r2r(mm1, mm4); /* g3 0 g2 0 g1 0 g0 0 */
punpckhwd_r2r(mm2, mm4); /* 0 0 g3 0 0 0 g2 0 */
por_r2r(mm0, mm4); /* 0 r3 g3 b3 0 r2 g2 b2 */
movq_r2m(mm4, *(mmx_t *)(row1+2)); /* wrote out ! row1 */
// fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb)
// this can be done "destructive"
pxor_r2r(mm2, mm2); // 0 0 0 0 0 0 0 0
punpckhbw_r2r(mm2, mm6); // 0 R3 0 R2 0 R1 0 R0
punpckhbw_r2r(mm1, mm5); // G3 B3 G2 B2 G1 B1 G0 B0
movq_r2r(mm5, mm1); // G3 B3 G2 B2 G1 B1 G0 B0
punpcklwd_r2r(mm6, mm1); // 0 R1 G1 B1 0 R0 G0 B0
movq_r2m(mm1, *(mmx_t *)(row1+cols)); // wrote out ! row2
punpckhwd_r2r(mm6, mm5); // 0 R3 G3 B3 0 R2 G2 B2
movq_r2m(mm5, *(mmx_t *)(row1+cols+2)); // wrote out ! row2
/* fill destination row2 (needed are mm6=Rr,mm7=Gg,mm5=Bb) */
/* this can be done "destructive" */
pxor_r2r(mm2, mm2); /* 0 0 0 0 0 0 0 0 */
punpckhbw_r2r(mm2, mm6); /* 0 R3 0 R2 0 R1 0 R0 */
punpckhbw_r2r(mm1, mm5); /* G3 B3 G2 B2 G1 B1 G0 B0 */
movq_r2r(mm5, mm1); /* G3 B3 G2 B2 G1 B1 G0 B0 */
punpcklwd_r2r(mm6, mm1); /* 0 R1 G1 B1 0 R0 G0 B0 */
movq_r2m(mm1, *(mmx_t *)(row1+cols)); /* wrote out ! row2 */
punpckhwd_r2r(mm6, mm5); /* 0 R3 G3 B3 0 R2 G2 B2 */
movq_r2m(mm5, *(mmx_t *)(row1+cols+2)); /* wrote out ! row2 */
lum+=4;
cr+=2;

View file

@ -24,7 +24,7 @@
#include <gst/gst.h>
//#undef HAVE_LIBMMX
/*#undef HAVE_LIBMMX */
#ifdef HAVE_LIBMMX
#include "mmx.h"

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstjack.la
libgstjack_la_SOURCES = gstjack.c
libgstjack_la_CFLAGS = $(GST_CFLAGS) $(JACK_CFLAGS)
libgstjack_la_LIBADD = $(GST_LIBS) $(JACK_LIBS)
libgstjack_la_LIBADD = $(JACK_LIBS)
libgstjack_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstjack.h

View file

@ -259,7 +259,7 @@ gst_jack_request_new_pad (GstElement *element, GstPadTemplate *templ, const gcha
if (this->client)
*pad_list = g_list_append (*pad_list, pad);
// this->pads = g_list_append (this->pads, pad);
/* this->pads = g_list_append (this->pads, pad); */
return pad->pad;
}
@ -555,7 +555,7 @@ shutdown (void *arg)
{
GstJackClient *client = (GstJackClient*) arg;
printf ("shutdown\n");
// gst_element_set_state (GST_ELEMENT (client->manager), GST_STATE_READY);
/* gst_element_set_state (GST_ELEMENT (client->manager), GST_STATE_READY); */
}
static gboolean

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstladspa.la
libgstladspa_la_SOURCES = gstladspa.c search.c load.c
libgstladspa_la_CFLAGS = $(GST_CFLAGS)
libgstladspa_la_LIBADD = $(GST_LIBS)
libgstladspa_la_LIBADD =
libgstladspa_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstladspa.h ladspa.h utils.h

View file

@ -492,7 +492,7 @@ gst_ladspa_set_property (GObject *object, guint prop_id, const GValue *value, GP
/*
if (id == ARG_LOOP_BASED) {
// we can only do this in NULL state
* we can only do this in NULL state *
g_return_if_fail (GST_STATE(object) != GST_STATE_NULL);
ladspa->loopbased = g_value_get_boolean (value);
if (ladspa->loopbased) {

View file

@ -98,9 +98,9 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
pcLADSPAPath = getenv("LADSPA_PATH");
if (!pcLADSPAPath) {
// fprintf(stderr,
// "Warning: You do not have a LADSPA_PATH "
// "environment variable set.\n");
/* fprintf(stderr, */
/* "Warning: You do not have a LADSPA_PATH " */
/* "environment variable set.\n"); */
return;
}

View file

@ -5,7 +5,7 @@ plugin_LTLIBRARIES = libsdlvideosink.la
libsdlvideosink_la_SOURCES = sdlvideosink.c
## FIXME I have my doubts about these opti flags
libsdlvideosink_la_CFLAGS = $(GST_CFLAGS) $(SDL_CFLAGS) -ffast-math -finline-functions
libsdlvideosink_la_LIBADD = $(GST_LIBS) $(SDL_LIBS)
libsdlvideosink_la_LIBADD = $(SDL_LIBS)
libsdlvideosink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = sdlvideosink.h

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstshout.la
libgstshout_la_SOURCES = gstshout.c
libgstshout_la_CFLAGS = $(GST_CFLAGS)
libgstshout_la_LIBADD = $(GST_LIBS) $(SHOUT_LIBS)
libgstshout_la_LIBADD = $(SHOUT_LIBS)
libgstshout_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstshout.h

View file

@ -95,7 +95,7 @@ static void gst_icecastsend_get_property (GObject *object, guint prop_id, GVa
static GstElementStateReturn gst_icecastsend_change_state (GstElement *element);
static GstElementClass *parent_class = NULL;
//static guint gst_icecastsend_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_icecastsend_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_icecastsend_get_type(void)
@ -131,57 +131,57 @@ gst_icecastsend_class_init (GstIcecastSendClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_IP,
g_param_spec_string("ip","ip","ip",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PORT,
g_param_spec_int("port","port","port",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PASSWORD,
g_param_spec_string("password","password","password",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PUBLIC,
g_param_spec_boolean("public","public","public",
TRUE, G_PARAM_READWRITE)); // CHECKME
TRUE, G_PARAM_READWRITE)); /* CHECKME */
// metadata
/* metadata */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_NAME,
g_param_spec_string("name","name","name",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DESCRIPTION,
g_param_spec_string("description","description","description",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_GENRE,
g_param_spec_string("genre","genre","genre",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
// icecast only
/* icecast only */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MOUNT,
g_param_spec_string("mount","mount","mount",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DUMPFILE,
g_param_spec_string("dumpfile","dumpfile","dumpfile",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
// shoutcast only
/* shoutcast only */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ICY,
g_param_spec_boolean("icy","icy","icy",
FALSE, G_PARAM_READWRITE)); // CHECKME
FALSE, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_AIM,
g_param_spec_string("aim","aim","aim",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ICQ,
g_param_spec_string("icq","icq","icq",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_IRC,
g_param_spec_string("irc","irc","irc",
NULL, G_PARAM_READWRITE)); // CHECKME
NULL, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_icecastsend_set_property;
@ -405,10 +405,10 @@ gst_icecastsend_change_state (GstElement *element)
case GST_STATE_NULL_TO_READY:
shout_init_connection (&icecastsend->conn);
// --- FIXME: shout requires an ip, and fails if it is given a host.
// may want to put convert_to_ip(icecastsend->ip) here
/* --- FIXME: shout requires an ip, and fails if it is given a host. */
/* may want to put convert_to_ip(icecastsend->ip) here */
icecastsend->conn.ip = icecastsend->ip;
// ---
/* --- */
icecastsend->conn.port = icecastsend->port;
icecastsend->conn.password = icecastsend->password;
@ -427,7 +427,7 @@ gst_icecastsend_change_state (GstElement *element)
g_print ("connected to server...\n");
}
else {
// changed from g_warning, and included result code lookup.
/* changed from g_warning, and included result code lookup. */
g_error ("couldn't connect to server... (%i: %s)\n", icecastsend->conn.error, SHOUT_ERRORS[icecastsend->conn.error]);
shout_disconnect (&icecastsend->conn);
return GST_STATE_FAILURE;

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstsmoothwave.la
libgstsmoothwave_la_SOURCES = gstsmoothwave.c
libgstsmoothwave_la_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
libgstsmoothwave_la_LIBADD = $(GST_LIBS) $(GTK_LIBS)
libgstsmoothwave_la_LIBADD = $(GTK_LIBS)
libgstsmoothwave_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsmoothwave.h

View file

@ -55,7 +55,7 @@ static void gst_smoothwave_get_property (GObject *object, guint prop_id, GValue
static void gst_smoothwave_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 }; */
GType
@ -92,13 +92,13 @@ gst_smoothwave_class_init (GstSmoothWaveClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH,
g_param_spec_int("width","width","width",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_HEIGHT,
g_param_spec_int("height","height","height",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDGET,
g_param_spec_object("widget","widget","widget",
GTK_TYPE_WIDGET,G_PARAM_READABLE)); // CHECKME!
GTK_TYPE_WIDGET,G_PARAM_READABLE)); /* CHECKME! */
gobject_class->set_property = gst_smoothwave_set_property;
gobject_class->get_property = gst_smoothwave_get_property;
@ -116,21 +116,21 @@ gst_smoothwave_init (GstSmoothWave *smoothwave)
smoothwave->srcpad = gst_pad_new("src",GST_PAD_SRC);
gst_element_add_pad(GST_ELEMENT(smoothwave),smoothwave->srcpad);
// smoothwave->meta = NULL;
/* smoothwave->meta = NULL; */
smoothwave->width = 512;
smoothwave->height = 256;
gdk_rgb_init();
// gtk_widget_set_default_colormap (gdk_rgb_get_cmap());
// gtk_widget_set_default_visual (gdk_rgb_get_visual());
/* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */
/* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */
// GST_DEBUG (0,"creating palette\n");
/* GST_DEBUG (0,"creating palette\n"); */
for (i=0;i<256;i++)
palette[i] = (i << 16) || (i << 8);
// GST_DEBUG (0,"creating cmap\n");
/* GST_DEBUG (0,"creating cmap\n"); */
smoothwave->cmap = gdk_rgb_cmap_new(palette,256);
// GST_DEBUG (0,"created cmap\n");
// gtk_widget_set_default_colormap (smoothwave->cmap);
/* GST_DEBUG (0,"created cmap\n"); */
/* gtk_widget_set_default_colormap (smoothwave->cmap); */
smoothwave->image = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(smoothwave->image),
@ -153,29 +153,29 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL);
// g_return_if_fail(GST_IS_BUFFER(buf));
/* g_return_if_fail(GST_IS_BUFFER(buf)); */
smoothwave = GST_SMOOTHWAVE(GST_OBJECT_PARENT (pad));
/* first deal with audio metadata */
// if (buf->meta) {
// if (smoothwave->meta != NULL) {
// /* FIXME: need to unref the old metadata so it goes away */
// }
// /* we just make a copy of the pointer */
// smoothwave->meta = (MetaAudioRaw *)(buf->meta);
// /* FIXME: now we have to ref the metadata so it doesn't go away */
// }
/* if (buf->meta) { */
/* if (smoothwave->meta != NULL) { */
/* /* FIXME: need to unref the old metadata so it goes away */ */
/* } */
/* /* we just make a copy of the pointer */ */
/* smoothwave->meta = (MetaAudioRaw *)(buf->meta); */
/* /* FIXME: now we have to ref the metadata so it doesn't go away */ */
/* } */
// g_return_if_fail(smoothwave->meta != NULL);
/* g_return_if_fail(smoothwave->meta != NULL); */
samples = (gint16 *)GST_BUFFER_DATA(buf);
// samplecount = buf->datasize / (smoothwave->meta->channels * sizeof(gint16));
/* samplecount = buf->datasize / (smoothwave->meta->channels * sizeof(gint16)); */
samplecount = GST_BUFFER_SIZE(buf) / (2 * sizeof(gint16));
qheight = smoothwave->height/4;
// GST_DEBUG (0,"traversing %d\n",smoothwave->width);
/* GST_DEBUG (0,"traversing %d\n",smoothwave->width); */
for (i=0;i<MAX(smoothwave->width,samplecount);i++) {
gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 +
qheight;
@ -183,7 +183,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
(qheight*3);
smoothwave->imagebuffer[y1*smoothwave->width + i] = 0xff;
smoothwave->imagebuffer[y2*smoothwave->width + i] = 0xff;
// smoothwave->imagebuffer[i+(smoothwave->width*5)] = i;
/* smoothwave->imagebuffer[i+(smoothwave->width*5)] = i; */
}
ptr = (guint32 *)smoothwave->imagebuffer;
@ -194,7 +194,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
ptr++;
}
// GST_DEBUG (0,"drawing\n");
/* GST_DEBUG (0,"drawing\n"); */
/* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);\n",
smoothwave->image->window,
smoothwave->image->style->fg_gc[GTK_STATE_NORMAL],
@ -214,7 +214,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
GDK_RGB_DITHER_NORMAL,
smoothwave->imagebuffer,smoothwave->width);
// gst_trace_add_entry(NULL,0,buf,"smoothwave: calculated smoothwave");
/* gst_trace_add_entry(NULL,0,buf,"smoothwave: calculated smoothwave"); */
gst_buffer_unref(buf);
}

View file

@ -9,7 +9,7 @@ libgsttarkin_la_SOURCES = tarkin.c \
libgsttarkin_la_CFLAGS = $(GST_CFLAGS) $(VORBIS_CFLAGS) -DTYPE_BITS=10 -DTYPE=int16_t -DRLECODER
## AM_PATH_VORBIS also sets VORBISENC_LIBS
libgsttarkin_la_LIBADD = $(GST_LIBS) $(VORBIS_LIBS) $(VORBISENC_LIBS)
libgsttarkin_la_LIBADD = $(VORBIS_LIBS) $(VORBISENC_LIBS)
libgsttarkin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gsttarkinenc.h mem.h tarkin.h yuv.h wavelet.h

View file

@ -73,8 +73,8 @@ uint32_t bitcoder_flush (BitCoderState *s)
if (s->bit_count > 0 && s->byte_count < s->limit)
s->bitstream [s->byte_count++] = s->byte << (8 - s->bit_count);
//printf ("%s: %i bytes written.\n", __FUNCTION__, s->byte_count);
//printf ("%s: last bit %i\n", __FUNCTION__, s->bit_count);
/*printf ("%s: %i bytes written.\n", __FUNCTION__, s->byte_count); */
/*printf ("%s: last bit %i\n", __FUNCTION__, s->bit_count); */
return s->byte_count;
}

View file

@ -20,7 +20,7 @@ unsigned int required_bits (unsigned int x)
static inline
void write_number_binary (BitCoderState *b, unsigned int x, int bits, int u)
{
//printf ("wrote %i with %i bits (%i+%i)\n", x, u+bits, u, bits);
/*printf ("wrote %i with %i bits (%i+%i)\n", x, u+bits, u, bits); */
while (bits) {
bits--;
bitcoder_write_bit (b, (x >> bits) & 1);

View file

@ -270,7 +270,7 @@ static int _tarkin_unpack_layer_desc(TarkinInfo *vi,oggpack_buffer *opb){
}
vi->max_bitstream_len += layer->desc.bitstream_len
+ 2 * 10 * sizeof(uint32_t) * layer->n_comp; // truncation tables
+ 2 * 10 * sizeof(uint32_t) * layer->n_comp; /* truncation tables */
#ifdef DBG_OGG
printf("\n layer%d: size %dx%dx%d, format %d, a_m %d, s_m %d, %d fpb\n",

View file

@ -139,7 +139,7 @@ extern int tarkin_analysis_add_layer(TarkinStream *s,
}
/*
max_bitstream_len += layer->desc.bitstream_len
+ 2 * 10 * sizeof(uint32_t) * layer->n_comp; // truncation tables
+ 2 * 10 * sizeof(uint32_t) * layer->n_comp; /* truncation tables */
*/
return (TARKIN_OK);
}

View file

@ -57,13 +57,13 @@ TYPE decode_coeff (ENTROPY_CODER significand_bitstream [],
do {
i--;
significance |= INPUT_BIT(&significand_bitstream[i]) << i;
// if (ENTROPY_CODER_EOS(&significand_bitstream[i]))
// return 0;
/* if (ENTROPY_CODER_EOS(&significand_bitstream[i])) */
/* return 0; */
} while (!significance && i > 0);
sign = INPUT_BIT(&significand_bitstream[i]);
// if (ENTROPY_CODER_EOS(&significand_bitstream[i]))
// return 0;
/* if (ENTROPY_CODER_EOS(&significand_bitstream[i])) */
/* return 0; */
while (--i >= 0)
significance |= INPUT_BIT(&insignificand_bitstream[i]) << i;

View file

@ -7,6 +7,6 @@ libgstaudio_la_SOURCES = audio.c
libgstaudioincludedir = $(includedir)/gst/audio
libgstaudioinclude_HEADERS = audio.h
libgstaudio_la_LIBADD = $(GST_LIBS)
libgstaudio_la_LIBADD =
libgstaudio_la_CFLAGS = $(GST_CFLAGS) -finline-functions -ffast-math
libgstaudio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -131,7 +131,7 @@ gst_audio_highest_sample_value (GstPad* pad)
GstCaps *caps = NULL;
caps = GST_PAD_CAPS (pad);
// FIXME : Please change this to a better warning method !
/* FIXME : Please change this to a better warning method ! */
if (caps == NULL)
printf ("WARNING: gstaudio: could not get caps of pad !\n");
width = gst_caps_get_int (caps, "width");

View file

@ -27,6 +27,6 @@ ieeetest_LDFLAGS = $(GST_LIBS)
noinst_HEADERS = dct.h
libgstidct_la_LIBADD = $(GST_LIBS)
libgstidct_la_LIBADD =
libgstidct_la_CFLAGS = $(GST_CFLAGS) -finline-functions -ffast-math
libgstidct_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -117,7 +117,7 @@ main(int argc, char **argv)
gst_trace_read_tsc(&tscstart);
gst_idct_convert(idct, testout);
gst_trace_read_tsc(&tscstop);
//printf("time %llu, %llu %lld\n", tscstart, tscstop, tscstop-tscstart);
/*printf("time %llu, %llu %lld\n", tscstart, tscstop, tscstop-tscstart); */
if (tscstop - tscstart < tscmin) tscmin = tscstop-tscstart;
if (tscstop - tscstart > tscmax) tscmax = tscstop-tscstart;

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,7 @@ endif
endif
libgstresample_la_SOURCES = dtos.c functable.c resample.c resample.h
libgstresample_la_LIBADD = $(GST_LIBS)
libgstresample_la_LIBADD =
libgstresample_la_CFLAGS = $(GST_CFLAGS) -ffast-math $(ARCHCFLAGS)
libgstresample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -23,13 +23,13 @@
#include <stdio.h>
#include <stdlib.h>
//#include <ml.h>
/*#include <ml.h> */
#include <resample.h>
#define short_to_double_table
//#define short_to_double_altivec
/*#define short_to_double_altivec */
#define short_to_double_unroll
#ifdef short_to_double_table

View file

@ -124,12 +124,12 @@ double functable_eval(functable_t *t,double x)
w0 = (x - 2 * x2 + x3) * t->offset;
w1 = (-x2 + x3) * t->offset;
//printf("i=%d x=%g f0=%g f1=%g w0=%g w1=%g\n",i,x,f0,f1,w0,w1);
/*printf("i=%d x=%g f0=%g f1=%g w0=%g w1=%g\n",i,x,f0,f1,w0,w1); */
w = t->fx[i] * f0 + t->fx[i + 1] * f1 +
t->fdx[i] * w0 + t->fdx[i + 1] * w1;
//w = t->fx[i] * (1-x) + t->fx[i+1] * x;
/*w = t->fx[i] * (1-x) + t->fx[i+1] * x; */
return w;
}
@ -266,37 +266,37 @@ void functable_fir2_altivec(functable_t *t, float *r0, float *r1,
sum0 = 0;
sum1 = 0;
for(j=0;j<len;j++){
// t->fx, t->fdx needs to be multiplexed by n
// we need 5 consecutive floats, which fit into 2 vecs
// load v0, t->fx[i]
// load v1, t->fx[i+n]
// v2 = v0 (not correct)
// v3 = (v0>>32) || (v1<<3*32) (not correct)
//
// load v4, t->dfx[i]
// load v5, t->dfx[i+n]
// v6 = v4 (not correct)
// v7 = (v4>>32) || (v5<<3*32) (not correct)
//
// v8 = splat(f0)
// v9 = splat(f1)
// v10 = splat(w0)
// v11 = splat(w1)
//
// v12 = v2 * v8
// v12 += v3 * v9
// v12 += v6 * v10
// v12 += v7 * v11
/* t->fx, t->fdx needs to be multiplexed by n */
/* we need 5 consecutive floats, which fit into 2 vecs */
/* load v0, t->fx[i] */
/* load v1, t->fx[i+n] */
/* v2 = v0 (not correct) */
/* v3 = (v0>>32) || (v1<<3*32) (not correct) */
/* */
/* load v4, t->dfx[i] */
/* load v5, t->dfx[i+n] */
/* v6 = v4 (not correct) */
/* v7 = (v4>>32) || (v5<<3*32) (not correct) */
/* */
/* v8 = splat(f0) */
/* v9 = splat(f1) */
/* v10 = splat(w0) */
/* v11 = splat(w1) */
/* */
/* v12 = v2 * v8 */
/* v12 += v3 * v9 */
/* v12 += v6 * v10 */
/* v12 += v7 * v11 */
w = t->fx[i] * f0 + t->fx[i + 1] * f1 +
t->fdx[i] * w0 + t->fdx[i + 1] * w1;
// v13 = data[j*2]
// v14 = data[j*2+4]
// v15 = deinterlace_high(v13,v14)
// v16 = deinterlace_low(v13,v14)
// (sum0) v17 += multsum(v13,v15)
// (sum1) v18 += multsum(v14,v16)
/* v13 = data[j*2] */
/* v14 = data[j*2+4] */
/* v15 = deinterlace_high(v13,v14) */
/* v16 = deinterlace_low(v13,v14) */
/* (sum0) v17 += multsum(v13,v15) */
/* (sum1) v18 += multsum(v14,v16) */
sum0 += data[j*2] * w;
sum1 += data[j*2+1] * w;

View file

@ -243,7 +243,7 @@ void resample_bilinear(resample_t * r)
b = r->i_start;
for (i = 0; i < r->i_samples; i++) {
b += r->i_inc;
//printf("in %d\n",i_ptr[0]);
/*printf("in %d\n",i_ptr[0]); */
if(b>=2){
printf("not expecting b>=2\n");
}
@ -252,7 +252,7 @@ void resample_bilinear(resample_t * r)
acc1 += (1.0 - (b-r->i_inc)) * i_ptr[1];
o_ptr[0] = rint(acc0);
//printf("out %d\n",o_ptr[0]);
/*printf("out %d\n",o_ptr[0]); */
o_ptr[1] = rint(acc1);
o_ptr += 2;
o_count++;
@ -319,8 +319,8 @@ void resample_sinc_slow(resample_t * r)
c1 = 0;
for (j = 0; j < r->filter_length; j++) {
weight = (x==0)?1:(sinx/x);
//printf("j %d sin %g cos %g\n",j,sinx,cosx);
//printf("j %d sin %g x %g sinc %g\n",j,sinx,x,weight);
/*printf("j %d sin %g cos %g\n",j,sinx,cosx); */
/*printf("j %d sin %g x %g sinc %g\n",j,sinx,x,weight); */
c0 += weight * GETBUF((start + j), 0);
c1 += weight * GETBUF((start + j), 1);
t = cosx * cosd - sinx * sind;
@ -368,11 +368,11 @@ void resample_sinc(resample_t * r)
for (i = 0; i < r->o_samples; i++) {
a = r->o_start + i * r->o_inc;
start = floor(a - r->halftaps);
//printf("%d: a=%g start=%d end=%d\n",i,a,start,start+r->filter_length-1);
/*printf("%d: a=%g start=%d end=%d\n",i,a,start,start+r->filter_length-1); */
center = a;
//x = M_PI * (start - center) * r->o_inc;
//d = M_PI * r->o_inc;
//x = (start - center) * r->o_inc;
/*x = M_PI * (start - center) * r->o_inc; */
/*d = M_PI * r->o_inc; */
/*x = (start - center) * r->o_inc; */
x0 = (start - center) * r->o_inc;
d = r->o_inc;
c0 = 0;
@ -439,20 +439,20 @@ static void resample_sinc_ft(resample_t * r)
double *ptr;
signed short *o_ptr;
int i;
//int j;
/*int j; */
double c0, c1;
//double a;
/*double a; */
double start_f, start_x;
int start;
double center;
//double weight;
/*double weight; */
double x, d;
double scale;
int n = 4;
scale = r->i_inc; // cutoff at 22050
//scale = 1.0; // cutoff at 24000
//scale = r->i_inc * 0.5; // cutoff at 11025
scale = r->i_inc; /* cutoff at 22050 */
/*scale = 1.0; // cutoff at 24000 */
/*scale = r->i_inc * 0.5; // cutoff at 11025 */
if(!ft){
ft = malloc(sizeof(*ft));
@ -472,7 +472,7 @@ static void resample_sinc_ft(resample_t * r)
functable_init(ft);
//printf("len=%d offset=%g start=%g\n",ft->len,ft->offset,ft->start);
/*printf("len=%d offset=%g start=%g\n",ft->len,ft->offset,ft->start); */
}
ptr = r->buffer;
@ -484,18 +484,18 @@ static void resample_sinc_ft(resample_t * r)
start_x -= start_f;
start = start_f;
for (i = 0; i < r->o_samples; i++) {
//start_f = floor(center - r->halftaps);
//printf("%d: a=%g start=%d end=%d\n",i,a,start,start+r->filter_length-1);
/*start_f = floor(center - r->halftaps); */
/*printf("%d: a=%g start=%d end=%d\n",i,a,start,start+r->filter_length-1); */
x = start_f - center;
d = 1;
c0 = 0;
c1 = 0;
//#define slow
/*#define slow */
#ifdef slow
for (j = 0; j < r->filter_length; j++) {
weight = functable_eval(ft,x)*scale;
//weight = sinc(M_PI * scale * x)*scale*r->i_inc;
//weight *= window_func(x / r->halftaps);
/*weight = sinc(M_PI * scale * x)*scale*r->i_inc; */
/*weight *= window_func(x / r->halftaps); */
c0 += weight * ptr[(start + j + r->filter_length)*2 + 0];
c1 += weight * ptr[(start + j + r->filter_length)*2 + 1];
x += d;

View file

@ -9,11 +9,11 @@
#define AMP 16000
#define I_RATE 48000
#define O_RATE 44100
//#define O_RATE 24000
/*#define O_RATE 24000 */
//#define test_func(x) 1
//#define test_func(x) sin(2*M_PI*(x)*10)
//#define test_func(x) sin(2*M_PI*(x)*(x)*1000)
/*#define test_func(x) 1 */
/*#define test_func(x) sin(2*M_PI*(x)*10) */
/*#define test_func(x) sin(2*M_PI*(x)*(x)*1000) */
#define test_func(x) sin(2*M_PI*(x)*(x)*12000)
short i_buf[I_RATE*2*2];
@ -53,7 +53,7 @@ struct timeval start_time;
void start_timer(void)
{
gettimeofday(&start_time,NULL);
//printf("start %ld.%06ld\n",start_time.tv_sec,start_time.tv_usec);
/*printf("start %ld.%06ld\n",start_time.tv_sec,start_time.tv_usec); */
}
void end_timer(void)
@ -62,7 +62,7 @@ void end_timer(void)
double diff;
gettimeofday(&end_time,NULL);
//printf("end %ld.%06ld\n",end_time.tv_sec,end_time.tv_usec);
/*printf("end %ld.%06ld\n",end_time.tv_sec,end_time.tv_usec); */
diff = (end_time.tv_sec - start_time.tv_sec) +
1e-6*(end_time.tv_usec - start_time.tv_usec);
@ -81,7 +81,7 @@ void test_res1(void)
for(i=0;i<I_RATE;i++){
i_buf[i*2+0] = rint(AMP * test_func((double)i/I_RATE));
//i_buf[i*2+1] = rint(AMP * test_func((double)i/I_RATE));
/*i_buf[i*2+1] = rint(AMP * test_func((double)i/I_RATE)); */
i_buf[i*2+1] = (i<1000)?AMP:0;
}
@ -90,10 +90,10 @@ void test_res1(void)
r->i_rate = I_RATE;
r->o_rate = O_RATE;
//r->method = RESAMPLE_SINC_SLOW;
/*r->method = RESAMPLE_SINC_SLOW; */
r->method = RESAMPLE_SINC;
r->channels = 2;
//r->verbose = 1;
/*r->verbose = 1; */
r->filter_length = 64;
r->get_buffer = get_buffer;
@ -115,7 +115,7 @@ void test_res1(void)
for(i=0;i<O_RATE;i++){
f = AMP*test_func((double)i/O_RATE);
//f = rint(AMP*test_func((double)i/O_RATE));
/*f = rint(AMP*test_func((double)i/O_RATE)); */
fprintf(out,"%d %d %d %g %g\n",i,
o_buf[2*i+0],o_buf[2*i+1],
f,o_buf[2*i+0]-f);
@ -127,7 +127,7 @@ void test_res1(void)
n22k=0;
for(i=0;i<O_RATE;i++){
f = AMP*test_func((double)i/O_RATE);
//f = rint(AMP*test_func((double)i/O_RATE));
/*f = rint(AMP*test_func((double)i/O_RATE)); */
x = o_buf[2*i+0]-f;
if(((0.5*i)/O_RATE*I_RATE)<10000){
sum10k += x*x;
@ -219,8 +219,8 @@ double sinc_poly(double x)
- x2 * INV3FAC
+ x2 * x2 * INV5FAC
- x2 * x2 * x2 * INV7FAC;
//+ x2 * x2 * x2 * x2 * INV9FAC
//- x2 * x2 * x2 * x2 * x2 * INV11FAC;
/*+ x2 * x2 * x2 * x2 * INV9FAC */
/*- x2 * x2 * x2 * x2 * x2 * INV11FAC; */
}
void test_res4(void)
@ -297,10 +297,10 @@ void test_res7(void)
r->i_rate = I_RATE;
r->o_rate = O_RATE;
//r->method = RESAMPLE_SINC_SLOW;
/*r->method = RESAMPLE_SINC_SLOW; */
r->method = RESAMPLE_SINC;
r->channels = 1;
//r->verbose = 1;
/*r->verbose = 1; */
r->filter_length = 64;
r->get_buffer = get_buffer;
@ -322,7 +322,7 @@ void test_res7(void)
for(i=0;i<O_RATE;i++){
f = AMP*test_func((double)i/O_RATE);
//f = rint(AMP*test_func((double)i/O_RATE));
/*f = rint(AMP*test_func((double)i/O_RATE)); */
fprintf(out,"%d %d %d %g %g\n",i,
o_buf[i],0,
f,o_buf[i]-f);
@ -334,7 +334,7 @@ void test_res7(void)
n22k=0;
for(i=0;i<O_RATE;i++){
f = AMP*test_func((double)i/O_RATE);
//f = rint(AMP*test_func((double)i/O_RATE));
/*f = rint(AMP*test_func((double)i/O_RATE)); */
x = o_buf[i]-f;
if(((0.5*i)/O_RATE*I_RATE)<10000){
sum10k += x*x;

View file

@ -7,6 +7,6 @@ libgstriff_la_SOURCES = riffparse.c riffencode.c riffutil.c
libgstriffincludedir = $(includedir)/gst/riff
libgstriffinclude_HEADERS = riff.h
libgstriff_la_LIBADD = $(GST_LIBS)
libgstriff_la_LIBADD =
libgstriff_la_CFLAGS = $(GST_CFLAGS) -funroll-all-loops -finline-functions -ffast-math
libgstriff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -20,7 +20,7 @@
#include <riff.h>
//#define debug(format,args...) g_print(format,##args)
/*#define debug(format,args...) g_print(format,##args) */
#define debug(format,args...)
@ -69,33 +69,33 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
GST_BUFFER_DATA(buf) = riff->dataleft;
GST_BUFFER_SIZE(buf) = newsize;
off -= riff->dataleft_size;
//last -= riff->dataleft_size;
/*last -= riff->dataleft_size; */
riff->dataleft = NULL;
}
if (off == 0) {
guint32 *words = (guin32 *)GST_BUFFER_DATA(buf);
// don't even try to parse the head if it's not there FIXME
/* don't even try to parse the head if it's not there FIXME */
if (last < 12) {
riff->state = GST_RIFF_ENOTRIFF;
return riff->state;
}
//g_print("testing is 0x%08lx '%s'\n",words[0],gst_riff_id_to_fourcc(words[0]));
/*g_print("testing is 0x%08lx '%s'\n",words[0],gst_riff_id_to_fourcc(words[0])); */
/* verify this is a valid RIFF file, first of all */
if (GUINT32_FROM_LE (words[0]) != GST_RIFF_TAG_RIFF) {
riff->state = GST_RIFF_ENOTRIFF;
return riff->state;
}
riff->form = GUINT32_FROM_LE (words[2]);
//g_print("form is 0x%08lx '%s'\n",words[2],gst_riff_id_to_fourcc(words[2]));
/*g_print("form is 0x%08lx '%s'\n",words[2],gst_riff_id_to_fourcc(words[2])); */
riff->nextlikely = 12; /* skip 'RIFF', length, and form */
// all OK here
/* all OK here */
riff->incomplete_chunk = NULL;
}
// if we have an incomplete chunk from the previous buffer
/* if we have an incomplete chunk from the previous buffer */
if (riff->incomplete_chunk) {
guint leftover;
debug("have incomplete chunk %08x filled\n", riff->incomplete_chunk_size);
@ -135,14 +135,14 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
while ((riff->nextlikely+12) <= last) {
guin32 *words = (guin32 *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off );
// loop over all of the chunks to check which one is finished
/* loop over all of the chunks to check which one is finished */
while (riff->chunks) {
chunk = g_list_nth_data(riff->chunks, 0);
debug("next 0x%08x offset 0x%08lx size 0x%08x\n",riff->nextlikely, chunk->offset, chunk->size);
if (riff->nextlikely >= chunk->offset+chunk->size) {
//g_print("found END LIST\n");
// we have the end of the chunk on the stack, remove it
/*g_print("found END LIST\n"); */
/* we have the end of the chunk on the stack, remove it */
riff->chunks = g_list_remove(riff->chunks, chunk);
}
else break;
@ -157,17 +157,17 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
chunk->id = GUINT32_FROM_LE (words[0]));
chunk->size = GUINT32_FROM_LE (words[1]);
chunk->data = (gchar *)(words+2);
// we need word alignment
//if (chunk->size & 0x01) chunk->size++;
/* we need word alignment */
/*if (chunk->size & 0x01) chunk->size++; */
chunk->form = GUINT32_FROM_LE (words[2]); /* fill in the form, might not be valid */
if (chunk->id == GST_RIFF_TAG_LIST) {
//g_print("found LIST %s\n", gst_riff_id_to_fourcc(chunk->form));
/*g_print("found LIST %s\n", gst_riff_id_to_fourcc(chunk->form)); */
riff->nextlikely += 12;
// we push the list chunk on our 'stack'
/* we push the list chunk on our 'stack' */
riff->chunks = g_list_prepend(riff->chunks,chunk);
// send the buffer to the listener if we have received a function
/* send the buffer to the listener if we have received a function */
if (riff->new_tag_found) {
riff->new_tag_found(chunk, riff->callback_data);
}
@ -178,25 +178,25 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1]));
riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */
// if this buffer is incomplete
/* if this buffer is incomplete */
if (riff->nextlikely > last) {
guint left = size - (riff->nextlikely - chunk->size - off);
//g_print("make incomplete buffer %08x\n", left);
/*g_print("make incomplete buffer %08x\n", left); */
chunk->data = g_malloc(chunk->size);
memcpy(chunk->data, (gchar *)(words+2), left);
riff->incomplete_chunk = chunk;
riff->incomplete_chunk_size = left;
}
else {
// send the buffer to the listener if we have received a function
/* send the buffer to the listener if we have received a function */
if (riff->new_tag_found) {
riff->new_tag_found(chunk, riff->callback_data);
}
g_free(chunk);
}
//riff->chunks = g_list_prepend(riff->chunks,chunk);
/*riff->chunks = g_list_prepend(riff->chunks,chunk); */
}
}

View file

@ -19,7 +19,7 @@
#include <string.h>
//#define DEBUG_ENABLED
/*#define DEBUG_ENABLED */
#include "riff.h"
#define GST_RIFF_ENCODER_BUF_SIZE 1024

View file

@ -19,7 +19,7 @@
#include <string.h>
//#define DEBUG_ENABLED
/*#define DEBUG_ENABLED */
#include <riff.h>
GstRiff*
@ -71,33 +71,33 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
GST_BUFFER_DATA(buf) = riff->dataleft;
size = GST_BUFFER_SIZE(buf) = newsize;
off -= riff->dataleft_size;
//last -= riff->dataleft_size;
/*last -= riff->dataleft_size; */
riff->dataleft = NULL;
}
if (off == 0) {
guint32 *words = (guint32 *)GST_BUFFER_DATA(buf);
// don't even try to parse the head if it's not there FIXME
/* don't even try to parse the head if it's not there FIXME */
if (last < 12) {
riff->state = GST_RIFF_ENOTRIFF;
return riff->state;
}
//g_print("testing is 0x%08lx '%s'\n",words[0],gst_riff_id_to_fourcc(words[0]));
/*g_print("testing is 0x%08lx '%s'\n",words[0],gst_riff_id_to_fourcc(words[0])); */
/* verify this is a valid RIFF file, first of all */
if (GUINT32_FROM_LE (words[0]) != GST_RIFF_TAG_RIFF) {
riff->state = GST_RIFF_ENOTRIFF;
return riff->state;
}
riff->form = GUINT32_FROM_LE (words[2]);
//g_print("form is 0x%08lx '%s'\n",words[2],gst_riff_id_to_fourcc(words[2]));
/*g_print("form is 0x%08lx '%s'\n",words[2],gst_riff_id_to_fourcc(words[2])); */
riff->nextlikely = 12; /* skip 'RIFF', length, and form */
// all OK here
/* all OK here */
riff->incomplete_chunk = NULL;
}
// if we have an incomplete chunk from the previous buffer
/* if we have an incomplete chunk from the previous buffer */
if (riff->incomplete_chunk) {
guint leftover;
GST_DEBUG (0,"gst_riff_parser: have incomplete chunk %08x filled\n", riff->incomplete_chunk_size);
@ -130,7 +130,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
while ((riff->nextlikely+12) <= last) {
guint32 *words = (guint32 *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off );
// loop over all of the chunks to check which one is finished
/* loop over all of the chunks to check which one is finished */
while (riff->chunks) {
chunk = g_list_nth_data(riff->chunks, 0);
@ -138,7 +138,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
chunk->offset, chunk->size);
if (riff->nextlikely >= chunk->offset+chunk->size) {
GST_DEBUG (0,"gst_riff_parser: found END LIST\n");
// we have the end of the chunk on the stack, remove it
/* we have the end of the chunk on the stack, remove it */
riff->chunks = g_list_remove(riff->chunks, chunk);
}
else break;
@ -153,17 +153,17 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
chunk->id = GUINT32_FROM_LE (words[0]);
chunk->size = GUINT32_FROM_LE (words[1]);
chunk->data = (gchar *)(words+2);
// we need word alignment
//if (chunk->size & 0x01) chunk->size++;
/* we need word alignment */
/*if (chunk->size & 0x01) chunk->size++; */
chunk->form = GUINT32_FROM_LE (words[2]); /* fill in the form, might not be valid */
if (chunk->id == GST_RIFF_TAG_LIST) {
GST_DEBUG (0,"found LIST %s\n", gst_riff_id_to_fourcc(chunk->form));
riff->nextlikely += 12;
// we push the list chunk on our 'stack'
/* we push the list chunk on our 'stack' */
riff->chunks = g_list_prepend(riff->chunks,chunk);
// send the buffer to the listener if we have received a function
/* send the buffer to the listener if we have received a function */
if (riff->new_tag_found) {
riff->new_tag_found(chunk, riff->callback_data);
}
@ -175,7 +175,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
gst_riff_id_to_fourcc(GUINT32_FROM_LE (words[0])), GUINT32_FROM_LE (words[1]));
riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */
// if this buffer is incomplete
/* if this buffer is incomplete */
if (riff->nextlikely > last) {
guint left = size - (riff->nextlikely - chunk->size - off);
@ -186,7 +186,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
riff->incomplete_chunk_size = left;
}
else {
// send the buffer to the listener if we have received a function
/* send the buffer to the listener if we have received a function */
if (riff->new_tag_found) {
riff->new_tag_found(chunk, riff->callback_data);
}
@ -194,7 +194,7 @@ gst_riff_parser_next_buffer (GstRiff *riff, GstBuffer *buf, gulong off)
}
if (riff->nextlikely & 0x01) riff->nextlikely++;
//riff->chunks = g_list_prepend(riff->chunks,chunk);
/*riff->chunks = g_list_prepend(riff->chunks,chunk); */
}
}
if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) {

View file

@ -20,7 +20,7 @@
#include <riff.h>
//#define debug(format,args...) g_print(format,##args)
/*#define debug(format,args...) g_print(format,##args) */
#define debug(format,args...)

View file

@ -2,5 +2,5 @@ plugindir = $(libdir)/gst
plugin_LTLIBRARIES = libchart.la
libchart_la_SOURCES = gstchart.c
libchart_la_CFLAGS = $(GST_CFLAGS)
libchart_la_LIBADD = $(GST_LIBS)
libchart_la_LIBADD =
libchart_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View file

@ -36,10 +36,10 @@ struct _GstChart {
GstPad *sinkpad,*srcpad;
GstBufferPool *peerpool;
// the timestamp of the next frame
/* the timestamp of the next frame */
guint64 next_time;
// video state
/* video state */
gint bpp;
gint depth;
gint width;
@ -47,9 +47,9 @@ struct _GstChart {
gboolean first_buffer;
gint samplerate;
gint framerate; // desired frame rate
gint samples_between_frames; // number of samples between start of successive frames
gint samples_since_last_frame; // number of samples between start of successive frames
gint framerate; /* desired frame rate */
gint samples_between_frames; /* number of samples between start of successive frames */
gint samples_since_last_frame; /* number of samples between start of successive frames */
};
struct _GstChartClass {
@ -217,7 +217,7 @@ gst_chart_init (GstChart *chart)
chart->next_time = 0;
chart->peerpool = NULL;
// reset the initial video state
/* reset the initial video state */
chart->bpp = 16;
chart->depth = 16;
chart->first_buffer = TRUE;
@ -225,8 +225,8 @@ gst_chart_init (GstChart *chart)
chart->height = 128;
chart->samplerate = -1;
chart->framerate = 25; // desired frame rate
chart->samples_between_frames = 0; // number of samples between start of successive frames
chart->framerate = 25; /* desired frame rate */
chart->samples_between_frames = 0; /* number of samples between start of successive frames */
chart->samples_since_last_frame = 0;
}
@ -241,8 +241,8 @@ gst_chart_sinkconnect (GstPad *pad, GstCaps *caps)
GST_DEBUG (0, "CHART: new sink caps: rate %d\n",
chart->samplerate);
//gst_chart_sync_parms (chart);
//
/*gst_chart_sync_parms (chart); */
/* */
return GST_PAD_CONNECT_OK;
}
@ -333,9 +333,9 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
if (chart->samples_between_frames <= chart->samples_since_last_frame) {
chart->samples_since_last_frame = 0;
// get data to draw into buffer
/* get data to draw into buffer */
if (samples_in >= chart->width) {
// make a new buffer for the output
/* make a new buffer for the output */
bufout = gst_buffer_new ();
sizeout = chart->bpp / 8 * chart->width * chart->height;
dataout = g_malloc (sizeout);
@ -344,16 +344,16 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
GST_DEBUG (0, "CHART: made new buffer: size %d, width %d, height %d\n",
sizeout, chart->width, chart->height);
// take data and draw to new buffer
// FIXME: call different routines for different properties
/* take data and draw to new buffer */
/* FIXME: call different routines for different properties */
draw_chart_16bpp(dataout, chart->width, chart->height, (gint16 *)datain, samples_in);
gst_buffer_unref(bufin);
// set timestamp
/* set timestamp */
GST_BUFFER_TIMESTAMP (bufout) = chart->next_time;
// Check if we need to renegotiate size.
/* Check if we need to renegotiate size. */
if (chart->first_buffer) {
GST_DEBUG (0, "making new pad\n");
if (!gst_pad_try_set_caps (chart->srcpad,
@ -378,7 +378,7 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
}
GST_DEBUG (0, "CHART: outputting buffer\n");
// output buffer
/* output buffer */
GST_BUFFER_FLAG_SET (bufout, GST_BUFFER_READONLY);
gst_pad_push (chart->srcpad, bufout);
}

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstdeinterlace.la
libgstdeinterlace_la_SOURCES = gstdeinterlace.c
libgstdeinterlace_la_CFLAGS = $(GST_CFLAGS)
libgstdeinterlace_la_LIBADD = $(GST_LIBS)
libgstdeinterlace_la_LIBADD =
libgstdeinterlace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstdeinterlace.h

View file

@ -86,7 +86,7 @@ static void gst_deinterlace_get_property (GObject *object, guint prop_id,
static void gst_deinterlace_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
static GType
gst_deinterlace_get_type(void) {
@ -121,16 +121,16 @@ gst_deinterlace_class_init (GstDeInterlaceClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DI_ONLY,
g_param_spec_boolean("di_area_only","di_area_only","di_area_only",
TRUE,G_PARAM_READWRITE)); // CHECKME
TRUE,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BLEND,
g_param_spec_boolean("blend","blend","blend",
TRUE,G_PARAM_READWRITE)); // CHECKME
TRUE,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_THRESHOLD,
g_param_spec_int("threshold","threshold","threshold",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_EDGE_DETECT,
g_param_spec_int("edge_detect","edge_detect","edge_detect",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_deinterlace_set_property;
gobject_class->get_property = gst_deinterlace_get_property;
@ -174,7 +174,7 @@ gst_deinterlace_init (GstDeInterlace *filter)
filter->show_deinterlaced_area_only = FALSE;
filter->blend = FALSE;
//filter->threshold_blend = 0;
/*filter->threshold_blend = 0; */
filter->threshold = 50;
filter->edge_detect = 25;
@ -215,21 +215,21 @@ gst_deinterlace_chain (GstPad *pad, GstBuffer *buf)
memcpy(filter->src, yuvptr, filter->picsize);
y_dst = yuvptr; // dst y pointer
// we should not change u,v because one u, v value stands for
// 2 pixels per 2 lines = 4 pixel and we don't want to change
// the color of
y_dst = yuvptr; /* dst y pointer */
/* we should not change u,v because one u, v value stands for */
/* 2 pixels per 2 lines = 4 pixel and we don't want to change */
/* the color of */
y_line = width;
y_src = src;
iThreshold = iThreshold * iThreshold * 4;
// We don't want an integer overflow in the interlace calculation.
/* We don't want an integer overflow in the interlace calculation. */
if (iEdgeDetect > 180)
iEdgeDetect = 180;
iEdgeDetect = iEdgeDetect * iEdgeDetect;
y1 = 0; // Avoid compiler warning. The value is not used.
y1 = 0; /* Avoid compiler warning. The value is not used. */
for (x = 0; x < width; x++) {
psrc3 = y_src + x;
y3 = *psrc3;
@ -264,24 +264,24 @@ gst_deinterlace_chain (GstPad *pad, GstBuffer *buf)
if (bBlend) {
*pdst1 = (unsigned char)((y0 + 2*y1 + y2) >> 2);
} else {
// this method seems to work better than blending if the
// quality is pretty bad and the half pics don't fit together
if ((y % 2)==1) { // if odd simply copy the value
/* this method seems to work better than blending if the */
/* quality is pretty bad and the half pics don't fit together */
if ((y % 2)==1) { /* if odd simply copy the value */
*pdst1 = *psrc1;
//*pdst1 = 0; // FIXME this is for adjusting an initial iThreshold
} else { // even interpolate the even line (upper + lower)/2
/**pdst1 = 0; // FIXME this is for adjusting an initial iThreshold */
} else { /* even interpolate the even line (upper + lower)/2 */
*pdst1 = (unsigned char)((y0 + y2) >> 1);
//*pdst1 = 0; // FIXME this is for adjusting an initial iThreshold
/**pdst1 = 0; // FIXME this is for adjusting an initial iThreshold */
}
}
} else {
// so we went below the treshold and therefore we don't have to
// change anything
/* so we went below the treshold and therefore we don't have to */
/* change anything */
if (bShowDeinterlacedAreaOnly) {
// this is for testing to see how we should tune the treshhold
// and shows as the things that haven't change because the
// threshhold was to low?? (or shows that everything is ok :-)
*pdst1 = 0; // blank the point and so the interlac area
/* this is for testing to see how we should tune the treshhold */
/* and shows as the things that haven't change because the */
/* threshhold was to low?? (or shows that everything is ok :-) */
*pdst1 = 0; /* blank the point and so the interlac area */
} else {
*pdst1 = *psrc1;
}

View file

@ -24,7 +24,7 @@
#include <config.h>
#include <gst/gst.h>
// #include <gst/meta/audioraw.h>
/* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus
@ -55,8 +55,8 @@ struct _GstDeInterlace {
gboolean show_deinterlaced_area_only;
gboolean blend;
gint threshold_blend; // here we start blending
gint threshold; // here we start interpolating TODO FIXME
gint threshold_blend; /* here we start blending */
gint threshold; /* here we start interpolating TODO FIXME */
gint edge_detect;
gint picsize;

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstflxdec.la
libgstflxdec_la_SOURCES = gstflxdec.c flx_color.c
libgstflxdec_la_CFLAGS = $(GST_CFLAGS)
libgstflxdec_la_LIBADD = $(GST_LIBS)
libgstflxdec_la_LIBADD =
libgstflxdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = flx_fmt.h flx_color.h gstflxdec.h

View file

@ -6,7 +6,7 @@ plugin_LTLIBRARIES = libgstmodplug.la
libgstmodplug_la_SOURCES = gstmodplug.cc
libgstmodplug_la_CXXFLAGS = $(GST_CFLAGS)
libgstmodplug_la_LIBADD = $(GST_LIBS) libmodplug/libmodplug.la
libgstmodplug_la_LIBADD = libmodplug/libmodplug.la
libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmodplug.h

View file

@ -5,9 +5,9 @@
typedef struct tagITFILEHEADER
{
DWORD id; // 0x4D504D49
DWORD id; /* 0x4D504D49 */
CHAR songname[26];
WORD reserved1; // 0x1004
WORD reserved1; /* 0x1004 */
WORD ordnum;
WORD insnum;
WORD smpnum;
@ -42,11 +42,11 @@ typedef struct tagITENVELOPE
BYTE reserved;
} ITENVELOPE;
// Old Impulse Instrument Format (cmwt < 0x200)
/* Old Impulse Instrument Format (cmwt < 0x200) */
typedef struct tagITOLDINSTRUMENT
{
DWORD id; // IMPI = 0x49504D49
CHAR filename[12]; // DOS file name
DWORD id; /* IMPI = 0x49504D49 */
CHAR filename[12]; /* DOS file name */
BYTE zero;
BYTE flags;
BYTE vls;
@ -68,7 +68,7 @@ typedef struct tagITOLDINSTRUMENT
} ITOLDINSTRUMENT;
// Impulse Instrument Format
/* Impulse Instrument Format */
typedef struct tagITINSTRUMENT
{
DWORD id;
@ -97,14 +97,14 @@ typedef struct tagITINSTRUMENT
ITENVELOPE volenv;
ITENVELOPE panenv;
ITENVELOPE pitchenv;
BYTE dummy[4]; // was 7, but IT v2.17 saves 554 bytes
BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
} ITINSTRUMENT;
// IT Sample Format
/* IT Sample Format */
typedef struct ITSAMPLESTRUCT
{
DWORD id; // 0x53504D49
DWORD id; /* 0x53504D49 */
CHAR filename[12];
BYTE zero;
BYTE gvl;

View file

@ -64,13 +64,13 @@ typedef const BYTE * LPCBYTE;
#define MOD_TYPE_AMF0 0x200000
#define MOD_TYPE_PSM 0x400000
#define MOD_TYPE_J2B 0x800000
#define MOD_TYPE_UMX 0x80000000 // Fake type
#define MOD_TYPE_UMX 0x80000000 /* Fake type */
#define MAX_MODTYPE 23
// Channel flags:
// Bits 0-7: Sample Flags
/* Channel flags: */
/* Bits 0-7: Sample Flags */
#define CHN_16BIT 0x01
#define CHN_LOOP 0x02
#define CHN_PINGPONGLOOP 0x04
@ -79,7 +79,7 @@ typedef const BYTE * LPCBYTE;
#define CHN_PANNING 0x20
#define CHN_STEREO 0x40
#define CHN_PINGPONGFLAG 0x80
// Bits 8-31: Channel Flags
/* Bits 8-31: Channel Flags */
#define CHN_MUTE 0x100
#define CHN_KEYOFF 0x200
#define CHN_NOTEFADE 0x400
@ -151,7 +151,7 @@ typedef const BYTE * LPCBYTE;
#define CMD_MIDI 31
// Volume Column commands
/* Volume Column commands */
#define VOLCMD_VOLUME 1
#define VOLCMD_PANNING 2
#define VOLCMD_VOLSLIDEUP 3
@ -169,72 +169,72 @@ typedef const BYTE * LPCBYTE;
#define RSF_16BIT 0x04
#define RSF_STEREO 0x08
#define RS_PCM8S 0 // 8-bit signed
#define RS_PCM8U 1 // 8-bit unsigned
#define RS_PCM8D 2 // 8-bit delta values
#define RS_ADPCM4 3 // 4-bit ADPCM-packed
#define RS_PCM16D 4 // 16-bit delta values
#define RS_PCM16S 5 // 16-bit signed
#define RS_PCM16U 6 // 16-bit unsigned
#define RS_PCM16M 7 // 16-bit motorola order
#define RS_STPCM8S (RS_PCM8S|RSF_STEREO) // stereo 8-bit signed
#define RS_STPCM8U (RS_PCM8U|RSF_STEREO) // stereo 8-bit unsigned
#define RS_STPCM8D (RS_PCM8D|RSF_STEREO) // stereo 8-bit delta values
#define RS_STPCM16S (RS_PCM16S|RSF_STEREO) // stereo 16-bit signed
#define RS_STPCM16U (RS_PCM16U|RSF_STEREO) // stereo 16-bit unsigned
#define RS_STPCM16D (RS_PCM16D|RSF_STEREO) // stereo 16-bit delta values
#define RS_STPCM16M (RS_PCM16M|RSF_STEREO) // stereo 16-bit signed big endian
// IT 2.14 compressed samples
#define RS_PCM8S 0 /* 8-bit signed */
#define RS_PCM8U 1 /* 8-bit unsigned */
#define RS_PCM8D 2 /* 8-bit delta values */
#define RS_ADPCM4 3 /* 4-bit ADPCM-packed */
#define RS_PCM16D 4 /* 16-bit delta values */
#define RS_PCM16S 5 /* 16-bit signed */
#define RS_PCM16U 6 /* 16-bit unsigned */
#define RS_PCM16M 7 /* 16-bit motorola order */
#define RS_STPCM8S (RS_PCM8S|RSF_STEREO) /* stereo 8-bit signed */
#define RS_STPCM8U (RS_PCM8U|RSF_STEREO) /* stereo 8-bit unsigned */
#define RS_STPCM8D (RS_PCM8D|RSF_STEREO) /* stereo 8-bit delta values */
#define RS_STPCM16S (RS_PCM16S|RSF_STEREO) /* stereo 16-bit signed */
#define RS_STPCM16U (RS_PCM16U|RSF_STEREO) /* stereo 16-bit unsigned */
#define RS_STPCM16D (RS_PCM16D|RSF_STEREO) /* stereo 16-bit delta values */
#define RS_STPCM16M (RS_PCM16M|RSF_STEREO) /* stereo 16-bit signed big endian */
/* IT 2.14 compressed samples */
#define RS_IT2148 0x10
#define RS_IT21416 0x14
#define RS_IT2158 0x12
#define RS_IT21516 0x16
// AMS Packed Samples
/* AMS Packed Samples */
#define RS_AMS8 0x11
#define RS_AMS16 0x15
// DMF Huffman compression
/* DMF Huffman compression */
#define RS_DMF8 0x13
#define RS_DMF16 0x17
// MDL Huffman compression
/* MDL Huffman compression */
#define RS_MDL8 0x20
#define RS_MDL16 0x24
#define RS_PTM8DTO16 0x25
// Stereo Interleaved Samples
#define RS_STIPCM8S (RS_PCM8S|0x40|RSF_STEREO) // stereo 8-bit signed
#define RS_STIPCM8U (RS_PCM8U|0x40|RSF_STEREO) // stereo 8-bit unsigned
#define RS_STIPCM16S (RS_PCM16S|0x40|RSF_STEREO) // stereo 16-bit signed
#define RS_STIPCM16U (RS_PCM16U|0x40|RSF_STEREO) // stereo 16-bit unsigned
#define RS_STIPCM16M (RS_PCM16M|0x40|RSF_STEREO) // stereo 16-bit signed big endian
// 24-bit signed
#define RS_PCM24S (RS_PCM16S|0x80) // mono 24-bit signed
#define RS_STIPCM24S (RS_PCM16S|0x80|RSF_STEREO) // stereo 24-bit signed
#define RS_PCM32S (RS_PCM16S|0xC0) // mono 24-bit signed
#define RS_STIPCM32S (RS_PCM16S|0xC0|RSF_STEREO) // stereo 24-bit signed
/* Stereo Interleaved Samples */
#define RS_STIPCM8S (RS_PCM8S|0x40|RSF_STEREO) /* stereo 8-bit signed */
#define RS_STIPCM8U (RS_PCM8U|0x40|RSF_STEREO) /* stereo 8-bit unsigned */
#define RS_STIPCM16S (RS_PCM16S|0x40|RSF_STEREO) /* stereo 16-bit signed */
#define RS_STIPCM16U (RS_PCM16U|0x40|RSF_STEREO) /* stereo 16-bit unsigned */
#define RS_STIPCM16M (RS_PCM16M|0x40|RSF_STEREO) /* stereo 16-bit signed big endian */
/* 24-bit signed */
#define RS_PCM24S (RS_PCM16S|0x80) /* mono 24-bit signed */
#define RS_STIPCM24S (RS_PCM16S|0x80|RSF_STEREO) /* stereo 24-bit signed */
#define RS_PCM32S (RS_PCM16S|0xC0) /* mono 24-bit signed */
#define RS_STIPCM32S (RS_PCM16S|0xC0|RSF_STEREO) /* stereo 24-bit signed */
// NNA types
/* NNA types */
#define NNA_NOTECUT 0
#define NNA_CONTINUE 1
#define NNA_NOTEOFF 2
#define NNA_NOTEFADE 3
// DCT types
/* DCT types */
#define DCT_NONE 0
#define DCT_NOTE 1
#define DCT_SAMPLE 2
#define DCT_INSTRUMENT 3
// DNA types
/* DNA types */
#define DNA_NOTECUT 0
#define DNA_NOTEOFF 1
#define DNA_NOTEFADE 2
// Mixer Hardware-Dependent features
/* Mixer Hardware-Dependent features */
#define SYSMIX_ENABLEMMX 0x01
#define SYSMIX_WINDOWSNT 0x02
#define SYSMIX_SLOWCPU 0x04
#define SYSMIX_FASTCPU 0x08
// Module flags
/* Module flags */
#define SONG_EMBEDMIDICFG 0x0001
#define SONG_FASTVOLSLIDES 0x0002
#define SONG_ITOLDEFFECTS 0x0004
@ -253,7 +253,7 @@ typedef const BYTE * LPCBYTE;
#define SONG_EXFILTERRANGE 0x8000
#define SONG_AMIGALIMITS 0x10000
// Global Options (Renderer)
/* Global Options (Renderer) */
#define SNDMIX_REVERSESTEREO 0x0001
#define SNDMIX_NOISEREDUCTION 0x0002
#define SNDMIX_AGC 0x0004
@ -265,14 +265,14 @@ typedef const BYTE * LPCBYTE;
#define SNDMIX_EQ 0x0100
#define SNDMIX_SOFTPANNING 0x0200
#define SNDMIX_ULTRAHQSRCMODE 0x0400
// Misc Flags (can safely be turned on or off)
/* Misc Flags (can safely be turned on or off) */
#define SNDMIX_DIRECTTODISK 0x10000
#define SNDMIX_ENABLEMMX 0x20000
#define SNDMIX_NOBACKWARDJUMPS 0x40000
#define SNDMIX_MAXDEFAULTPAN 0x80000 // Used by the MOD loader
#define SNDMIX_MAXDEFAULTPAN 0x80000 /* Used by the MOD loader */
// Reverb Types (GM2 Presets)
/* Reverb Types (GM2 Presets) */
enum {
REVERBTYPE_SMALLROOM,
REVERBTYPE_MEDIUMROOM,
@ -293,7 +293,7 @@ enum {
};
// Sample Struct
/* Sample Struct */
typedef struct _MODINSTRUMENT
{
UINT nLength,nLoopStart,nLoopEnd;
@ -314,7 +314,7 @@ typedef struct _MODINSTRUMENT
} MODINSTRUMENT;
// Instrument Struct
/* Instrument Struct */
typedef struct _INSTRUMENTHEADER
{
UINT nFadeOut;
@ -363,19 +363,19 @@ typedef struct _INSTRUMENTHEADER
} INSTRUMENTHEADER;
// Channel Struct
/* Channel Struct */
typedef struct _MODCHANNEL
{
// First 32-bytes: Most used mixing information: don't change it
/* First 32-bytes: Most used mixing information: don't change it */
signed char * pCurrentSample;
DWORD nPos;
DWORD nPosLo; // actually 16-bit
LONG nInc; // 16.16
DWORD nPosLo; /* actually 16-bit */
LONG nInc; /* 16.16 */
LONG nRightVol;
LONG nLeftVol;
LONG nRightRamp;
LONG nLeftRamp;
// 2nd cache line
/* 2nd cache line */
DWORD nLength;
DWORD dwFlags;
DWORD nLoopStart;
@ -386,7 +386,7 @@ typedef struct _MODCHANNEL
LONG nFilter_A0, nFilter_B0, nFilter_B1;
LONG nROfs, nLOfs;
LONG nRampLength;
// Information not used in the mixer
/* Information not used in the mixer */
signed char * pSample;
LONG nNewRightVol, nNewLeftVol;
LONG nRealVolume, nRealPan;
@ -400,9 +400,9 @@ typedef struct _MODCHANNEL
LONG nFineTune, nTranspose;
LONG nPortamentoSlide, nAutoVibDepth;
UINT nAutoVibPos, nVibratoPos, nTremoloPos, nPanbrelloPos;
// 16-bit members
/* 16-bit members */
signed short nVolSwing, nPanSwing;
// 8-bit members
/* 8-bit members */
BYTE nNote, nNNA;
BYTE nNewNote, nNewIns, nCommand, nArpeggio;
BYTE nOldVolumeSlide, nOldFineVolUpDown;
@ -431,7 +431,7 @@ typedef struct _MODCHANNELSETTINGS
UINT nVolume;
DWORD dwFlags;
UINT nMixPlugin;
char szName[MAX_CHANNELNAME]; // changed from CHAR
char szName[MAX_CHANNELNAME]; /* changed from CHAR */
} MODCHANNELSETTINGS;
@ -445,9 +445,9 @@ typedef struct _MODCOMMAND
BYTE param;
} MODCOMMAND, *LPMODCOMMAND;
////////////////////////////////////////////////////////////////////
// Mix Plugins
#define MIXPLUG_MIXREADY 0x01 // Set when cleared
/*////////////////////////////////////////////////////////////////// */
/* Mix Plugins */
#define MIXPLUG_MIXREADY 0x01 /* Set when cleared */
class IMixPlugin
{
@ -463,16 +463,16 @@ public:
};
#define MIXPLUG_INPUTF_MASTEREFFECT 0x01 // Apply to master mix
#define MIXPLUG_INPUTF_BYPASS 0x02 // Bypass effect
#define MIXPLUG_INPUTF_WETMIX 0x04 // Wet Mix (dry added)
#define MIXPLUG_INPUTF_MASTEREFFECT 0x01 /* Apply to master mix */
#define MIXPLUG_INPUTF_BYPASS 0x02 /* Bypass effect */
#define MIXPLUG_INPUTF_WETMIX 0x04 /* Wet Mix (dry added) */
typedef struct _SNDMIXPLUGINSTATE
{
DWORD dwFlags; // MIXPLUG_XXXX
LONG nVolDecayL, nVolDecayR; // Buffer click removal
int *pMixBuffer; // Stereo effect send buffer
float *pOutBufferL; // Temp storage for int -> float conversion
DWORD dwFlags; /* MIXPLUG_XXXX */
LONG nVolDecayL, nVolDecayR; /* Buffer click removal */
int *pMixBuffer; /* Stereo effect send buffer */
float *pOutBufferL; /* Temp storage for int -> float conversion */
float *pOutBufferR;
} SNDMIXPLUGINSTATE, *PSNDMIXPLUGINSTATE;
@ -480,12 +480,12 @@ typedef struct _SNDMIXPLUGININFO
{
DWORD dwPluginId1;
DWORD dwPluginId2;
DWORD dwInputRouting; // MIXPLUG_INPUTF_XXXX
DWORD dwOutputRouting; // 0=mix 0x80+=fx
DWORD dwReserved[4]; // Reserved for routing info
DWORD dwInputRouting; /* MIXPLUG_INPUTF_XXXX */
DWORD dwOutputRouting; /* 0=mix 0x80+=fx */
DWORD dwReserved[4]; /* Reserved for routing info */
CHAR szName[32];
CHAR szLibraryName[64]; // original DLL name
} SNDMIXPLUGININFO, *PSNDMIXPLUGININFO; // Size should be 128
CHAR szLibraryName[64]; /* original DLL name */
} SNDMIXPLUGININFO, *PSNDMIXPLUGININFO; /* Size should be 128 */
typedef struct _SNDMIXPLUGIN
{
@ -498,7 +498,7 @@ typedef struct _SNDMIXPLUGIN
typedef BOOL (*PMIXPLUGINCREATEPROC)(PSNDMIXPLUGIN);
////////////////////////////////////////////////////////////////////
/*////////////////////////////////////////////////////////////////// */
enum {
MIDIOUT_START=0,
@ -515,21 +515,21 @@ enum {
typedef struct MODMIDICFG
{
char szMidiGlb[9*32]; // changed from CHAR
char szMidiSFXExt[16*32]; // changed from CHAR
char szMidiZXXExt[128*32]; // changed from CHAR
char szMidiGlb[9*32]; /* changed from CHAR */
char szMidiSFXExt[16*32]; /* changed from CHAR */
char szMidiZXXExt[128*32]; /* changed from CHAR */
} MODMIDICFG, *LPMODMIDICFG;
typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels
typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); /* buffer, samples, channels */
//==============
/*============== */
class CSoundFile
//==============
/*============== */
{
public: // Static Members
public: /* Static Members */
static UINT m_nXBassDepth, m_nXBassRange;
static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType;
static UINT m_nProLogicDepth, m_nProLogicDelay;
@ -541,19 +541,19 @@ public: // Static Members
static LPSNDMIXHOOKPROC gpSndMixHook;
static PMIXPLUGINCREATEPROC gpMixPluginCreateProc;
public: // for Editing
MODCHANNEL Chn[MAX_CHANNELS]; // Channels
UINT ChnMix[MAX_CHANNELS]; // Channels to be mixed
MODINSTRUMENT Ins[MAX_SAMPLES]; // Instruments
INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; // Instrument Headers
MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; // Channels settings
MODCOMMAND *Patterns[MAX_PATTERNS]; // Patterns
WORD PatternSize[MAX_PATTERNS]; // Patterns Lengths
BYTE Order[MAX_ORDERS]; // Pattern Orders
MODMIDICFG m_MidiCfg; // Midi macro config table
SNDMIXPLUGIN m_MixPlugins[MAX_MIXPLUGINS]; // Mix plugins
public: /* for Editing */
MODCHANNEL Chn[MAX_CHANNELS]; /* Channels */
UINT ChnMix[MAX_CHANNELS]; /* Channels to be mixed */
MODINSTRUMENT Ins[MAX_SAMPLES]; /* Instruments */
INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; /* Instrument Headers */
MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; /* Channels settings */
MODCOMMAND *Patterns[MAX_PATTERNS]; /* Patterns */
WORD PatternSize[MAX_PATTERNS]; /* Patterns Lengths */
BYTE Order[MAX_ORDERS]; /* Pattern Orders */
MODMIDICFG m_MidiCfg; /* Midi macro config table */
SNDMIXPLUGIN m_MixPlugins[MAX_MIXPLUGINS]; /* Mix plugins */
UINT m_nDefaultSpeed, m_nDefaultTempo, m_nDefaultGlobalVolume;
DWORD m_dwSongFlags; // Song flags SONG_XXXX
DWORD m_dwSongFlags; /* Song flags SONG_XXXX */
UINT m_nChannels, m_nMixChannels, m_nMixStat, m_nBufferCount;
UINT m_nType, m_nSamples, m_nInstruments;
UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay;
@ -567,7 +567,7 @@ public: // for Editing
UINT m_nMaxOrderPosition;
UINT m_nPatternNames;
LPSTR m_lpszSongComments, m_lpszPatternNames;
char m_szNames[MAX_INSTRUMENTS][32]; // changed from CHAR
char m_szNames[MAX_INSTRUMENTS][32]; /* changed from CHAR */
CHAR CompressionTable[16];
public:
@ -608,7 +608,7 @@ public:
void CheckCPUUsage(UINT nCPU);
BOOL SetPatternName(UINT nPat, LPCSTR lpszName);
BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const;
// Module Loaders
/* Module Loaders */
BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadMod(LPCBYTE lpStream, DWORD dwMemLength);
@ -633,15 +633,15 @@ public:
BOOL ReadPSM(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadJ2B(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadUMX(LPCBYTE lpStream, DWORD dwMemLength);
// Save Functions
/* Save Functions */
#ifndef MODPLUG_NO_FILESAVE
UINT WriteSample(FILE *f, MODINSTRUMENT *pins, UINT nFlags, UINT nMaxLen=0);
BOOL SaveXM(LPCSTR lpszFileName, UINT nPacking=0);
BOOL SaveS3M(LPCSTR lpszFileName, UINT nPacking=0);
BOOL SaveMod(LPCSTR lpszFileName, UINT nPacking=0);
BOOL SaveIT(LPCSTR lpszFileName, UINT nPacking=0);
#endif // MODPLUG_NO_FILESAVE
// MOD Convert function
#endif /* MODPLUG_NO_FILESAVE */
/* MOD Convert function */
UINT GetBestSaveFormat() const;
UINT GetSaveFormats() const;
void ConvertModCommand(MODCOMMAND *) const;
@ -650,7 +650,7 @@ public:
WORD ModSaveCommand(const MODCOMMAND *m, BOOL bXM) const;
public:
// Real-time sound functions
/* Real-time sound functions */
VOID ResetChannels();
UINT Read(LPVOID lpBuffer, UINT cbBuffer);
@ -661,32 +661,32 @@ public:
VOID ResetTotalTickCount() { m_nTotalCount = 0; }
public:
// Mixer Config
/* Mixer Config */
static BOOL InitPlayer(BOOL bReset=FALSE);
static BOOL SetWaveConfig(UINT nRate,UINT nBits,UINT nChannels,BOOL bMMX=FALSE);
static BOOL SetResamplingMode(UINT nMode); // SRCMODE_XXXX
static BOOL SetResamplingMode(UINT nMode); /* SRCMODE_XXXX */
static BOOL IsStereo() { return (gnChannels > 1) ? TRUE : FALSE; }
static DWORD GetSampleRate() { return gdwMixingFreq; }
static DWORD GetBitsPerSample() { return gnBitsPerSample; }
static DWORD InitSysInfo();
static DWORD GetSysInfo() { return gdwSysInfo; }
// AGC
/* AGC */
static BOOL GetAGC() { return (gdwSoundSetup & SNDMIX_AGC) ? TRUE : FALSE; }
static void SetAGC(BOOL b);
static void ResetAGC();
static void ProcessAGC(int count);
//GCCFIX -- added these functions back in!
/*GCCFIX -- added these functions back in! */
static BOOL SetWaveConfigEx(BOOL bSurround,BOOL bNoOverSampling,BOOL bReverb,BOOL hqido,BOOL bMegaBass,BOOL bNR,BOOL bEQ);
// DSP Effects
/* DSP Effects */
static void InitializeDSP(BOOL bReset);
static void ProcessStereoDSP(int count);
static void ProcessMonoDSP(int count);
// [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms]
/* [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] */
static BOOL SetReverbParameters(UINT nDepth, UINT nDelay);
// [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100]
/* [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] */
static BOOL SetXBassParameters(UINT nDepth, UINT nRange);
// [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms]
/* [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] */
static BOOL SetSurroundParameters(UINT nDepth, UINT nDelay);
public:
BOOL ReadNote();
@ -696,7 +696,7 @@ public:
void CheckNNA(UINT nChn, UINT instr, int note, BOOL bForceCut);
void NoteChange(UINT nChn, int note, BOOL bPorta=FALSE, BOOL bResetEnv=TRUE);
void InstrumentChange(MODCHANNEL *pChn, UINT instr, BOOL bPorta=FALSE,BOOL bUpdVol=TRUE,BOOL bResetEnv=TRUE);
// Channel Effects
/* Channel Effects */
void PortamentoUp(MODCHANNEL *pChn, UINT param);
void PortamentoDown(MODCHANNEL *pChn, UINT param);
void FinePortamentoUp(MODCHANNEL *pChn, UINT param);
@ -722,15 +722,15 @@ public:
void ExtendedChannelEffect(MODCHANNEL *, UINT param);
void ProcessMidiMacro(UINT nChn, LPCSTR pszMidiMacro, UINT param=0);
void SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modifier=256) const;
// Low-Level effect processing
/* Low-Level effect processing */
void DoFreqSlide(MODCHANNEL *pChn, LONG nFreqSlide);
// Global Effects
/* Global Effects */
void SetTempo(UINT param);
void SetSpeed(UINT param);
void GlobalVolSlide(UINT param);
DWORD IsSongFinished(UINT nOrder, UINT nRow) const;
BOOL IsValidBackwardJump(UINT nStartOrder, UINT nStartRow, UINT nJumpOrder, UINT nJumpRow) const;
// Read/Write sample functions
/* Read/Write sample functions */
signed char GetDeltaValue(signed char prev, UINT n) const { return (signed char)(prev + CompressionTable[n & 0x0F]); }
UINT PackSample(int &sample, int next);
BOOL CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result=NULL);
@ -743,14 +743,14 @@ public:
UINT DetectUnusedSamples(BOOL *);
BOOL RemoveSelectedSamples(BOOL *);
void AdjustSampleLoop(MODINSTRUMENT *pIns);
// I/O from another sound file
/* I/O from another sound file */
BOOL ReadInstrumentFromSong(UINT nInstr, CSoundFile *, UINT nSrcInstrument);
BOOL ReadSampleFromSong(UINT nSample, CSoundFile *, UINT nSrcSample);
// Period/Note functions
/* Period/Note functions */
UINT GetNoteFromPeriod(UINT period) const;
UINT GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const;
UINT GetFreqFromPeriod(UINT period, UINT nC4Speed, int nPeriodFrac=0) const;
// Misc functions
/* Misc functions */
MODINSTRUMENT *GetSample(UINT n) { return Ins+n; }
void ResetMidiCfg();
UINT MapMidiInstrument(DWORD dwProgram, UINT nChannel, UINT nNote);
@ -758,16 +758,16 @@ public:
UINT SaveMixPlugins(FILE *f=NULL, BOOL bUpdate=TRUE);
UINT LoadMixPlugins(const void *pData, UINT nLen);
#ifndef NO_FILTER
DWORD CutOffToFrequency(UINT nCutOff, int flt_modifier=256) const; // [0-255] => [1-10KHz]
DWORD CutOffToFrequency(UINT nCutOff, int flt_modifier=256) const; /* [0-255] => [1-10KHz] */
#endif
// Static helper functions
/* Static helper functions */
public:
static DWORD TransposeToFrequency(int transp, int ftune=0);
static int FrequencyToTranspose(DWORD freq);
static void FrequencyToTranspose(MODINSTRUMENT *psmp);
// System-Dependant functions
/* System-Dependant functions */
public:
static MODCOMMAND *AllocatePattern(UINT rows, UINT nchns);
static signed char* AllocateSample(UINT nbytes);
@ -777,23 +777,23 @@ public:
};
// inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); }
// inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); }
/* inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } */
/* inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } */
//////////////////////////////////////////////////////////
// WAVE format information
/*//////////////////////////////////////////////////////// */
/* WAVE format information */
#pragma pack(1)
// Standard IFF chunks IDs
/* Standard IFF chunks IDs */
#define IFFID_FORM 0x4d524f46
#define IFFID_RIFF 0x46464952
#define IFFID_WAVE 0x45564157
#define IFFID_LIST 0x5453494C
#define IFFID_INFO 0x4F464E49
// IFF Info fields
/* IFF Info fields */
#define IFFID_ICOP 0x504F4349
#define IFFID_IART 0x54524149
#define IFFID_IPRD 0x44525049
@ -805,7 +805,7 @@ public:
#define IFFID_IGNR 0x524E4749
#define IFFID_ICRD 0x44524349
// Wave IFF chunks IDs
/* Wave IFF chunks IDs */
#define IFFID_wave 0x65766177
#define IFFID_fmt 0x20746D66
#define IFFID_wsmp 0x706D7377
@ -816,45 +816,45 @@ public:
typedef struct WAVEFILEHEADER
{
DWORD id_RIFF; // "RIFF"
DWORD filesize; // file length-8
DWORD id_RIFF; /* "RIFF" */
DWORD filesize; /* file length-8 */
DWORD id_WAVE;
} WAVEFILEHEADER;
typedef struct WAVEFORMATHEADER
{
DWORD id_fmt; // "fmt "
DWORD hdrlen; // 16
WORD format; // 1
WORD channels; // 1:mono, 2:stereo
DWORD freqHz; // sampling freq
DWORD bytessec; // bytes/sec=freqHz*samplesize
WORD samplesize; // sizeof(sample)
WORD bitspersample; // bits per sample (8/16)
DWORD id_fmt; /* "fmt " */
DWORD hdrlen; /* 16 */
WORD format; /* 1 */
WORD channels; /* 1:mono, 2:stereo */
DWORD freqHz; /* sampling freq */
DWORD bytessec; /* bytes/sec=freqHz*samplesize */
WORD samplesize; /* sizeof(sample) */
WORD bitspersample; /* bits per sample (8/16) */
} WAVEFORMATHEADER;
typedef struct WAVEDATAHEADER
{
DWORD id_data; // "data"
DWORD length; // length of data
DWORD id_data; /* "data" */
DWORD length; /* length of data */
} WAVEDATAHEADER;
typedef struct WAVESMPLHEADER
{
// SMPL
DWORD smpl_id; // "smpl" -> 0x6C706D73
DWORD smpl_len; // length of smpl: 3Ch (54h with sustain loop)
/* SMPL */
DWORD smpl_id; /* "smpl" -> 0x6C706D73 */
DWORD smpl_len; /* length of smpl: 3Ch (54h with sustain loop) */
DWORD dwManufacturer;
DWORD dwProduct;
DWORD dwSamplePeriod; // 1000000000/freqHz
DWORD dwBaseNote; // 3Ch = C-4 -> 60 + RelativeTone
DWORD dwSamplePeriod; /* 1000000000/freqHz */
DWORD dwBaseNote; /* 3Ch = C-4 -> 60 + RelativeTone */
DWORD dwPitchFraction;
DWORD dwSMPTEFormat;
DWORD dwSMPTEOffset;
DWORD dwSampleLoops; // number of loops
DWORD dwSampleLoops; /* number of loops */
DWORD cbSamplerData;
} WAVESMPLHEADER;
@ -862,11 +862,11 @@ typedef struct WAVESMPLHEADER
typedef struct SAMPLELOOPSTRUCT
{
DWORD dwIdentifier;
DWORD dwLoopType; // 0=normal, 1=bidi
DWORD dwLoopType; /* 0=normal, 1=bidi */
DWORD dwLoopStart;
DWORD dwLoopEnd; // Byte offset ?
DWORD dwLoopEnd; /* Byte offset ? */
DWORD dwFraction;
DWORD dwPlayCount; // Loop Count, 0=infinite
DWORD dwPlayCount; /* Loop Count, 0=infinite */
} SAMPLELOOPSTRUCT;
@ -879,15 +879,15 @@ typedef struct WAVESAMPLERINFO
typedef struct WAVELISTHEADER
{
DWORD list_id; // "LIST" -> 0x5453494C
DWORD list_id; /* "LIST" -> 0x5453494C */
DWORD list_len;
DWORD info; // "INFO"
DWORD info; /* "INFO" */
} WAVELISTHEADER;
typedef struct WAVEEXTRAHEADER
{
DWORD xtra_id; // "xtra" -> 0x61727478
DWORD xtra_id; /* "xtra" -> 0x61727478 */
DWORD xtra_len;
DWORD dwFlags;
WORD wPan;
@ -902,8 +902,8 @@ typedef struct WAVEEXTRAHEADER
#pragma pack()
///////////////////////////////////////////////////////////
// Low-level Mixing functions
/*///////////////////////////////////////////////////////// */
/* Low-level Mixing functions */
#define MIXBUFFERSIZE 512
#define MIXING_ATTENUATION 4
@ -915,7 +915,7 @@ typedef struct WAVEEXTRAHEADER
#define AGC_PRECISION 9
#define AGC_UNITY (1 << AGC_PRECISION)
// Calling conventions
/* Calling conventions */
#ifdef MSC_VER
#define MPPASMCALL __cdecl
#define MPPFASTCALL __fastcall
@ -931,7 +931,7 @@ int _muldiv(long a, long b, long c);
int _muldivr(long a, long b, long c);
// Byte swapping functions from the GNU C Library and libsdl
/* Byte swapping functions from the GNU C Library and libsdl */
/* Swap bytes in 16 bit value. */
#ifdef __GNUC__
@ -964,7 +964,7 @@ bswap_32 (unsigned int __bsx)
#endif
// From libsdl
/* From libsdl */
#ifdef WORDS_BIGENDIAN
#define bswapLE16(X) bswap_16(X)
#define bswapLE32(X) bswap_32(X)

View file

@ -52,7 +52,7 @@ typedef void VOID;
inline LONG MulDiv (long a, long b, long c)
{
// if (!c) return 0;
/* if (!c) return 0; */
return ((unsigned long long) a * (unsigned long long) b ) / c;
}
@ -63,7 +63,7 @@ inline LONG MulDiv (long a, long b, long c)
#define lstrcpy strcpy
#define lstrcmp strcmp
#define WAVE_FORMAT_PCM 1
//#define ENABLE_EQ
/*#define ENABLE_EQ */
#define GHND 0
@ -90,7 +90,7 @@ inline void ProcessPlugins(int n) {}
#define TRUE true
#endif
#endif // MSC_VER
#endif /* MSC_VER */
#endif

View file

@ -6,7 +6,7 @@ libgstmpeg1systemencode_la_SOURCES = gstmpeg1systemencode.c \
buffer.c \
systems.c
libgstmpeg1systemencode_la_CFLAGS = -O2 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS)
libgstmpeg1systemencode_la_LIBADD = $(GST_LIBS)
libgstmpeg1systemencode_la_LIBADD =
libgstmpeg1systemencode_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmpeg1systemencode.h \

View file

@ -367,7 +367,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
printf("MPEG audio id = %08lx\n", id);
if ((id & 0xfff00000) == AUDIO_SYNCWORD<<20) {
/*mpegver = (header >> 19) & 0x3; // don't need this for bpf */
/* mpegver = (header >> 19) & 0x3; don't need this for bpf */
layer_index = (id >> 17) & 0x3;
mb->info.audio.layer = 4 - layer_index;
lsf = (id & (1 << 20)) ? ((id & (1 << 19)) ? 0 : 1) : 1;
@ -442,7 +442,7 @@ static void mpeg1mux_buffer_update_audio_info(Mpeg1MuxBuffer *mb) {
while (offset < mb->length-4) {
id = GULONG_FROM_BE(*((gulong *)(data+offset)));
/*mpegver = (header >> 19) & 0x3; // don't need this for bpf */
/* mpegver = (header >> 19) & 0x3; don't need this for bpf */
layer_index = (id >> 17) & 0x3;
mb->info.audio.layer = 4 - layer_index;
lsf = (id & (1 << 20)) ? ((id & (1 << 19)) ? 0 : 1) : 1;

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstmp1videoparse.la
libgstmp1videoparse_la_SOURCES = gstmp1videoparse.c
libgstmp1videoparse_la_CFLAGS = $(GST_CFLAGS) -O3 $(FOMIT_FRAME_POINTER) -ffast-math
libgstmp1videoparse_la_LIBADD = $(GST_LIBS)
libgstmp1videoparse_la_LIBADD =
libgstmp1videoparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmp1videoparse.h

View file

@ -17,7 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
//#define GST_DEBUG_ENABLED
/*#define GST_DEBUG_ENABLED */
#include "gstmp1videoparse.h"
/* Start codes. */
@ -100,7 +100,7 @@ static void gst_mp1videoparse_flush (Mp1VideoParse *mp1videoparse);
static GstPadTemplate *src_template, *sink_template;
static GstElementClass *parent_class = NULL;
//static guint gst_mp1videoparse_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_mp1videoparse_signals[LAST_SIGNAL] = { 0 }; */
GType
mp1videoparse_get_type (void)
@ -245,7 +245,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
guint64 time_stamp;
GstBuffer *temp;
// g_return_if_fail(GST_IS_BUFFER(buf));
/* g_return_if_fail(GST_IS_BUFFER(buf)); */
time_stamp = GST_BUFFER_TIMESTAMP(buf);
@ -310,7 +310,7 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
while (offset < size-1) {
sync_byte = *(data + offset);
//printf(" %d %02x\n", offset, sync_byte);
/*printf(" %d %02x\n", offset, sync_byte); */
if (sync_byte == 0) {
sync_state++;
}
@ -333,9 +333,9 @@ gst_mp1videoparse_real_chain (Mp1VideoParse *mp1videoparse, GstBuffer *buf, GstP
}
else sync_state = 0;
}
// something else...
/* something else... */
else sync_state = 0;
// go down the buffer
/* go down the buffer */
offset++;
}
@ -376,12 +376,12 @@ gst_mp1videoparse_change_state (GstElement *element)
mp1videoparse = GST_MP1VIDEOPARSE(element);
GST_DEBUG (0,"mp1videoparse: state pending %d\n", GST_STATE_PENDING(element));
// if going down into NULL state, clear out buffers
* if going down into NULL state, clear out buffers *
if (GST_STATE_PENDING(element) == GST_STATE_READY) {
gst_mp1videoparse_flush(mp1videoparse);
}
// if we haven't failed already, give the parent class a chance to ;-)
* if we haven't failed already, give the parent class a chance to ;-) *
if (GST_ELEMENT_CLASS(parent_class)->change_state)
return GST_ELEMENT_CLASS(parent_class)->change_state(element);

View file

@ -50,7 +50,7 @@ struct _Mp1VideoParse {
GstPad *sinkpad,*srcpad;
GstBuffer *partialbuf; // previous buffer (if carryover)
GstBuffer *partialbuf; /* previous buffer (if carryover) */
gulong next_buffer_offset;
gboolean need_resync;
gboolean in_flush;

View file

@ -11,7 +11,7 @@ ARCHCFLAGS =
endif
libgstmpeg2subt_la_CFLAGS = -O3 $(ARCHCFLAGS) -fschedule-insns2 $(FOMIT_FRAME_POINTER) -finline-functions -ffast-math $(GST_CFLAGS)
libgstmpeg2subt_la_LIBADD = $(GST_LIBS)
libgstmpeg2subt_la_LIBADD =
libgstmpeg2subt_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmpeg2subt.h

View file

@ -6,12 +6,12 @@ plugin_LTLIBRARIES = libgstmpegaudioparse.la libgstmp3types.la
libgstmpegaudioparse_la_SOURCES = gstmpegaudioparse.c
# FIXME is this useful?
libgstmpegaudioparse_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -ffast-math -finline-functions $(GST_CFLAGS)
libgstmpegaudioparse_la_LIBADD = $(GST_LIBS)
libgstmpegaudioparse_la_LIBADD =
libgstmpegaudioparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstmp3types_la_SOURCES = gstmp3types.c
libgstmp3types_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -ffast-math -finline-functions $(GST_CFLAGS)
libgstmp3types_la_LIBADD = $(GST_LIBS)
libgstmp3types_la_LIBADD =
libgstmp3types_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmpegaudioparse.h

View file

@ -17,7 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
//#define DEBUG_ENABLED
/*#define DEBUG_ENABLED */
#include <gst/gst.h>
#include <string.h> /* memcmp */

View file

@ -17,7 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
//#define GST_DEBUG_ENABLED
/*#define GST_DEBUG_ENABLED */
#include <gstmpegaudioparse.h>
@ -94,7 +94,7 @@ static void gst_mp3parse_set_property (GObject *object, guint prop_id, const GV
static void gst_mp3parse_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static GstElementClass *parent_class = NULL;
//static guint gst_mp3parse_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_mp3parse_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_mp3parse_get_type(void) {
@ -127,10 +127,10 @@ gst_mp3parse_class_init (GstMPEGAudioParseClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SKIP,
g_param_spec_int("skip","skip","skip",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BIT_RATE,
g_param_spec_int("bit_rate","bit_rate","bit_rate",
G_MININT,G_MAXINT,0,G_PARAM_READABLE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READABLE)); /* CHECKME */
parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
@ -144,15 +144,15 @@ gst_mp3parse_init (GstMPEGAudioParse *mp3parse)
mp3parse->sinkpad = gst_pad_new_from_template(sink_temp, "sink");
gst_element_add_pad(GST_ELEMENT(mp3parse),mp3parse->sinkpad);
#if 1 // set this to one to use the old chaining code
#if 1 /* set this to one to use the old chaining code */
gst_pad_set_chain_function(mp3parse->sinkpad,gst_mp3parse_chain);
#else // else you get the new loop-based code, which isn't complete yet
#else /* else you get the new loop-based code, which isn't complete yet */
gst_element_set_loop_function (GST_ELEMENT(mp3parse),gst_mp3parse_loop);
#endif
mp3parse->srcpad = gst_pad_new_from_template(src_temp, "src");
gst_element_add_pad(GST_ELEMENT(mp3parse),mp3parse->srcpad);
//gst_pad_set_type_id(mp3parse->srcpad, mp3frametype);
/*gst_pad_set_type_id(mp3parse->srcpad, mp3frametype); */
mp3parse->partialbuf = NULL;
mp3parse->skip = 0;
@ -190,31 +190,31 @@ gst_mp3parse_loop (GstElement *element)
gint bpf;
while (1) {
// get a new buffer
/* get a new buffer */
inbuf = gst_pad_pull (parse->sinkpad);
size = GST_BUFFER_SIZE (inbuf);
data = GST_BUFFER_DATA (inbuf);
offset = 0;
fprintf(stderr, "have buffer of %d bytes\n",size);
// loop through it and find all the frames
/* loop through it and find all the frames */
while (offset < (size - 4)) {
start = gst_mp3parse_next_header (data,size,offset);
fprintf(stderr, "skipped %d bytes searching for the next header\n",start-offset);
header = GULONG_FROM_BE(*((guint32 *)(data+start)));
fprintf(stderr, "header is 0x%08x\n",header);
// figure out how big the frame is supposed to be
/* figure out how big the frame is supposed to be */
bpf = bpf_from_header (parse, header);
// see if there are enough bytes in this buffer for the whole frame
/* see if there are enough bytes in this buffer for the whole frame */
if ((start + bpf) <= size) {
outbuf = gst_buffer_create_sub (inbuf,start,bpf);
fprintf(stderr, "sending buffer of %d bytes\n",bpf);
gst_pad_push (parse->srcpad, outbuf);
offset = start + bpf;
// if not, we have to deal with it somehow
/* if not, we have to deal with it somehow */
} else {
fprintf(stderr,"don't have enough data for this frame\n");
@ -238,7 +238,7 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL);
// g_return_if_fail(GST_IS_BUFFER(buf));
/* g_return_if_fail(GST_IS_BUFFER(buf)); */
mp3parse = GST_MP3PARSE (gst_pad_get_parent (pad));
@ -255,11 +255,11 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
mp3parse->in_flush = TRUE;
*/
// if we have something left from the previous frame
/* if we have something left from the previous frame */
if (mp3parse->partialbuf) {
mp3parse->partialbuf = gst_buffer_append(mp3parse->partialbuf, buf);
// and the one we received..
/* and the one we received.. */
gst_buffer_unref(buf);
}
else {
@ -269,22 +269,22 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
size = GST_BUFFER_SIZE(mp3parse->partialbuf);
data = GST_BUFFER_DATA(mp3parse->partialbuf);
// while we still have bytes left -4 for the header
/* while we still have bytes left -4 for the header */
while (offset < size-4) {
int skipped = 0;
GST_DEBUG (0,"mp3parse: offset %ld, size %ld \n",offset, size);
// search for a possible start byte
/* search for a possible start byte */
for (;((data[offset] != 0xff) && (offset < size));offset++) skipped++;
if (skipped && !mp3parse->in_flush) {
GST_DEBUG (0,"mp3parse: **** now at %ld skipped %d bytes\n",offset,skipped);
}
// construct the header word
/* construct the header word */
header = GULONG_FROM_BE(*((gulong *)(data+offset)));
// if it's a valid header, go ahead and send off the frame
/* if it's a valid header, go ahead and send off the frame */
if (head_check(header)) {
// calculate the bpf of the frame
/* calculate the bpf of the frame */
bpf = bpf_from_header(mp3parse, header);
/********************************************************************************
@ -302,22 +302,22 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
if ( mp3parse->in_flush ) {
unsigned long header2;
if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } // wait until we have the the entire current frame as well as the next frame header
if ((size-offset)<(bpf+4)) { if (mp3parse->in_flush) break; } /* wait until we have the the entire current frame as well as the next frame header */
header2 = GULONG_FROM_BE(*((gulong *)(data+offset+bpf)));
GST_DEBUG(0,"mp3parse: header=%08lX, header2=%08lX, bpf=%d\n", header, header2, bpf );
#define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) // mask the bits which are allowed to differ between frames
#define HDRMASK ~( (0xF<<12)/*bitrate*/ | (1<<9)/*padding*/ | (3<<4)/*mode extension*/ ) /* mask the bits which are allowed to differ between frames */
if ( (header2&HDRMASK) != (header&HDRMASK) ) { // require 2 matching headers in a row
if ( (header2&HDRMASK) != (header&HDRMASK) ) { /* require 2 matching headers in a row */
GST_DEBUG(0,"mp3parse: next header doesn't match (header=%08lX, header2=%08lX, bpf=%d)\n", header, header2, bpf );
offset++; // This frame is invalid. Start looking for a valid frame at the next position in the stream
offset++; /* This frame is invalid. Start looking for a valid frame at the next position in the stream */
continue;
}
}
// if we don't have the whole frame...
/* if we don't have the whole frame... */
if ((size - offset) < bpf) {
GST_DEBUG (0,"mp3parse: partial buffer needed %ld < %d \n",(size-offset), bpf);
break;
@ -346,8 +346,8 @@ gst_mp3parse_chain (GstPad *pad, GstBuffer *buf)
if (!mp3parse->in_flush) GST_DEBUG (0,"mp3parse: *** wrong header, skipping byte (FIXME?)\n");
}
}
// if we have processed this block and there are still
// bytes left not in a partial block, copy them over.
/* if we have processed this block and there are still */
/* bytes left not in a partial block, copy them over. */
if (size-offset > 0) {
glong remainder = (size - offset);
GST_DEBUG (0,"mp3parse: partial buffer needed %ld for trailing bytes\n",remainder);
@ -381,7 +381,7 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
int layer_index,layer,lsf,samplerate_index,padding;
long bpf;
//mpegver = (header >> 19) & 0x3; // don't need this for bpf
/*mpegver = (header >> 19) & 0x3; // don't need this for bpf */
layer_index = (header >> 17) & 0x3;
layer = 4 - layer_index;
lsf = (header & (1 << 20)) ? ((header & (1 << 19)) ? 0 : 1) : 1;
@ -399,8 +399,8 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
bpf += padding;
}
//g_print("%08x: layer %d lsf %d bitrate %d samplerate_index %d padding %d - bpf %d\n",
//header,layer,lsf,bitrate,samplerate_index,padding,bpf);
/*g_print("%08x: layer %d lsf %d bitrate %d samplerate_index %d padding %d - bpf %d\n", */
/*header,layer,lsf,bitrate,samplerate_index,padding,bpf); */
return bpf;
}

View file

@ -50,7 +50,7 @@ struct _GstMPEGAudioParse {
GstPad *sinkpad,*srcpad;
GstBuffer *partialbuf; // previous buffer (if carryover)
GstBuffer *partialbuf; /* previous buffer (if carryover) */
guint skip; /* number of frames to skip */
guint bit_rate;
gboolean in_flush;

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstpassthrough.la
libgstpassthrough_la_SOURCES = gstpassthrough.c
libgstpassthrough_la_CFLAGS = $(GST_CFLAGS)
libgstpassthrough_la_LIBADD = $(GST_LIBS)
libgstpassthrough_la_LIBADD =
libgstpassthrough_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstpassthrough.h filter.func

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstplayondemand.la
libgstplayondemand_la_SOURCES = gstplayondemand.c
libgstplayondemand_la_CFLAGS = $(GST_CFLAGS)
libgstplayondemand_la_LIBADD = $(GST_LIBS)
libgstplayondemand_la_LIBADD =
libgstplayondemand_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstplayondemand.h filter.func

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstrtjpeg.la
libgstrtjpeg_la_SOURCES = gstrtjpeg.c gstrtjpegenc.c gstrtjpegdec.c RTjpeg.c
libgstrtjpeg_la_CFLAGS = $(GST_CFLAGS)
libgstrtjpeg_la_LIBADD = $(GST_LIBS)
libgstrtjpeg_la_LIBADD =
libgstrtjpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstrtjpegenc.h gstrtjpegdec.h RTjpeg.h

File diff suppressed because it is too large Load diff

View file

@ -50,7 +50,7 @@ static void gst_rtjpegdec_init (GstRTJpegDec *rtjpegdec);
static void gst_rtjpegdec_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_rtjpegdec_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_rtjpegdec_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_rtjpegdec_get_type (void)

View file

@ -48,7 +48,7 @@ static void gst_rtjpegenc_init (GstRTJpegEnc *rtjpegenc);
static void gst_rtjpegenc_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_rtjpegenc_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_rtjpegenc_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_rtjpegenc_get_type (void)

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstsmooth.la
libgstsmooth_la_SOURCES = gstsmooth.c
libgstsmooth_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS)
libgstsmooth_la_LIBADD = $(GST_LIBS)
libgstsmooth_la_LIBADD =
libgstsmooth_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsmooth.h

View file

@ -78,7 +78,7 @@ static void gst_smooth_set_property (GObject *object, guint prop_id, const GValu
static void gst_smooth_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static GstElementClass *parent_class = NULL;
//static guint gst_smooth_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_smooth_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_smooth_get_type (void)
@ -114,13 +114,13 @@ gst_smooth_class_init (GstSmoothClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE,
g_param_spec_boolean("active","active","active",
TRUE,G_PARAM_READWRITE)); // CHECKME
TRUE,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_TOLERANCE,
g_param_spec_int("tolerance","tolerance","tolerance",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FILTERSIZE,
g_param_spec_int("filtersize","filtersize","filtersize",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_smooth_set_property;
gobject_class->get_property = gst_smooth_get_property;
@ -199,10 +199,10 @@ smooth_filter (unsigned char* dest, unsigned char* src, int width, int height, i
numvalues ++;
sum += aktval;
}
} //for fx
} /*for fx */
fx1 += width;
fx2 += width;
} //for fy
} /*for fy */
src++;
*dest++ = sum/numvalues;

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstsmoothwave.la
libgstsmoothwave_la_SOURCES = gstsmoothwave.c
libgstsmoothwave_la_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
libgstsmoothwave_la_LIBADD = $(GST_LIBS) $(GTK_LIBS)
libgstsmoothwave_la_LIBADD = $(GTK_LIBS)
libgstsmoothwave_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsmoothwave.h

View file

@ -55,7 +55,7 @@ static void gst_smoothwave_get_property (GObject *object, guint prop_id, GValue
static void gst_smoothwave_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 }; */
GType
@ -92,13 +92,13 @@ gst_smoothwave_class_init (GstSmoothWaveClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH,
g_param_spec_int("width","width","width",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_HEIGHT,
g_param_spec_int("height","height","height",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDGET,
g_param_spec_object("widget","widget","widget",
GTK_TYPE_WIDGET,G_PARAM_READABLE)); // CHECKME!
GTK_TYPE_WIDGET,G_PARAM_READABLE)); /* CHECKME! */
gobject_class->set_property = gst_smoothwave_set_property;
gobject_class->get_property = gst_smoothwave_get_property;
@ -116,21 +116,21 @@ gst_smoothwave_init (GstSmoothWave *smoothwave)
smoothwave->srcpad = gst_pad_new("src",GST_PAD_SRC);
gst_element_add_pad(GST_ELEMENT(smoothwave),smoothwave->srcpad);
// smoothwave->meta = NULL;
/* smoothwave->meta = NULL; */
smoothwave->width = 512;
smoothwave->height = 256;
gdk_rgb_init();
// gtk_widget_set_default_colormap (gdk_rgb_get_cmap());
// gtk_widget_set_default_visual (gdk_rgb_get_visual());
/* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */
/* gtk_widget_set_default_visual (gdk_rgb_get_visual()); */
// GST_DEBUG (0,"creating palette\n");
/* GST_DEBUG (0,"creating palette\n"); */
for (i=0;i<256;i++)
palette[i] = (i << 16) || (i << 8);
// GST_DEBUG (0,"creating cmap\n");
/* GST_DEBUG (0,"creating cmap\n"); */
smoothwave->cmap = gdk_rgb_cmap_new(palette,256);
// GST_DEBUG (0,"created cmap\n");
// gtk_widget_set_default_colormap (smoothwave->cmap);
/* GST_DEBUG (0,"created cmap\n"); */
/* gtk_widget_set_default_colormap (smoothwave->cmap); */
smoothwave->image = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(smoothwave->image),
@ -153,29 +153,29 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL);
// g_return_if_fail(GST_IS_BUFFER(buf));
/* g_return_if_fail(GST_IS_BUFFER(buf)); */
smoothwave = GST_SMOOTHWAVE(GST_OBJECT_PARENT (pad));
/* first deal with audio metadata */
// if (buf->meta) {
// if (smoothwave->meta != NULL) {
// /* FIXME: need to unref the old metadata so it goes away */
// }
// /* we just make a copy of the pointer */
// smoothwave->meta = (MetaAudioRaw *)(buf->meta);
// /* FIXME: now we have to ref the metadata so it doesn't go away */
// }
/* if (buf->meta) { */
/* if (smoothwave->meta != NULL) { */
/* /* FIXME: need to unref the old metadata so it goes away */ */
/* } */
/* /* we just make a copy of the pointer */ */
/* smoothwave->meta = (MetaAudioRaw *)(buf->meta); */
/* /* FIXME: now we have to ref the metadata so it doesn't go away */ */
/* } */
// g_return_if_fail(smoothwave->meta != NULL);
/* g_return_if_fail(smoothwave->meta != NULL); */
samples = (gint16 *)GST_BUFFER_DATA(buf);
// samplecount = buf->datasize / (smoothwave->meta->channels * sizeof(gint16));
/* samplecount = buf->datasize / (smoothwave->meta->channels * sizeof(gint16)); */
samplecount = GST_BUFFER_SIZE(buf) / (2 * sizeof(gint16));
qheight = smoothwave->height/4;
// GST_DEBUG (0,"traversing %d\n",smoothwave->width);
/* GST_DEBUG (0,"traversing %d\n",smoothwave->width); */
for (i=0;i<MAX(smoothwave->width,samplecount);i++) {
gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 +
qheight;
@ -183,7 +183,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
(qheight*3);
smoothwave->imagebuffer[y1*smoothwave->width + i] = 0xff;
smoothwave->imagebuffer[y2*smoothwave->width + i] = 0xff;
// smoothwave->imagebuffer[i+(smoothwave->width*5)] = i;
/* smoothwave->imagebuffer[i+(smoothwave->width*5)] = i; */
}
ptr = (guint32 *)smoothwave->imagebuffer;
@ -194,7 +194,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
ptr++;
}
// GST_DEBUG (0,"drawing\n");
/* GST_DEBUG (0,"drawing\n"); */
/* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);\n",
smoothwave->image->window,
smoothwave->image->style->fg_gc[GTK_STATE_NORMAL],
@ -214,7 +214,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
GDK_RGB_DITHER_NORMAL,
smoothwave->imagebuffer,smoothwave->width);
// gst_trace_add_entry(NULL,0,buf,"smoothwave: calculated smoothwave");
/* gst_trace_add_entry(NULL,0,buf,"smoothwave: calculated smoothwave"); */
gst_buffer_unref(buf);
}

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstspectrum.la
libgstspectrum_la_SOURCES = gstspectrum.c fix_fft.c
libgstspectrum_la_CFLAGS = $(GST_CFLAGS)
libgstspectrum_la_LIBADD = $(GST_LIBS)
libgstspectrum_la_LIBADD =
libgstspectrum_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstspectrum.h

View file

@ -76,6 +76,6 @@ void spectrum_chain(GstPad *pad,GstBuffer *buf) {
}
gboolean idle_func(gpointer data) {
//gst_src_push(GST_SRC(data));
/*gst_src_push(GST_SRC(data)); */
return TRUE;
}

View file

@ -65,7 +65,7 @@ void gst_spectrum_window(fixed fr[], int n);
static GstElementClass *parent_class = NULL;
//static guint gst_spectrum_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_spectrum_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_spectrum_get_type (void)
@ -99,7 +99,7 @@ gst_spectrum_class_init (GstSpectrumClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH,
g_param_spec_int("width","width","width",
G_MININT,G_MAXINT,0,G_PARAM_WRITABLE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_WRITABLE)); /* CHECKME */
gobject_class->set_property = gst_spectrum_set_property;
}
@ -151,32 +151,8 @@ gst_spectrum_chain (GstPad *pad, GstBuffer *buf)
spectrum = GST_SPECTRUM (GST_OBJECT_PARENT (pad));
/* first deal with audio metadata */
// FIXME
// if (buf->meta) {
// if (spectrum->meta != NULL) {
// /* FIXME: need to unref the old metadata so it goes away */
// }
// /* we just make a copy of the pointer */
// spectrum->meta = (MetaAudioRaw *)(buf->data);
// /* FIXME: now we have to ref the metadata so it does go away */
// }
//g_return_if_fail(spectrum->meta != NULL);
//samplecount = GST_BUFFER_SIZE(buf) /
// (spectrum->meta->channels * sizeof(gint16));
// samples = (gint16 *)g_malloc(buf->datasize);
// g_return_if_fail(samples != NULL);
// memcpy(samples,(gint16
//*)GST_BUFFER_DATA(buf),GST_BUFFER_DATASIZE(buf));
// gst_buffer_unref(buf);
samples = (gint16 *)GST_BUFFER_DATA(buf);
// return;
// spec_base = (gint) (log(samplecount) / log(2));
// if (spec_base > 10) spec_base = 10;
// spec_len = (gint) pow(2, spec_base);
spec_base = 8;
spec_len = 1024;
@ -186,12 +162,12 @@ gst_spectrum_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(loud != NULL);
memset(im,0,spec_len * sizeof(gint16));
//if (spectrum->meta->channels == 2) {
/*if (spectrum->meta->channels == 2) { */
re = g_malloc(spec_len * sizeof(gint16));
for (i=0;i<spec_len;i++)
re[i] = (samples[(i*2)] + samples[(i*2)+1]) >> 1;
//} else
// re = samples;
/*} else */
/* re = samples; */
gst_spectrum_window(re,spec_len);
gst_spectrum_fix_fft(re,im,spec_base,FALSE);
gst_spectrum_fix_loud(loud,re,im,spec_len,0);
@ -204,12 +180,12 @@ gst_spectrum_chain (GstPad *pad, GstBuffer *buf)
spect[i] = (loud[pos] + 60) / 2;
else
spect[i] = 0;
// if (spect[i] > 15);
// spect[i] = 15;
/* if (spect[i] > 15); */
/* spect[i] = 15; */
}
g_free(loud);
gst_buffer_unref(buf);
// g_free(samples);
/* g_free(samples); */
newbuf = gst_buffer_new();
g_return_if_fail(newbuf != NULL);

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstspeed.la
libgstspeed_la_SOURCES = gstspeed.c
libgstspeed_la_CFLAGS = $(GST_CFLAGS)
libgstspeed_la_LIBADD = $(GST_LIBS)
libgstspeed_la_LIBADD =
libgstspeed_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstspeed.h filter.func

View file

@ -107,7 +107,7 @@ static gboolean speed_parse_caps (GstSpeed *filter, GstCaps *caps);
static void speed_loop (GstElement *element);
static GstElementClass *parent_class = NULL;
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
static GstPadConnectReturn
speed_connect (GstPad *pad, GstCaps *caps)
@ -207,7 +207,7 @@ speed_class_init (GstSpeedClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SILENT,
g_param_spec_boolean("silent","silent","silent",
TRUE,G_PARAM_READWRITE)); // CHECKME
TRUE,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_SPEED,
g_param_spec_float("speed","speed","speed",

View file

@ -25,7 +25,7 @@
#include <config.h>
#include <gst/gst.h>
// #include <gst/meta/audioraw.h>
/* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgststereo.la
libgststereo_la_SOURCES = gststereo.c
libgststereo_la_CFLAGS = $(GST_CFLAGS)
libgststereo_la_LIBADD = $(GST_LIBS)
libgststereo_la_LIBADD =
libgststereo_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gststereo.h

View file

@ -52,7 +52,7 @@ static void gst_stereo_get_property (GObject *object, guint prop_id, GValue *va
static void gst_stereo_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL;
//static guint gst_stereo_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_stereo_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_stereo_get_type(void) {
@ -87,10 +87,10 @@ gst_stereo_class_init (GstStereoClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE,
g_param_spec_int("active","active","active",
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME
G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_STEREO,
g_param_spec_float("stereo","stereo","stereo",
0.0,1.0,0.0,G_PARAM_READWRITE)); // CHECKME
0.0,1.0,0.0,G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_stereo_set_property;
gobject_class->get_property = gst_stereo_get_property;
@ -126,13 +126,13 @@ gst_stereo_chain (GstPad *pad,GstBuffer *buf)
g_return_if_fail(stereo != NULL);
g_return_if_fail(GST_IS_STEREO(stereo));
// FIXME
// if (buf->meta)
// memcpy(&stereo->meta,buf->meta,sizeof(stereo->meta));
/* FIXME */
/* if (buf->meta) */
/* memcpy(&stereo->meta,buf->meta,sizeof(stereo->meta)); */
if (stereo->active) {
//if (stereo->meta.channels == 2 && stereo->meta.format == AFMT_S16_LE) {
/*if (stereo->meta.channels == 2 && stereo->meta.format == AFMT_S16_LE) { */
data = (gint16 *)GST_BUFFER_DATA(buf);
samples = GST_BUFFER_SIZE(buf) / 2;
mul = stereo->stereo;
@ -155,7 +155,7 @@ gst_stereo_chain (GstPad *pad,GstBuffer *buf)
tmp = 32767;
data[i + 1] = tmp;
}
//}
/*} */
}
gst_pad_push(stereo->srcpad,buf);

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgsty4mencode.la
libgsty4mencode_la_SOURCES = gsty4mencode.c
libgsty4mencode_la_CFLAGS = $(GST_CFLAGS)
libgsty4mencode_la_LIBADD = $(GST_LIBS)
libgsty4mencode_la_LIBADD =
libgsty4mencode_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gsty4mencode.h

View file

@ -76,7 +76,7 @@ static GstElementStateReturn gst_lavencode_change_state (GstElement *element);
static GstElementClass *parent_class = NULL;
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 };
/*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_lavencode_get_type(void) {

View file

@ -24,7 +24,7 @@
#include <config.h>
#include <gst/gst.h>
// #include <gst/meta/audioraw.h>
/* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus

View file

@ -6,7 +6,7 @@ EXTRA_DIST = qcam-os.c qcam-Linux.c
libgstqcam_la_SOURCES = gstqcamsrc.c qcam-lib.c exposure.c
libgstqcam_la_CFLAGS = -O2 $(GST_CFLAGS)
libgstqcam_la_LIBADD = $(GST_LIBS)
libgstqcam_la_LIBADD =
libgstqcam_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstqcamsrc.h qcam-os.h qcam.h qcamip.h qcam-Linux.h

View file

@ -24,7 +24,7 @@
#include <sys/mman.h>
#include <string.h>
//#define DEBUG_ENABLED
/*#define DEBUG_ENABLED */
#include <gstqcamsrc.h>
#include "qcamip.h"
@ -121,7 +121,7 @@ static gboolean gst_qcamsrc_open (GstQCamSrc *src);
static GstBuffer* gst_qcamsrc_get (GstPad *pad);
static GstElementClass *parent_class = NULL;
////static guint gst_qcamsrc_signals[LAST_SIGNAL] = { 0 };
/*//static guint gst_qcamsrc_signals[LAST_SIGNAL] = { 0 }; */
GType
gst_qcamsrc_get_type (void)
@ -255,8 +255,8 @@ gst_qcamsrc_get (GstPad *pad)
}
scan = qc_scan (qcamsrc->qcam);
// FIXME, this doesn't seem to work...
//fixdark(qcamsrc->qcam, scan);
/* FIXME, this doesn't seem to work... */
/*fixdark(qcamsrc->qcam, scan); */
if (qcamsrc->autoexposure != AE_NONE)
qcip_autoexposure(qcamsrc->qcam, scan);

View file

@ -44,7 +44,7 @@ extern "C" {
#define GST_IS_QCAMSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QCAMSRC))
// NOTE: per-element flags start with 16 for now
/* NOTE: per-element flags start with 16 for now */
typedef enum {
GST_QCAMSRC_OPEN = GST_ELEMENT_FLAG_LAST,

View file

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstvcdsrc.la
libgstvcdsrc_la_SOURCES = vcdsrc.c
libgstvcdsrc_la_CFLAGS = $(GST_CFLAGS)
libgstvcdsrc_la_LIBADD = $(GST_LIBS)
libgstvcdsrc_la_LIBADD =
libgstvcdsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = vcdsrc.h