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:05 +00:00
parent 0f1d754932
commit d6258153e0
55 changed files with 206 additions and 230 deletions

View File

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

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstaasink.la
libgstaasink_la_SOURCES = gstaasink.c libgstaasink_la_SOURCES = gstaasink.c
libgstaasink_la_CFLAGS = $(GST_CFLAGS) $(AALIB_CFLAGS) libgstaasink_la_CFLAGS = $(GST_CFLAGS) $(AALIB_CFLAGS)
libgstaasink_la_LIBADD = $(GST_LIBS) $(AALIB_LIBS) libgstaasink_la_LIBADD = $(AALIB_LIBS)
libgstaasink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaasink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstaasink.h noinst_HEADERS = gstaasink.h

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstdvdec.la
libgstdvdec_la_SOURCES = gstdvdec.c libgstdvdec_la_SOURCES = gstdvdec.c
libgstdvdec_la_CFLAGS = $(GST_CFLAGS) libgstdvdec_la_CFLAGS = $(GST_CFLAGS)
libgstdvdec_la_LIBADD = $(GST_LIBS) $(DV_LIBS) libgstdvdec_la_LIBADD = $(DV_LIBS)
libgstdvdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstdvdec_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstdvdec.h noinst_HEADERS = gstdvdec.h

View File

@ -15,7 +15,7 @@ main (int argc,char *argv[])
GstElement *bin; GstElement *bin;
GstElement *src; GstElement *src;
GstElement *dvdec; GstElement *dvdec;
//GstElement *cspace; /*GstElement *cspace; */
GstElement *deint; GstElement *deint;
GstElement *videosink; GstElement *videosink;
@ -40,7 +40,7 @@ main (int argc,char *argv[])
} }
dvdec = gst_elementfactory_make ("dvdec", "decoder"); dvdec = gst_elementfactory_make ("dvdec", "decoder");
if (!dvdec) fprintf(stderr,"no dvdec\n"),exit(1); if (!dvdec) fprintf(stderr,"no dvdec\n"),exit(1);
// cspace = gst_elementfactory_make ("colorspace", "cspace"); /* cspace = gst_elementfactory_make ("colorspace", "cspace"); */
deint = gst_elementfactory_make ("deinterlace", "deinterlace"); deint = gst_elementfactory_make ("deinterlace", "deinterlace");
videosink = gst_elementfactory_make ("xvideosink", "videosink"); videosink = gst_elementfactory_make ("xvideosink", "videosink");
if (!videosink) fprintf(stderr,"no dvdec\n"),exit(1); if (!videosink) fprintf(stderr,"no dvdec\n"),exit(1);
@ -48,12 +48,12 @@ main (int argc,char *argv[])
gst_bin_add(GST_BIN(bin),GST_ELEMENT(src)); gst_bin_add(GST_BIN(bin),GST_ELEMENT(src));
gst_bin_add(GST_BIN(bin),GST_ELEMENT(dvdec)); gst_bin_add(GST_BIN(bin),GST_ELEMENT(dvdec));
// gst_bin_add(GST_BIN(bin),GST_ELEMENT(cspace)); /* gst_bin_add(GST_BIN(bin),GST_ELEMENT(cspace)); */
gst_bin_add(GST_BIN(bin),GST_ELEMENT(videosink)); gst_bin_add(GST_BIN(bin),GST_ELEMENT(videosink));
gst_element_connect(src,"src",dvdec,"sink"); gst_element_connect(src,"src",dvdec,"sink");
// gst_element_connect(cspace,"src",videosink,"sink"); /* gst_element_connect(cspace,"src",videosink,"sink"); */
// gst_element_connect(dvdec,"video",cspace,"sink"); /* gst_element_connect(dvdec,"video",cspace,"sink"); */
gst_element_connect(dvdec,"video",deint,"sink"); gst_element_connect(dvdec,"video",deint,"sink");
gst_element_connect(deint,"src",videosink,"sink"); gst_element_connect(deint,"src",videosink,"sink");
@ -62,7 +62,7 @@ main (int argc,char *argv[])
vbox1 = gtk_vbox_new (FALSE, 0); vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1); gtk_widget_show (vbox1);
button = gtk_button_new_with_label(_("test"));//_with_label (_("chup")); button = gtk_button_new_with_label(_("test"));/*_with_label (_("chup")); */
gtk_widget_show (button); gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);

View File

@ -142,7 +142,7 @@ static GstElementClass *parent_class = NULL;
/* This array holds the ids of the signals registered for this object. /* This array holds the ids of the signals registered for this object.
* The array indexes are based on the enum up above. * The array indexes are based on the enum up above.
*/ */
//static guint gst_dvdec_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_dvdec_signals[LAST_SIGNAL] = { 0 }; */
/* This function is used to register and subsequently return the type /* This function is used to register and subsequently return the type
* identifier for this object class. On first invocation, it will * identifier for this object class. On first invocation, it will
@ -198,7 +198,7 @@ gst_dvdec_class_init (GstDVDecClass *klass)
gstelement_class->change_state = gst_dvdec_change_state; gstelement_class->change_state = gst_dvdec_change_state;
// table initialization, only do once /* table initialization, only do once */
dv_init(); dv_init();
} }

View File

@ -4,12 +4,12 @@ plugin_LTLIBRARIES = libesdsink.la libesdmon.la
libesdsink_la_SOURCES = esdsink.c libesdsink_la_SOURCES = esdsink.c
libesdsink_la_CFLAGS = $(GST_CFLAGS) $(ESD_CFLAGS) libesdsink_la_CFLAGS = $(GST_CFLAGS) $(ESD_CFLAGS)
libesdsink_la_LIBADD = $(GST_LIBS) $(ESD_LIBS) libesdsink_la_LIBADD = $(ESD_LIBS)
libesdsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libesdsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libesdmon_la_SOURCES = esdmon.c libesdmon_la_SOURCES = esdmon.c
libesdmon_la_CFLAGS = $(GST_CFLAGS) $(ESD_CFLAGS) libesdmon_la_CFLAGS = $(GST_CFLAGS) $(ESD_CFLAGS)
libesdmon_la_LIBADD = $(GST_LIBS) $(ESD_LIBS) libesdmon_la_LIBADD = $(ESD_LIBS)
libesdmon_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libesdmon_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = esdsink.h noinst_HEADERS = esdsink.h

View File

@ -210,10 +210,10 @@ gst_esdmon_class_init (GstEsdmonClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BYTESPERREAD, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BYTESPERREAD,
g_param_spec_ulong("bytes_per_read","bytes_per_read","bytes_per_read", g_param_spec_ulong("bytes_per_read","bytes_per_read","bytes_per_read",
0,G_MAXULONG,0,G_PARAM_READWRITE)); // CHECKME 0,G_MAXULONG,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CUROFFSET, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CUROFFSET,
g_param_spec_ulong("curoffset","curoffset","curoffset", g_param_spec_ulong("curoffset","curoffset","curoffset",
0,G_MAXULONG,0,G_PARAM_READABLE)); // CHECKME 0,G_MAXULONG,0,G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DEPTH, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DEPTH,
g_param_spec_enum("depth","depth","depth", g_param_spec_enum("depth","depth","depth",
GST_TYPE_ESDMON_DEPTHS,16,G_PARAM_READWRITE)); /* CHECKME! */ GST_TYPE_ESDMON_DEPTHS,16,G_PARAM_READWRITE)); /* CHECKME! */
@ -299,9 +299,9 @@ gst_esdmon_get (GstPad *pad)
"oss_src", "oss_src",
"audio/raw", "audio/raw",
"format", GST_PROPS_STRING ("int"), "format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0), //FIXME "law", GST_PROPS_INT (0), /*FIXME */
"endianness", GST_PROPS_INT (G_BYTE_ORDER), //FIXME "endianness", GST_PROPS_INT (G_BYTE_ORDER), /*FIXME */
"signed", GST_PROPS_BOOLEAN (TRUE), //FIXME "signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */
"width", GST_PROPS_INT (esdmon->depth), "width", GST_PROPS_INT (esdmon->depth),
"depth", GST_PROPS_INT (esdmon->depth), "depth", GST_PROPS_INT (esdmon->depth),
"rate", GST_PROPS_INT (esdmon->frequency), "rate", GST_PROPS_INT (esdmon->frequency),

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstflac.la
libgstflac_la_SOURCES = gstflac.c gstflacenc.c gstflacdec.c libgstflac_la_SOURCES = gstflac.c gstflacenc.c gstflacdec.c
libgstflac_la_CFLAGS = $(GST_CFLAGS) libgstflac_la_CFLAGS = $(GST_CFLAGS)
libgstflac_la_LIBADD = $(GST_LIBS) $(FLAC_LIBS) libgstflac_la_LIBADD = $(FLAC_LIBS)
libgstflac_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstflac_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstflacenc.h gstflacdec.h noinst_HEADERS = gstflacenc.h gstflacdec.h

View File

@ -20,7 +20,7 @@
#include <string.h> #include <string.h>
#include <sys/soundcard.h> #include <sys/soundcard.h>
//#define DEBUG_ENABLED /*#define DEBUG_ENABLED */
#include "gstflacdec.h" #include "gstflacdec.h"
@ -65,7 +65,7 @@ static FLAC__StreamDecoderWriteStatus gst_flacdec_write (const FLAC__StreamDec
void *client_data); void *client_data);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_flacdec_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_flacdec_signals[LAST_SIGNAL] = { 0 }; */
GType GType
flacdec_get_type(void) { flacdec_get_type(void) {
@ -153,7 +153,7 @@ gst_flacdec_read (const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], unsig
} }
if (*bytes < insize) { if (*bytes < insize) {
// we have more than we can handle /* we have more than we can handle */
flacdec->data_left = inbuf; flacdec->data_left = inbuf;
flacdec->offset_left += *bytes; flacdec->offset_left += *bytes;
inbuf = NULL; inbuf = NULL;

View File

@ -60,7 +60,7 @@ static void gst_flacenc_metadata_callback (const FLAC__StreamEncoder *encoder,
void *client_data); void *client_data);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_flacenc_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_flacenc_signals[LAST_SIGNAL] = { 0 }; */
GType GType
flacenc_get_type (void) flacenc_get_type (void)
@ -95,7 +95,7 @@ gst_flacenc_class_init (FlacEncClass *klass)
parent_class = g_type_class_ref(GST_TYPE_ELEMENT); parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
// we have no properties atm so this is a bit silly /* we have no properties atm so this is a bit silly */
gobject_class->set_property = gst_flacenc_set_property; gobject_class->set_property = gst_flacenc_set_property;
gobject_class->get_property = gst_flacenc_get_property; gobject_class->get_property = gst_flacenc_get_property;
} }

View File

@ -6,7 +6,7 @@ libgstjpeg_la_SOURCES = gstjpeg.c gstjpegdec.c gstjpegenc.c
libgstjpeg_la_CFLAGS = $(GST_CFLAGS) libgstjpeg_la_CFLAGS = $(GST_CFLAGS)
## FIXME: check these CFLAGS ## FIXME: check these CFLAGS
## -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math -DNDEBUG ## -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math -DNDEBUG
libgstjpeg_la_LIBADD = $(GST_LIBS) $(JPEG_LIBS) libgstjpeg_la_LIBADD = $(JPEG_LIBS)
libgstjpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstjpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstjpegdec.h gstjpegenc.h noinst_HEADERS = gstjpegdec.h gstjpegenc.h

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstladspa.la
libgstladspa_la_SOURCES = gstladspa.c search.c load.c libgstladspa_la_SOURCES = gstladspa.c search.c load.c
libgstladspa_la_CFLAGS = $(GST_CFLAGS) libgstladspa_la_CFLAGS = $(GST_CFLAGS)
libgstladspa_la_LIBADD = $(GST_LIBS) libgstladspa_la_LIBADD =
libgstladspa_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstladspa_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstladspa.h ladspa.h utils.h 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) { 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); g_return_if_fail (GST_STATE(object) != GST_STATE_NULL);
ladspa->loopbased = g_value_get_boolean (value); ladspa->loopbased = g_value_get_boolean (value);
if (ladspa->loopbased) { if (ladspa->loopbased) {

View File

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

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstmikmod.la
libgstmikmod_la_SOURCES = gstmikmod.c drv_gst.c mikmod_reader.c mikmod_types.c libgstmikmod_la_SOURCES = gstmikmod.c drv_gst.c mikmod_reader.c mikmod_types.c
libgstmikmod_la_CFLAGS = $(GST_CFLAGS) $(MIKMOD_CFLAGS) libgstmikmod_la_CFLAGS = $(GST_CFLAGS) $(MIKMOD_CFLAGS)
libgstmikmod_la_LIBADD = $(GST_LIBS) $(MIKMOD_LIBS) libgstmikmod_la_LIBADD = $(MIKMOD_LIBS)
libgstmikmod_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmikmod_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmikmod.h noinst_HEADERS = gstmikmod.h

View File

@ -535,7 +535,7 @@ gst_mikmod_set_property (GObject *object, guint id, const GValue *value, GParamS
filter->stereo = g_value_get_boolean (value); filter->stereo = g_value_get_boolean (value);
break; break;
default: default:
// G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); /* G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); */
break; break;
} }
} }
@ -593,7 +593,7 @@ gst_mikmod_get_property (GObject *object, guint id, GValue *value, GParamSpec *p
g_value_set_boolean (value, filter->stereo); g_value_set_boolean (value, filter->stereo);
break; break;
default: default:
// G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); /* G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); */
break; break;
} }
} }

View File

@ -80,7 +80,7 @@ int need_sync;
GType gst_mikmod_get_type(void); GType gst_mikmod_get_type(void);
// symbols for mikmod_reader.h /* symbols for mikmod_reader.h */
struct _GST_READER struct _GST_READER
{ {
MREADER core; MREADER core;
@ -95,7 +95,7 @@ typedef struct _GST_READER GST_READER;
MREADER *GST_READER_new( GstMikMod *mik ); MREADER *GST_READER_new( GstMikMod *mik );
// symbols for drv_gst.c /* symbols for drv_gst.c */
extern MDRIVER drv_gst; extern MDRIVER drv_gst;
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgst1394.la
libgst1394_la_SOURCES = gst1394.c gstdv1394src.c libgst1394_la_SOURCES = gst1394.c gstdv1394src.c
libgst1394_la_CFLAGS = $(GST_CFLAGS) libgst1394_la_CFLAGS = $(GST_CFLAGS)
libgst1394_la_LIBADD = $(GST_LIBS) $(raw1394_LIBS) libgst1394_la_LIBADD = $(raw1394_LIBS)
libgst1394_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgst1394_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstdv1394src.h noinst_HEADERS = gstdv1394src.h

View File

@ -63,7 +63,7 @@ static GstElementStateReturn gst_dv1394src_change_state (GstElement *element);
static GstBuffer * gst_dv1394src_get (GstPad *pad); static GstBuffer * gst_dv1394src_get (GstPad *pad);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_dv1394src_get_type(void) { gst_dv1394src_get_type(void) {
@ -152,7 +152,7 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
GstBuffer *buf; GstBuffer *buf;
if (len > 16) { if (len > 16) {
//fprintf(stderr,"section_type %d, dif_sequence %d, dif_block %d\n",ptr[0] >> 5,ptr[1] >> 4,ptr[2]); /*fprintf(stderr,"section_type %d, dif_sequence %d, dif_block %d\n",ptr[0] >> 5,ptr[1] >> 4,ptr[2]); */
fprintf(stderr,"."); fprintf(stderr,".");
if (((ptr[0] >> 5) == 0) && if (((ptr[0] >> 5) == 0) &&
((ptr[1] >> 4) == 0) && (ptr[2] == 0)) dv1394src->started = TRUE; ((ptr[1] >> 4) == 0) && (ptr[2] == 0)) dv1394src->started = TRUE;

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstauparse.la
libgstauparse_la_SOURCES = gstauparse.c libgstauparse_la_SOURCES = gstauparse.c
libgstauparse_la_CFLAGS = $(GST_CFLAGS) libgstauparse_la_CFLAGS = $(GST_CFLAGS)
libgstauparse_la_LIBADD = $(GST_LIBS) libgstauparse_la_LIBADD =
libgstauparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstauparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstauparse.h noinst_HEADERS = gstauparse.h

View File

@ -113,7 +113,7 @@ static void gst_auparse_init (GstAuParse *auparse);
static void gst_auparse_chain (GstPad *pad,GstBuffer *buf); static void gst_auparse_chain (GstPad *pad,GstBuffer *buf);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_auparse_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_auparse_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_auparse_get_type (void) gst_auparse_get_type (void)

View File

@ -20,19 +20,19 @@ noinst_HEADERS = \
#CFLAGS += -Wall -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -DNDEBUG #CFLAGS += -Wall -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -DNDEBUG
libgstavidemux_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) libgstavidemux_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstavidemux_la_LIBADD = $(GST_LIBS) libgstavidemux_la_LIBADD =
libgstavidemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstavidemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstavimux_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) libgstavimux_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstavimux_la_LIBADD = $(GST_LIBS) libgstavimux_la_LIBADD =
libgstavimux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstavimux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstaviaudiodecoder_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) libgstaviaudiodecoder_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstaviaudiodecoder_la_LIBADD = $(GST_LIBS) libgstaviaudiodecoder_la_LIBADD =
libgstaviaudiodecoder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaviaudiodecoder_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcdxaparse_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) libgstcdxaparse_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstcdxaparse_la_LIBADD = $(GST_LIBS) libgstcdxaparse_la_LIBADD =
libgstcdxaparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstcdxaparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
EXTRA_DIST = README_win32dll README EXTRA_DIST = README_win32dll README

View File

@ -233,7 +233,7 @@ gst_avi_demux_init (GstAviDemux *avi_demux)
avi_demux->state = GST_AVI_DEMUX_UNKNOWN; avi_demux->state = GST_AVI_DEMUX_UNKNOWN;
avi_demux->num_audio_pads = 0; avi_demux->num_audio_pads = 0;
avi_demux->num_video_pads = 0; avi_demux->num_video_pads = 0;
//avi_demux->next_time = 500000; /*avi_demux->next_time = 500000; */
avi_demux->next_time = 0; avi_demux->next_time = 0;
avi_demux->init_audio = 0; avi_demux->init_audio = 0;
avi_demux->flags = 0; avi_demux->flags = 0;
@ -803,7 +803,7 @@ gst_avidemux_process_chunk (GstAviDemux *avi_demux, guint64 *filepos,
chunkid, *chunksize); chunkid, *chunksize);
if (avi_demux->init_audio) { if (avi_demux->init_audio) {
//avi_demux->next_time += (*chunksize) * 1000000LL / avi_demux->audio_rate; /*avi_demux->next_time += (*chunksize) * 1000000LL / avi_demux->audio_rate; */
avi_demux->init_audio--; avi_demux->init_audio--;
} }

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstcutter.la
libgstcutter_la_SOURCES = gstcutter.c libgstcutter_la_SOURCES = gstcutter.c
libgstcutter_la_CFLAGS = $(GST_CFLAGS) libgstcutter_la_CFLAGS = $(GST_CFLAGS)
libgstcutter_la_LIBADD = $(GST_LIBS) libgstcutter_la_LIBADD =
libgstcutter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstcutter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstcutter.h filter.func noinst_HEADERS = gstcutter.h filter.func

View File

@ -120,17 +120,17 @@ gst_cutter_class_init (GstCutterClass *klass)
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD,
g_param_spec_double ("threshold", "threshold", "threshold", g_param_spec_double ("threshold", "threshold", "threshold",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); // CHECKME -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD_DB, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_THRESHOLD_DB,
g_param_spec_double ("threshold_dB", "threshold_dB", "threshold_dB", g_param_spec_double ("threshold_dB", "threshold_dB", "threshold_dB",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); // CHECKME -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RUN_LENGTH, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RUN_LENGTH,
g_param_spec_double ("runlength", "runlength", "runlength", g_param_spec_double ("runlength", "runlength", "runlength",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); // CHECKME -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PRE_LENGTH, g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PRE_LENGTH,
g_param_spec_double ("prelength", "prelength", "prelength", g_param_spec_double ("prelength", "prelength", "prelength",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); // CHECKME -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); /* CHECKME */
gst_cutter_signals[CUT_START] = gst_cutter_signals[CUT_START] =
g_signal_new ("cut_start", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, g_signal_new ("cut_start", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstCutterClass, cut_start), NULL, NULL, G_STRUCT_OFFSET (GstCutterClass, cut_start), NULL, NULL,
@ -214,7 +214,7 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf)
/* if RMS below threshold, add buffer length to silent run length count /* if RMS below threshold, add buffer length to silent run length count
* if not, reset * if not, reset
*/ */
//g_print ("DEBUG: cutter: ms %f, RMS %f\n", ms, RMS); /*g_print ("DEBUG: cutter: ms %f, RMS %f\n", ms, RMS); */
if (RMS < filter->threshold_level) if (RMS < filter->threshold_level)
filter->silent_run_length += gst_audio_length (filter->srcpad, buf); filter->silent_run_length += gst_audio_length (filter->srcpad, buf);
else else
@ -234,12 +234,12 @@ gst_cutter_chain (GstPad *pad, GstBuffer *buf)
{ {
if (filter->silent) if (filter->silent)
{ {
// g_print ("DEBUG: cutter: cut to here, turning off out\n"); /* g_print ("DEBUG: cutter: cut to here, turning off out\n"); */
gtk_signal_emit (G_OBJECT (filter), gst_cutter_signals[CUT_STOP]); gtk_signal_emit (G_OBJECT (filter), gst_cutter_signals[CUT_STOP]);
} }
else else
{ {
// g_print ("DEBUG: cutter: start from here, turning on out\n"); /* g_print ("DEBUG: cutter: start from here, turning on out\n"); */
/* first of all, flush current buffer */ /* first of all, flush current buffer */
gtk_signal_emit (G_OBJECT (filter), gst_cutter_signals[CUT_START]); gtk_signal_emit (G_OBJECT (filter), gst_cutter_signals[CUT_START]);
g_print ("DEBUG: cutter: flushing buffer "); g_print ("DEBUG: cutter: flushing buffer ");
@ -386,7 +386,7 @@ gst_cutter_get_caps (GstPad *pad, GstCutter* filter)
GstCaps *caps = NULL; GstCaps *caps = NULL;
caps = GST_PAD_CAPS (pad); 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) if (caps == NULL)
printf ("WARNING: cutter: get_caps: Could not get caps of pad !\n"); printf ("WARNING: cutter: get_caps: Could not get caps of pad !\n");
filter->width = gst_caps_get_int (caps, "width"); filter->width = gst_caps_get_int (caps, "width");

View File

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

View File

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

View File

@ -16,7 +16,7 @@ noinst_HEADERS = filters.h goom_core.h goom_tools.h graphic.h lines.h
#CFLAGS += -Wall -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -DNDEBUG #CFLAGS += -Wall -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -DNDEBUG
libgstgoom_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) libgstgoom_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS)
libgstgoom_la_LIBADD = $(GST_LIBS) libgstgoom_la_LIBADD =
libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
EXTRA_DIST = filters.c filters_mmx.s EXTRA_DIST = filters.c filters_mmx.s

View File

@ -10,7 +10,7 @@
* la vitesse est maintenant comprise dans [0..128] au lieu de [0..100] * la vitesse est maintenant comprise dans [0..128] au lieu de [0..100]
*/ */
//#define _DEBUG_PIXEL; /*#define _DEBUG_PIXEL; */
#include "filters.h" #include "filters.h"
#include "graphic.h" #include "graphic.h"
@ -51,8 +51,8 @@ unsigned int ppcsize4;
#endif /* PowerPC */ #endif /* PowerPC */
unsigned int *coeffs = 0, *freecoeffs = 0; unsigned int *coeffs = 0, *freecoeffs = 0;
guint32 *expix1 = 0; // pointeur exporte vers p1 guint32 *expix1 = 0; /* pointeur exporte vers p1 */
guint32 *expix2 = 0; // pointeur exporte vers p2 guint32 *expix2 = 0; /* pointeur exporte vers p2 */
guint32 zoom_width; guint32 zoom_width;
#endif /* ASM */ #endif /* ASM */
@ -70,7 +70,7 @@ static unsigned char sqrtperte = 16 ;
static int * firedec = 0 ; static int * firedec = 0 ;
// retourne x>>s , en testant le signe de x /* retourne x>>s , en testant le signe de x */
inline int ShiftRight (int x, const unsigned char s) inline int ShiftRight (int x, const unsigned char s)
{ {
if (x<0) if (x<0)
@ -151,16 +151,16 @@ inline void calculatePXandPY (int x, int y, int *px, int *py)
} }
} }
//#define _DEBUG /*#define _DEBUG */
inline void setPixelRGB(Uint *buffer, Uint x, Uint y, Color c) inline void setPixelRGB(Uint *buffer, Uint x, Uint y, Color c)
{ {
// buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b /* buffer[ y*WIDTH + x ] = (c.r<<16)|(c.v<<8)|c.b */
#ifdef _DEBUG_PIXEL #ifdef _DEBUG_PIXEL
if ( x+y*resolx >= resolx * resoly) if ( x+y*resolx >= resolx * resoly)
{ {
fprintf (stderr,"setPixel ERROR : hors du tableau... %i, %i\n", x,y) ; fprintf (stderr,"setPixel ERROR : hors du tableau... %i, %i\n", x,y) ;
//exit (1) ; /*exit (1) ; */
} }
#endif #endif
@ -214,7 +214,7 @@ inline void getPixelRGB (Uint *buffer, Uint x, Uint y, Color *c)
c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + (x + y*resolx))); c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + (x + y*resolx)));
c->v = *(unsigned char *)(++tmp8); c->v = *(unsigned char *)(++tmp8);
c->r = *(unsigned char *)(++tmp8); c->r = *(unsigned char *)(++tmp8);
// *c = (Color) buffer[x+y*WIDTH] ; /* *c = (Color) buffer[x+y*WIDTH] ; */
#endif #endif
} }
@ -242,7 +242,7 @@ inline void getPixelRGB_ (Uint *buffer, Uint x, Color *c)
c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + x)); c->b = *(unsigned char *)(tmp8 = (unsigned char*)(buffer + x));
c->v = *(unsigned char *)(++tmp8); c->v = *(unsigned char *)(++tmp8);
c->r = *(unsigned char *)(++tmp8); c->r = *(unsigned char *)(++tmp8);
// *c = (Color) buffer[x+y*WIDTH] ; /* *c = (Color) buffer[x+y*WIDTH] ; */
#endif #endif
} }
@ -255,14 +255,14 @@ void zoomFilterFastRGB (Uint *pix1,
{ {
static guint32 prevX = 0, prevY = 0; static guint32 prevX = 0, prevY = 0;
static char reverse = 0 ; //vitesse inversé..(zoom out) static char reverse = 0 ; /*vitesse inversé..(zoom out) */
// static int perte = 100; // 100 = normal /* static int perte = 100; // 100 = normal */
static unsigned char pertedec = 8 ; static unsigned char pertedec = 8 ;
static char firstTime = 1; static char firstTime = 1;
Uint x, y; Uint x, y;
// static unsigned int prevX = 0, prevY = 0; /* static unsigned int prevX = 0, prevY = 0; */
#ifdef USE_ASM #ifdef USE_ASM
expix1 = pix1 ; expix1 = pix1 ;
@ -322,7 +322,7 @@ void zoomFilterFastRGB (Uint *pix1,
if (firstTime || zf) if (firstTime || zf)
{ {
// generation d'une table de sinus /* generation d'une table de sinus */
if (firstTime) if (firstTime)
{ {
unsigned short us ; unsigned short us ;
@ -387,15 +387,15 @@ void zoomFilterFastRGB (Uint *pix1,
} }
// generation du buffer /* generation du buffer */
for (y = 0 ; y < prevY ; y++) for (y = 0 ; y < prevY ; y++)
for (x = 0; x < prevX ; x++) for (x = 0; x < prevX ; x++)
{ {
int px,py; int px,py;
unsigned char coefv,coefh; unsigned char coefv,coefh;
// calculer px et py en fonction de /* calculer px et py en fonction de */
// x,y,middleX,middleY et theMode /* x,y,middleX,middleY et theMode */
calculatePXandPY (x,y,&px, &py) ; calculatePXandPY (x,y,&px, &py) ;
if ((px == x << 4) && (py == y << 4)) if ((px == x << 4) && (py == y << 4))
py += 8 ; py += 8 ;

View File

@ -5,7 +5,7 @@
#include "filters.h" #include "filters.h"
#include "lines.h" #include "lines.h"
//#define VERBOSE /*#define VERBOSE */
#ifdef VERBOSE #ifdef VERBOSE
#include <stdio.h> #include <stdio.h>
@ -63,21 +63,21 @@ void goom_set_resolution (guint32 resx, guint32 resy)
guint32 * goom_update (gint16 data [2][512]) guint32 * goom_update (gint16 data [2][512])
{ {
static int lockvar = 0 ; // pour empecher de nouveaux changements static int lockvar = 0 ; /* pour empecher de nouveaux changements */
static int goomvar = 0 ; // boucle des gooms static int goomvar = 0 ; /* boucle des gooms */
static int totalgoom = 0 ; // nombre de gooms par seconds static int totalgoom = 0 ; /* nombre de gooms par seconds */
static int agoom = 0 ; // un goom a eu lieu.. static int agoom = 0 ; /* un goom a eu lieu.. */
static int loopvar = 0 ; // mouvement des points static int loopvar = 0 ; /* mouvement des points */
static int speedvar = 0 ; // vitesse des particules static int speedvar = 0 ; /* vitesse des particules */
static int lineMode = 0 ; // l'effet lineaire a dessiner static int lineMode = 0 ; /* l'effet lineaire a dessiner */
guint32 * return_val; guint32 * return_val;
guint32 pointWidth; guint32 pointWidth;
guint32 pointHeight; guint32 pointHeight;
int incvar ; // volume du son int incvar ; /* volume du son */
int accelvar ; // acceleration des particules int accelvar ; /* acceleration des particules */
int i ; int i ;
float largfactor ; // elargissement de l'intervalle d'évolution des points float largfactor ; /* elargissement de l'intervalle d'évolution des points */
static char goomlimit = 2 ; // sensibilité du goom static char goomlimit = 2 ; /* sensibilité du goom */
static ZoomFilterData zfd = static ZoomFilterData zfd =
{ {
128, 8, 16, 128, 8, 16,
@ -143,26 +143,26 @@ guint32 * goom_update (gint16 data [2][512])
66.0f, 74.0f, loopvar + i * 500); 66.0f, 74.0f, loopvar + i * 500);
} }
// par défaut pas de changement de zoom /* par défaut pas de changement de zoom */
pzfd = NULL ; pzfd = NULL ;
// diminuer de 1 le temps de lockage /* diminuer de 1 le temps de lockage */
// note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un /* note pour ceux qui n'ont pas suivis : le lockvar permet d'empecher un */
// changement d'etat du plugins juste apres un autre changement d'etat. oki ? /* changement d'etat du plugins juste apres un autre changement d'etat. oki ? */
if (--lockvar < 0) lockvar = 0 ; if (--lockvar < 0) lockvar = 0 ;
// temps du goom /* temps du goom */
if (--agoom < 0) agoom = 0 ; if (--agoom < 0) agoom = 0 ;
// on verifie qu'il ne se pas un truc interressant avec le son. /* on verifie qu'il ne se pas un truc interressant avec le son. */
if ((accelvar>goomlimit) || (accelvar<-goomlimit)) if ((accelvar>goomlimit) || (accelvar<-goomlimit))
{ {
// UN GOOM !!! YAHOO ! /* UN GOOM !!! YAHOO ! */
totalgoom ++ ; totalgoom ++ ;
agoom = 20 ; // mais pdt 20 cycles, il n'y en aura plus. agoom = 20 ; /* mais pdt 20 cycles, il n'y en aura plus. */
lineMode = (lineMode + 1)%20; // Tous les 10 gooms on change de mode lineaire lineMode = (lineMode + 1)%20; /* Tous les 10 gooms on change de mode lineaire */
// changement eventuel de mode /* changement eventuel de mode */
switch (iRAND(10)) switch (iRAND(10))
{ {
case 0: case 0:
@ -190,20 +190,20 @@ guint32 * goom_update (gint16 data [2][512])
} }
} }
// tout ceci ne sera fait qu'en cas de non-blocage /* tout ceci ne sera fait qu'en cas de non-blocage */
if (lockvar == 0) if (lockvar == 0)
{ {
// reperage de goom (acceleration forte de l'acceleration du volume) /* reperage de goom (acceleration forte de l'acceleration du volume) */
// -> coup de boost de la vitesse si besoin.. /* -> coup de boost de la vitesse si besoin.. */
if ( (accelvar>goomlimit) || (accelvar<-goomlimit) ) if ( (accelvar>goomlimit) || (accelvar<-goomlimit) )
{ {
goomvar ++ ; goomvar ++ ;
//if (goomvar % 1 == 0) /*if (goomvar % 1 == 0) */
{ {
guint32 vtmp ; guint32 vtmp ;
guint32 newvit ; guint32 newvit ;
newvit = STOP_SPEED - speedvar / 2 ; newvit = STOP_SPEED - speedvar / 2 ;
// retablir le zoom avant.. /* retablir le zoom avant.. */
if ((zfd.reverse) && if ((zfd.reverse) &&
(!(cycle%12)) && (!(cycle%12)) &&
(rand ()%3==0)) (rand ()%3==0))
@ -218,7 +218,7 @@ guint32 * goom_update (gint16 data [2][512])
lockvar = 100; lockvar = 100;
} }
// changement de milieu.. /* changement de milieu.. */
switch (iRAND(20)) switch (iRAND(20))
{ {
case 0: case 0:
@ -299,7 +299,7 @@ guint32 * goom_update (gint16 data [2][512])
zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect; zfd.hPlaneEffect = iRAND (2) ? 0 : zfd.hPlaneEffect;
} }
if (newvit < zfd.vitesse) // on accelere if (newvit < zfd.vitesse) /* on accelere */
{ {
pzfd = &zfd; pzfd = &zfd;
if ( ( (newvit < STOP_SPEED - 7) && if ( ( (newvit < STOP_SPEED - 7) &&
@ -318,7 +318,7 @@ guint32 * goom_update (gint16 data [2][512])
} }
} }
} }
// mode mega-lent /* mode mega-lent */
if (iRAND(1000) == 0) if (iRAND(1000) == 0)
{ {
/* /*
@ -333,7 +333,7 @@ guint32 * goom_update (gint16 data [2][512])
} }
} }
// gros frein si la musique est calme /* gros frein si la musique est calme */
if ((speedvar < 1) && (zfd.vitesse < STOP_SPEED - 4) && (cycle % 16 == 0)) if ((speedvar < 1) && (zfd.vitesse < STOP_SPEED - 4) && (cycle % 16 == 0))
{ {
/* /*
@ -349,7 +349,7 @@ guint32 * goom_update (gint16 data [2][512])
*/ */
} }
// baisser regulierement la vitesse... /* baisser regulierement la vitesse... */
if ( (cycle % 73 == 0) && (zfd.vitesse < STOP_SPEED - 5)) if ( (cycle % 73 == 0) && (zfd.vitesse < STOP_SPEED - 5))
{ {
/* /*
@ -359,7 +359,7 @@ guint32 * goom_update (gint16 data [2][512])
zfd.vitesse ++ ; zfd.vitesse ++ ;
} }
// arreter de decrémenter au bout d'un certain temps /* arreter de decrémenter au bout d'un certain temps */
if ((cycle % 101 == 0) && (zfd.pertedec == 7)) if ((cycle % 101 == 0) && (zfd.pertedec == 7))
{ {
pzfd = &zfd ; pzfd = &zfd ;
@ -374,10 +374,10 @@ guint32 * goom_update (gint16 data [2][512])
} }
#endif #endif
// Zoom here ! /* Zoom here ! */
zoomFilterFastRGB (p1, p2, pzfd, resolx, resoly) ; zoomFilterFastRGB (p1, p2, pzfd, resolx, resoly) ;
// si on est dans un goom : afficher les lignes... /* si on est dans un goom : afficher les lignes... */
if (agoom > 15) goom_lines if (agoom > 15) goom_lines
(data, (data,
((zfd.middleX==resolx/2) && (zfd.middleY==resoly/2) && (zfd.mode!=WATER_MODE)) ((zfd.middleX==resolx/2) && (zfd.middleY==resoly/2) && (zfd.mode!=WATER_MODE))
@ -389,16 +389,16 @@ guint32 * goom_update (gint16 data [2][512])
p1=p2; p1=p2;
p2=tmp; p2=tmp;
// affichage et swappage des buffers.. /* affichage et swappage des buffers.. */
cycle++; cycle++;
// tous les 100 cycles : vérifier si le taux de goom est correct /* tous les 100 cycles : vérifier si le taux de goom est correct */
// et le modifier sinon.. /* et le modifier sinon.. */
if (!(cycle%100)) if (!(cycle%100))
{ {
if (totalgoom>15) if (totalgoom>15)
{ {
// printf ("less gooms\n") ; /* printf ("less gooms\n") ; */
goomlimit ++ ; goomlimit ++ ;
} }
else else

View File

@ -23,7 +23,7 @@ extern unsigned short rand_pos ;
rand_tab = 0; rand_tab = 0;
//#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) /*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */
#define iRAND(i) (RAND()%i) #define iRAND(i) (RAND()%i)
#endif #endif

View File

@ -38,11 +38,11 @@ struct _GstGOOM {
GstPad *sinkpad,*srcpad; GstPad *sinkpad,*srcpad;
GstBufferPool *peerpool; GstBufferPool *peerpool;
// the timestamp of the next frame /* the timestamp of the next frame */
guint64 next_time; guint64 next_time;
gint16 datain[2][512]; gint16 datain[2][512];
// video state /* video state */
gint fps; gint fps;
gint width; gint width;
gint height; gint height;
@ -198,11 +198,11 @@ gst_goom_init (GstGOOM *goom)
goom->next_time = 0; goom->next_time = 0;
goom->peerpool = NULL; goom->peerpool = NULL;
// reset the initial video state /* reset the initial video state */
goom->first_buffer = TRUE; goom->first_buffer = TRUE;
goom->width = 320; goom->width = 320;
goom->height = 200; goom->height = 200;
goom->fps = 25; // desired frame rate goom->fps = 25; /* desired frame rate */
} }

View File

@ -27,14 +27,14 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
switch (ID) switch (ID)
{ {
case 0: // Horizontal stereo lines case 0: /* Horizontal stereo lines */
{ {
color1 = 0x0000AA00; color1 = 0x0000AA00;
color2 = 0x00AA0000; color2 = 0x00AA0000;
break; break;
} }
case 1: // Stereo circles case 1: /* Stereo circles */
{ {
color1 = 0x00AA33DD; color1 = 0x00AA33DD;
color2 = 0x00AA33DD; color2 = 0x00AA33DD;
@ -55,7 +55,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
switch (ID) switch (ID)
{ {
case 0: // Horizontal stereo lines case 0: /* Horizontal stereo lines */
{ {
unsigned int i; unsigned int i;
for (i=0;i<512;i++) for (i=0;i<512;i++)
@ -71,7 +71,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
break; break;
} }
case 1: // Stereo circles case 1: /* Stereo circles */
{ {
float z; float z;
unsigned int monX = resolx/2; unsigned int monX = resolx/2;
@ -79,7 +79,7 @@ void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 p
float monY2 = resoly/2; float monY2 = resoly/2;
for (z=0;z<6.2832f; z+=1.0f/monY) for (z=0;z<6.2832f; z+=1.0f/monY)
{ {
// float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */
p[ monX + (unsigned int)( (monY + ((float)resoly) * (128+data[1][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY + ((float)resoly)*(128+data[1][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color1; p[ monX + (unsigned int)( (monY + ((float)resoly) * (128+data[1][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY + ((float)resoly)*(128+data[1][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color1;
p[ monX + (unsigned int)((monY - ((float)resoly) * (128+data[0][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY - ((float)resoly)*(128+data[0][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color2; p[ monX + (unsigned int)((monY - ((float)resoly) * (128+data[0][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY - ((float)resoly)*(128+data[0][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color2;
} }

View File

@ -4,12 +4,12 @@ plugin_LTLIBRARIES = libgstalaw.la libgstmulaw.la
libgstalaw_la_SOURCES = alaw-encode.c mulaw-conversion.c alaw-conversion.c alaw-decode.c alaw.c libgstalaw_la_SOURCES = alaw-encode.c mulaw-conversion.c alaw-conversion.c alaw-decode.c alaw.c
libgstalaw_la_CFLAGS = $(GST_CFLAGS) libgstalaw_la_CFLAGS = $(GST_CFLAGS)
libgstalaw_la_LIBADD = $(GST_LIBS) libgstalaw_la_LIBADD =
libgstalaw_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstalaw_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstmulaw_la_SOURCES = mulaw-encode.c mulaw-conversion.c mulaw-decode.c mulaw.c libgstmulaw_la_SOURCES = mulaw-encode.c mulaw-conversion.c mulaw-decode.c mulaw.c
libgstmulaw_la_CFLAGS = $(GST_CFLAGS) libgstmulaw_la_CFLAGS = $(GST_CFLAGS)
libgstmulaw_la_LIBADD = $(GST_LIBS) libgstmulaw_la_LIBADD =
libgstmulaw_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmulaw_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = mulaw-conversion.h alaw-encode.h alaw-decode.h alaw-conversion.h mulaw-encode.h mulaw-decode.h noinst_HEADERS = mulaw-conversion.h alaw-encode.h alaw-decode.h alaw-conversion.h mulaw-encode.h mulaw-decode.h

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstlevel.la
libgstlevel_la_SOURCES = gstlevel.c libgstlevel_la_SOURCES = gstlevel.c
libgstlevel_la_CFLAGS = $(GST_CFLAGS) libgstlevel_la_CFLAGS = $(GST_CFLAGS)
libgstlevel_la_LIBADD = $(GST_LIBS) libgstlevel_la_LIBADD =
libgstlevel_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstlevel_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstlevel.h filter.func noinst_HEADERS = gstlevel.h filter.func

View File

@ -97,7 +97,7 @@ static void inline gst_level_fast_8bit_chain (gint8* data, gint8** out_data,
guint numsamples); guint numsamples);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_filter_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_level_get_type(void) { gst_level_get_type(void) {
@ -169,7 +169,7 @@ gst_level_chain (GstPad *pad,GstBuffer *buf)
caps = GST_PAD_CAPS(pad); caps = GST_PAD_CAPS(pad);
if (caps == NULL) if (caps == NULL)
{ {
// FIXME : Please change this to a better warning method ! /* FIXME : Please change this to a better warning method ! */
printf ("WARNING : chain : Could not get caps of pad !\n"); printf ("WARNING : chain : Could not get caps of pad !\n");
} }

View File

@ -24,7 +24,7 @@
#include <config.h> #include <config.h>
#include <gst/gst.h> #include <gst/gst.h>
// #include <gst/meta/audioraw.h> /* #include <gst/meta/audioraw.h> */
#ifdef __cplusplus #ifdef __cplusplus
@ -51,7 +51,7 @@ struct _GstLevel {
GstPad *sinkpad,*srcpad; GstPad *sinkpad,*srcpad;
//MetaAudioRaw meta; /*MetaAudioRaw meta; */
}; };

View File

@ -5,7 +5,7 @@ plugin_LTLIBRARIES = libgstmedian.la
libgstmedian_la_SOURCES = gstmedian.c libgstmedian_la_SOURCES = gstmedian.c
libgstmedian_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS) libgstmedian_la_CFLAGS = -O3 $(FOMIT_FRAME_POINTER) -funroll-all-loops -finline-functions -ffast-math $(GST_CFLAGS)
libgstmedian_la_LIBADD = $(GST_LIBS) libgstmedian_la_LIBADD =
libgstmedian_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmedian_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstmedian.h noinst_HEADERS = gstmedian.h

View File

@ -7,6 +7,6 @@ libgstmonoscope_la_SOURCES = gstmonoscope.c monoscope.c convolve.c
noinst_HEADERS = monoscope.h convolve.h noinst_HEADERS = monoscope.h convolve.h
libgstmonoscope_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS) libgstmonoscope_la_CFLAGS = -O2 -ffast-math $(GST_CFLAGS)
libgstmonoscope_la_LIBADD = $(GST_LIBS) libgstmonoscope_la_LIBADD =
libgstmonoscope_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmonoscope_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstsmoothwave.la
libgstsmoothwave_la_SOURCES = gstsmoothwave.c libgstsmoothwave_la_SOURCES = gstsmoothwave.c
libgstsmoothwave_la_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS) 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) libgstsmoothwave_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstsmoothwave.h 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 void gst_smoothwave_chain (GstPad *pad, GstBuffer *buf);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_smoothwave_signals[LAST_SIGNAL] = { 0 }; */
GType GType
@ -92,13 +92,13 @@ gst_smoothwave_class_init (GstSmoothWaveClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH,
g_param_spec_int("width","width","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_object_class_install_property(G_OBJECT_CLASS(klass), ARG_HEIGHT,
g_param_spec_int("height","height","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_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDGET,
g_param_spec_object("widget","widget","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->set_property = gst_smoothwave_set_property;
gobject_class->get_property = gst_smoothwave_get_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); smoothwave->srcpad = gst_pad_new("src",GST_PAD_SRC);
gst_element_add_pad(GST_ELEMENT(smoothwave),smoothwave->srcpad); gst_element_add_pad(GST_ELEMENT(smoothwave),smoothwave->srcpad);
// smoothwave->meta = NULL; /* smoothwave->meta = NULL; */
smoothwave->width = 512; smoothwave->width = 512;
smoothwave->height = 256; smoothwave->height = 256;
gdk_rgb_init(); gdk_rgb_init();
// gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); /* gtk_widget_set_default_colormap (gdk_rgb_get_cmap()); */
// gtk_widget_set_default_visual (gdk_rgb_get_visual()); /* 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++) for (i=0;i<256;i++)
palette[i] = (i << 16) || (i << 8); 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); smoothwave->cmap = gdk_rgb_cmap_new(palette,256);
// GST_DEBUG (0,"created cmap\n"); /* GST_DEBUG (0,"created cmap\n"); */
// gtk_widget_set_default_colormap (smoothwave->cmap); /* gtk_widget_set_default_colormap (smoothwave->cmap); */
smoothwave->image = gtk_drawing_area_new(); smoothwave->image = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(smoothwave->image), 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(pad != NULL);
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
g_return_if_fail(buf != NULL); 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)); smoothwave = GST_SMOOTHWAVE(GST_OBJECT_PARENT (pad));
/* first deal with audio metadata */ /* first deal with audio metadata */
// if (buf->meta) { /* if (buf->meta) { */
// if (smoothwave->meta != NULL) { /* if (smoothwave->meta != NULL) { */
// /* FIXME: need to unref the old metadata so it goes away */ /* /* FIXME: need to unref the old metadata so it goes away */ */
// } /* } */
// /* we just make a copy of the pointer */ /* /* we just make a copy of the pointer */ */
// smoothwave->meta = (MetaAudioRaw *)(buf->meta); /* smoothwave->meta = (MetaAudioRaw *)(buf->meta); */
// /* FIXME: now we have to ref the metadata so it doesn't go away */ /* /* 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); 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)); samplecount = GST_BUFFER_SIZE(buf) / (2 * sizeof(gint16));
qheight = smoothwave->height/4; 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++) { for (i=0;i<MAX(smoothwave->width,samplecount);i++) {
gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 + gint16 y1 = (gint32)(samples[i*2] * qheight) / 32768 +
qheight; qheight;
@ -183,7 +183,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
(qheight*3); (qheight*3);
smoothwave->imagebuffer[y1*smoothwave->width + i] = 0xff; smoothwave->imagebuffer[y1*smoothwave->width + i] = 0xff;
smoothwave->imagebuffer[y2*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; ptr = (guint32 *)smoothwave->imagebuffer;
@ -194,7 +194,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
ptr++; 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", /* GST_DEBUG (0,"gdk_draw_indexed_image(%p,%p,%d,%d,%d,%d,%s,%p,%d,%p);\n",
smoothwave->image->window, smoothwave->image->window,
smoothwave->image->style->fg_gc[GTK_STATE_NORMAL], smoothwave->image->style->fg_gc[GTK_STATE_NORMAL],
@ -214,7 +214,7 @@ gst_smoothwave_chain (GstPad *pad, GstBuffer *buf)
GDK_RGB_DITHER_NORMAL, GDK_RGB_DITHER_NORMAL,
smoothwave->imagebuffer,smoothwave->width); 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); gst_buffer_unref(buf);
} }

View File

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

View File

@ -65,7 +65,7 @@ void gst_spectrum_window(fixed fr[], int n);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_spectrum_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_spectrum_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_spectrum_get_type (void) 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_object_class_install_property(G_OBJECT_CLASS(klass), ARG_WIDTH,
g_param_spec_int("width","width","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; 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)); 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); 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_base = 8;
spec_len = 1024; spec_len = 1024;
@ -186,12 +162,12 @@ gst_spectrum_chain (GstPad *pad, GstBuffer *buf)
g_return_if_fail(loud != NULL); g_return_if_fail(loud != NULL);
memset(im,0,spec_len * sizeof(gint16)); memset(im,0,spec_len * sizeof(gint16));
//if (spectrum->meta->channels == 2) { /*if (spectrum->meta->channels == 2) { */
re = g_malloc(spec_len * sizeof(gint16)); re = g_malloc(spec_len * sizeof(gint16));
for (i=0;i<spec_len;i++) for (i=0;i<spec_len;i++)
re[i] = (samples[(i*2)] + samples[(i*2)+1]) >> 1; re[i] = (samples[(i*2)] + samples[(i*2)+1]) >> 1;
//} else /*} else */
// re = samples; /* re = samples; */
gst_spectrum_window(re,spec_len); gst_spectrum_window(re,spec_len);
gst_spectrum_fix_fft(re,im,spec_base,FALSE); gst_spectrum_fix_fft(re,im,spec_base,FALSE);
gst_spectrum_fix_loud(loud,re,im,spec_len,0); 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; spect[i] = (loud[pos] + 60) / 2;
else else
spect[i] = 0; spect[i] = 0;
// if (spect[i] > 15); /* if (spect[i] > 15); */
// spect[i] = 15; /* spect[i] = 15; */
} }
g_free(loud); g_free(loud);
gst_buffer_unref(buf); gst_buffer_unref(buf);
// g_free(samples); /* g_free(samples); */
newbuf = gst_buffer_new(); newbuf = gst_buffer_new();
g_return_if_fail(newbuf != NULL); g_return_if_fail(newbuf != NULL);

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstudp.la
libgstudp_la_SOURCES = gstudp.c gstudpsrc.c gstudpsink.c libgstudp_la_SOURCES = gstudp.c gstudpsrc.c gstudpsink.c
libgstudp_la_CFLAGS = $(GST_CFLAGS) libgstudp_la_CFLAGS = $(GST_CFLAGS)
libgstudp_la_LIBADD = $(GST_LIBS) libgstudp_la_LIBADD =
libgstudp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstudp_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstudpsink.h gstudpsrc.h noinst_HEADERS = gstudpsink.h gstudpsrc.h

View File

@ -60,7 +60,7 @@ static void gst_udpsink_get_property (GObject *object, guint prop_id,
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_udpsink_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_udpsink_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_udpsink_get_type (void) gst_udpsink_get_type (void)
@ -247,15 +247,15 @@ gst_udpsink_get_property (GObject *object, guint prop_id, GValue *value, GParamS
} }
// create a socket for sending to remote machine /* create a socket for sending to remote machine */
static gboolean static gboolean
gst_udpsink_init_send (GstUDPSink *sink) gst_udpsink_init_send (GstUDPSink *sink)
{ {
struct hostent *he; struct hostent *he;
bzero (&sink->theiraddr, sizeof (sink->theiraddr)); bzero (&sink->theiraddr, sizeof (sink->theiraddr));
sink->theiraddr.sin_family = AF_INET; // host byte order sink->theiraddr.sin_family = AF_INET; /* host byte order */
sink->theiraddr.sin_port = htons (sink->port); // short, network byte order sink->theiraddr.sin_port = htons (sink->port); /* short, network byte order */
if ((he = gethostbyname (sink->host)) == NULL) { if ((he = gethostbyname (sink->host)) == NULL) {
perror("gethostbyname"); perror("gethostbyname");
return FALSE; return FALSE;

View File

@ -57,7 +57,7 @@ static void gst_udpsrc_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec); GValue *value, GParamSpec *pspec);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_udpsrc_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_udpsrc_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_udpsrc_get_type (void) gst_udpsrc_get_type (void)
@ -230,13 +230,13 @@ gst_udpsrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSp
} }
} }
// create a socket for sending to remote machine /* create a socket for sending to remote machine */
static gboolean static gboolean
gst_udpsrc_init_receive (GstUDPSrc *src) gst_udpsrc_init_receive (GstUDPSrc *src)
{ {
bzero (&src->myaddr, sizeof (src->myaddr)); bzero (&src->myaddr, sizeof (src->myaddr));
src->myaddr.sin_family = AF_INET; // host byte order src->myaddr.sin_family = AF_INET; /* host byte order */
src->myaddr.sin_port = htons (src->port); // short, network byte order src->myaddr.sin_port = htons (src->port); /* short, network byte order */
src->myaddr.sin_addr.s_addr = INADDR_ANY; src->myaddr.sin_addr.s_addr = INADDR_ANY;
if ((src->sock = socket (AF_INET, SOCK_DGRAM, 0)) == -1) { if ((src->sock = socket (AF_INET, SOCK_DGRAM, 0)) == -1) {

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstwavparse.la
libgstwavparse_la_SOURCES = gstwavparse.c gstriff.c libgstwavparse_la_SOURCES = gstwavparse.c gstriff.c
libgstwavparse_la_CFLAGS = $(GST_CFLAGS) libgstwavparse_la_CFLAGS = $(GST_CFLAGS)
libgstwavparse_la_LIBADD = $(GST_LIBS) libgstwavparse_la_LIBADD =
libgstwavparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstwavparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = gstwavparse.h gstriff.h noinst_HEADERS = gstwavparse.h gstriff.h

View File

@ -56,7 +56,7 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
return riff->state; return riff->state;
} }
riff->form = words[2]; riff->form = words[2];
// g_print("form is 0x%08x '%s'\n",words[2],gst_riff_id_to_fourcc(words[2])); /* g_print("form is 0x%08x '%s'\n",words[2],gst_riff_id_to_fourcc(words[2])); */
riff->nextlikely = 12; /* skip 'RIFF', length, and form */ riff->nextlikely = 12; /* skip 'RIFF', length, and form */
} }
@ -64,14 +64,14 @@ gint gst_riff_next_buffer(GstRiff *riff,GstBuffer *buf,gulong off) {
while ((riff->nextlikely+8) < last) { while ((riff->nextlikely+8) < last) {
gulong *words = (gulong *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely); gulong *words = (gulong *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely);
// g_print("next likely chunk is at offset 0x%08x\n",riff->nextlikely); /* g_print("next likely chunk is at offset 0x%08x\n",riff->nextlikely); */
chunk = (GstRiffChunk *)malloc(sizeof(GstRiffChunk)); chunk = (GstRiffChunk *)malloc(sizeof(GstRiffChunk));
g_return_val_if_fail(chunk != NULL,0); g_return_val_if_fail(chunk != NULL,0);
chunk->offset = riff->nextlikely+8; /* point to the actual data */ chunk->offset = riff->nextlikely+8; /* point to the actual data */
chunk->id = words[0]; chunk->id = words[0];
chunk->size = words[1]; chunk->size = words[1];
// g_print("chunk id is 0x%08x '%s' and is 0x%08x long\n",words[0], /* g_print("chunk id is 0x%08x '%s' and is 0x%08x long\n",words[0], */
// gst_riff_id_to_fourcc(words[0]),words[1]); /* gst_riff_id_to_fourcc(words[0]),words[1]); */
riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */ riff->nextlikely += 8 + chunk->size; /* doesn't include hdr */
riff->chunks = g_list_prepend(riff->chunks,chunk); riff->chunks = g_list_prepend(riff->chunks,chunk);
} }

View File

@ -97,7 +97,7 @@ enum {
}; };
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_wavparse_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_wavparse_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_wavparse_get_type (void) gst_wavparse_get_type (void)
@ -262,9 +262,9 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf)
"parsewav_src", "parsewav_src",
"audio/raw", "audio/raw",
"format", GST_PROPS_STRING ("int"), "format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0), //FIXME "law", GST_PROPS_INT (0), /*FIXME */
"endianness", GST_PROPS_INT (G_BYTE_ORDER), "endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_BOOLEAN (TRUE), //FIXME "signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */
"width", GST_PROPS_INT (format->wBitsPerSample), "width", GST_PROPS_INT (format->wBitsPerSample),
"depth", GST_PROPS_INT (format->wBitsPerSample), "depth", GST_PROPS_INT (format->wBitsPerSample),
"rate", GST_PROPS_INT (format->dwSamplesPerSec), "rate", GST_PROPS_INT (format->dwSamplesPerSec),

View File

@ -4,7 +4,7 @@ plugin_LTLIBRARIES = libgstossaudio.la libgstosshelper.la
libgstossaudio_la_SOURCES = gstosssink.c gstosssrc.c gstossaudio.c gstossgst.c gstossclock.c libgstossaudio_la_SOURCES = gstosssink.c gstosssrc.c gstossaudio.c gstossgst.c gstossclock.c
libgstossaudio_la_CFLAGS = $(GST_CFLAGS) libgstossaudio_la_CFLAGS = $(GST_CFLAGS)
libgstossaudio_la_LIBADD = $(GST_LIBS) libgstossaudio_la_LIBADD =
libgstossaudio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstossaudio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstosshelper_la_SOURCES = gstosshelper.c libgstosshelper_la_SOURCES = gstosshelper.c

View File

@ -240,7 +240,7 @@ gst_oss_clock_set_time (GstClock *clock, GstClockTime time)
time += oss_clock->base_time; time += oss_clock->base_time;
//g_print ("set time %llu\n", time); /*g_print ("set time %llu\n", time); */
oss_clock->current_time = time; oss_clock->current_time = time;

View File

@ -140,10 +140,10 @@ gst_ossgst_class_init (GstOssGstClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MUTE, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MUTE,
g_param_spec_boolean("mute","mute","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_PROGRAM, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PROGRAM,
g_param_spec_string("command","command","command", g_param_spec_string("command","command","command",
NULL, G_PARAM_READWRITE)); // CHECKME NULL, G_PARAM_READWRITE)); /* CHECKME */
gobject_class->set_property = gst_ossgst_set_property; gobject_class->set_property = gst_ossgst_set_property;
gobject_class->get_property = gst_ossgst_get_property; gobject_class->get_property = gst_ossgst_get_property;
@ -368,16 +368,16 @@ gst_ossgst_spawn_process (GstOssGst *ossgst)
setenv ("LD_PRELOAD", ld_preload, TRUE); setenv ("LD_PRELOAD", ld_preload, TRUE);
// child /* child */
dup2(ossgst->fdin[0], HELPER_MAGIC_IN); /* set the childs input stream */ dup2(ossgst->fdin[0], HELPER_MAGIC_IN); /* set the childs input stream */
dup2(ossgst->fdout[1], HELPER_MAGIC_OUT); /* set the childs output stream */ dup2(ossgst->fdout[1], HELPER_MAGIC_OUT); /* set the childs output stream */
// split the arguments /* split the arguments */
args = g_strsplit (ossgst->command, " ", 0); args = g_strsplit (ossgst->command, " ", 0);
execvp(args[0], args); execvp(args[0], args);
// will only reach if error /* will only reach if error */
perror("exec"); perror("exec");
gst_element_error(GST_ELEMENT(ossgst),"starting child process"); gst_element_error(GST_ELEMENT(ossgst),"starting child process");
return FALSE; return FALSE;
@ -422,8 +422,8 @@ gst_ossgst_factory_init (GstPlugin *plugin)
gchar **path; gchar **path;
gint i =0; gint i =0;
// get the path of this plugin, we assume the helper progam lives in the /* get the path of this plugin, we assume the helper progam lives in the */
// same directory. /* same directory. */
path = g_strsplit (plugin->filename, G_DIR_SEPARATOR_S, 0); path = g_strsplit (plugin->filename, G_DIR_SEPARATOR_S, 0);
while (path[i]) { while (path[i]) {
i++; i++;

View File

@ -17,7 +17,7 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
//#define DSP_DEBUG /*#define DSP_DEBUG */
/* This lets you run multiple instances of x11amp by setting the X11AMPNUM /* This lets you run multiple instances of x11amp by setting the X11AMPNUM
environment variable. Only works on glibc2. environment variable. Only works on glibc2.
@ -208,7 +208,7 @@ write (int fd, const void *buf, size_t len)
(*func) (HELPER_MAGIC_OUT, &cmd, sizeof(command)); (*func) (HELPER_MAGIC_OUT, &cmd, sizeof(command));
(*func) (HELPER_MAGIC_OUT, buf, len); (*func) (HELPER_MAGIC_OUT, buf, len);
//return (*func) (fd, buf, len); /*return (*func) (fd, buf, len); */
return len; return len;
} }

View File

@ -96,7 +96,7 @@ static void gst_osssrc_sync_parms (GstOssSrc *osssrc);
static GstBuffer * gst_osssrc_get (GstPad *pad); static GstBuffer * gst_osssrc_get (GstPad *pad);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
//static guint gst_osssrc_signals[LAST_SIGNAL] = { 0 }; /*static guint gst_osssrc_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_osssrc_get_type (void) gst_osssrc_get_type (void)
@ -133,19 +133,19 @@ gst_osssrc_class_init (GstOssSrcClass *klass)
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BYTESPERREAD, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BYTESPERREAD,
g_param_spec_ulong("bytes_per_read","bytes_per_read","bytes_per_read", g_param_spec_ulong("bytes_per_read","bytes_per_read","bytes_per_read",
0,G_MAXULONG,0,G_PARAM_READWRITE)); // CHECKME 0,G_MAXULONG,0,G_PARAM_READWRITE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CUROFFSET, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CUROFFSET,
g_param_spec_ulong("curoffset","curoffset","curoffset", g_param_spec_ulong("curoffset","curoffset","curoffset",
0,G_MAXULONG,0,G_PARAM_READABLE)); // CHECKME 0,G_MAXULONG,0,G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FORMAT, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FORMAT,
g_param_spec_int("format","format","format", g_param_spec_int("format","format","format",
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_CHANNELS, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_CHANNELS,
g_param_spec_int("channels","channels","channels", g_param_spec_int("channels","channels","channels",
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_FREQUENCY, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FREQUENCY,
g_param_spec_int("frequency","frequency","frequency", 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_DEVICE, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_DEVICE,
g_param_spec_string("device","device","oss device (/dev/dspN usually)", g_param_spec_string("device","device","oss device (/dev/dspN usually)",
"default",G_PARAM_READWRITE)); "default",G_PARAM_READWRITE));
@ -210,9 +210,9 @@ gst_osssrc_get (GstPad *pad)
"oss_src", "oss_src",
"audio/raw", "audio/raw",
"format", GST_PROPS_STRING ("int"), "format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0), //FIXME "law", GST_PROPS_INT (0), /*FIXME */
"endianness", GST_PROPS_INT (G_BYTE_ORDER), //FIXME "endianness", GST_PROPS_INT (G_BYTE_ORDER), /*FIXME */
"signed", GST_PROPS_BOOLEAN (TRUE), //FIXME "signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */
"width", GST_PROPS_INT (src->format), "width", GST_PROPS_INT (src->format),
"depth", GST_PROPS_INT (src->format), "depth", GST_PROPS_INT (src->format),
"rate", GST_PROPS_INT (src->frequency), "rate", GST_PROPS_INT (src->frequency),

View File

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