From 0067d17205a9d35de4fabd9923cf104f2890f8c3 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 19 Mar 2002 04:10:13 +0000 Subject: [PATCH] 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. --- docs/random/omega/testing/gstobject.c | 172 +++++++++---------- examples/autoplug/autoplug.c | 2 +- examples/cutter/cutter.c | 14 +- examples/events/seek.c | 2 +- examples/helloworld2/helloworld2.c | 2 +- examples/mixer/mixer.c | 22 +-- examples/plugins/Makefile.am | 2 +- examples/plugins/example.c | 2 +- examples/thread/thread.c | 4 +- examples/xml/runxml.c | 4 +- gst/autoplug/Makefile.am | 10 +- gst/autoplug/gstautoplugger.c | 14 +- gst/autoplug/gstspider.c | 2 +- gst/elements/Makefile.am | 2 +- gst/elements/gstmd5sink.c | 2 +- gst/gstinfo.c | 4 +- gst/gstparse.c | 2 +- gst/gstqueue.c | 6 +- gst/schedulers/Makefile.am | 4 +- gst/schedulers/gstbasicscheduler.c | 36 ---- gst/schedulers/gststandardscheduler.c | 46 +---- gst/types/Makefile.am | 2 +- include/mmx.h | 2 +- libs/gst/bytestream/bstest.c | 20 +-- libs/gst/control/dparam.c | 2 +- libs/gst/control/dparam_smooth.c | 2 +- libs/gst/control/dparammanager.c | 12 +- libs/gst/getbits/getbits.c | 14 +- libs/gst/getbits/getbits.h | 2 +- libs/gst/getbits/gstgetbits_generic.c | 2 +- libs/gst/getbits/gstgetbits_inl.h | 4 +- libs/gst/putbits/putbits.c | 2 +- plugins/elements/Makefile.am | 2 +- plugins/elements/gstmd5sink.c | 2 +- plugins/elements/gstqueue.c | 6 +- tests/bufspeed/gstbuffer.c | 68 ++++---- tests/bufspeed/gstbuffer.h | 24 +-- tests/bufspeed/gstmempool.c | 2 +- tests/lat.c | 2 +- tests/memchunk/gstmemchunk.c | 2 +- tests/old/examples/autoplug/autoplug.c | 2 +- tests/old/examples/cutter/cutter.c | 14 +- tests/old/examples/events/seek.c | 2 +- tests/old/examples/helloworld2/helloworld2.c | 2 +- tests/old/examples/mixer/mixer.c | 22 +-- tests/old/examples/plugins/Makefile.am | 2 +- tests/old/examples/plugins/example.c | 2 +- tests/old/examples/thread/thread.c | 4 +- tests/old/examples/xml/runxml.c | 4 +- tests/old/testsuite/bytestream/gstbstest.c | 4 +- tests/sched/dynamic-pipeline.c | 14 +- tests/sched/runxml.c | 2 +- testsuite/bytestream/gstbstest.c | 4 +- 53 files changed, 265 insertions(+), 339 deletions(-) diff --git a/docs/random/omega/testing/gstobject.c b/docs/random/omega/testing/gstobject.c index 94437140e4..c179ebc7d7 100644 --- a/docs/random/omega/testing/gstobject.c +++ b/docs/random/omega/testing/gstobject.c @@ -73,84 +73,84 @@ int main(int argc,char *argv[]) { TEST_CATEGORY("Creation"); TEST("create object"); - // setup - // action + /* setup */ + /* action */ object = gst_object_new(); - // assertions + /* assertions */ ASSERT(object != NULL); ASSERT(GST_IS_OBJECT(object)); - // cleanup + /* cleanup */ g_free(object); ENDTEST(); - // new category + /* new category */ TEST_CATEGORY("Refcounting"); - // category setup + /* category setup */ object = gst_object_new(); TEST("new object"); - // setup - // action - // assertions + /* setup */ + /* action */ + /* assertions */ ASSERT(object->refcount == 1); ASSERT(GTK_OBJECT_FLOATING(object) == TRUE); - // cleanup + /* cleanup */ ENDTEST(); TEST("increment refcount"); - // setup - // action + /* setup */ + /* action */ gst_object_ref(object); - // assertions + /* assertions */ ASSERT(object->refcount == 2); ASSERT(GTK_OBJECT_FLOATING(object) == TRUE); - // cleanup + /* cleanup */ ENDTEST(); TEST("sink object"); - // setup - // action + /* setup */ + /* action */ gst_object_sink(object); - // assertions + /* assertions */ ASSERT(object->refcount == 1); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); - // cleanup + /* cleanup */ ENDTEST(); TEST("increment refcount after sink"); - // setup - // action + /* setup */ + /* action */ gst_object_ref(object); - // assertions + /* assertions */ ASSERT(object->refcount == 2); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); - // cleanup + /* cleanup */ ENDTEST(); TEST("decrement refcount after sink"); - // setup - // action + /* setup */ + /* action */ gst_object_unref(object); - // assertions + /* assertions */ ASSERT(object->refcount == 1); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); - // cleanup + /* cleanup */ ENDTEST(); - // category cleanup + /* category cleanup */ g_free(object); - // new category + /* new category */ TEST_CATEGORY("Parentage"); - // category setup + /* category setup */ object = gst_object_new(); parent = gst_object_new(); newparent = gst_object_new(); gtkobject = gtk_type_new(gtk_object_get_type()); - // category assertions + /* category assertions */ ASSERT(object != NULL); ASSERT(object->refcount == 1); ASSERT(object->parent == NULL); @@ -160,135 +160,135 @@ int main(int argc,char *argv[]) { ASSERT(!GST_IS_OBJECT(gtkobject)); TEST("gst_object_set_parent: null object"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(NULL,NULL); - // assertions + /* assertions */ ASSERT(object->parent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: invalid object"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent((GstObject*)gtkobject,NULL); - // assertions + /* assertions */ ASSERT(object->parent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: null parent"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(object,NULL); - // assertions + /* assertions */ ASSERT(object->parent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: invalid parent"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(object,(GstObject*)gtkobject); - // assertions + /* assertions */ ASSERT(object->parent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: valid object, parent is object"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(object,object); - // assertions + /* assertions */ ASSERT(object->parent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: valid object and parent"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(object,parent); - // assertions + /* assertions */ ASSERT(object->parent == parent); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_set_parent: parent already set"); - // setup - // action + /* setup */ + /* action */ gst_object_set_parent(object,newparent); - // assertions + /* assertions */ ASSERT(object->parent != newparent); ASSERT(object->parent == parent); - // cleanup + /* cleanup */ g_free(object); ENDTEST(); TEST("gst_object_get_parent: null object"); - // setup - // action + /* setup */ + /* action */ curparent = gst_object_get_parent(NULL); - // assertions + /* assertions */ ASSERT(curparent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_get_parent: invalid object"); - // setup - // action + /* setup */ + /* action */ curparent = gst_object_get_parent((GstObject*)gtkobject); - // assertions + /* assertions */ ASSERT(curparent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_get_parent: no parent"); - // setup + /* setup */ object = gst_object_new(); - // action + /* action */ curparent = gst_object_get_parent(object); - // assertions + /* assertions */ ASSERT(curparent == NULL); - // cleanup + /* cleanup */ ENDTEST(); TEST("gst_object_get_parent: valid parent"); - // setup + /* setup */ gst_object_set_parent(object,parent); - // action + /* action */ curparent = gst_object_get_parent(object); - // assertions + /* assertions */ ASSERT(curparent == parent); - // cleanup + /* cleanup */ g_free(object); ENDTEST(); TEST("gst_object_unparent: null object"); - // setup - // action + /* setup */ + /* action */ gst_object_unparent(NULL); - // assertions - // NONE - FIXME! - // cleanup + /* assertions */ + /* NONE - FIXME! */ + /* cleanup */ ENDTEST(); TEST("gst_object_unparent: invalid object"); - // setup - // action + /* setup */ + /* action */ gst_object_unparent((GstObject*)gtkobject); - // assertions - // NONE - FIXME! - // cleanup + /* assertions */ + /* NONE - FIXME! */ + /* cleanup */ ENDTEST(); TEST("gst_object_unparent: no parent"); - // setup + /* setup */ object = gst_object_new(); - // category cleanup + /* category cleanup */ g_free(object); g_free(parent); g_free(newparent); diff --git a/examples/autoplug/autoplug.c b/examples/autoplug/autoplug.c index feeebb20b8..e28362af63 100644 --- a/examples/autoplug/autoplug.c +++ b/examples/autoplug/autoplug.c @@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); - // disconnect the typefind from the pipeline and remove it + /* disconnect the typefind from the pipeline and remove it */ gst_element_disconnect (cache, "src", typefind, "sink"); gst_bin_remove (GST_BIN (autobin), typefind); diff --git a/examples/cutter/cutter.c b/examples/cutter/cutter.c index e1bd639a80..544da73eba 100644 --- a/examples/cutter/cutter.c +++ b/examples/cutter/cutter.c @@ -47,7 +47,7 @@ void cut_start (GstElement *element) struct tm *ct; time (&seconds); ct = localtime (&seconds); -// sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id); +/* sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id); */ sprintf (buffer, "/news/incoming/audio/cutter.%04d%02d%02d.%02d%02d%02d.wav", ct->tm_year + 1900, ct->tm_mon, ct->tm_mday, ct->tm_hour, ct->tm_min, ct->tm_sec); @@ -93,12 +93,12 @@ void cut_stop_signal (GstElement *element) int main (int argc, char *argv[]) { - //int i, j; - //gboolean done; + /*int i, j; */ + /*gboolean done; */ - //char buffer[20]; + /*char buffer[20]; */ - //output_channel_t *channel_out; + /*output_channel_t *channel_out; */ GstElement *audiosrc; @@ -183,9 +183,9 @@ int main (int argc, char *argv[]) */ while (playing) { -// g_print ("> "); +/* g_print ("> "); */ gst_bin_iterate (GST_BIN (main_bin)); -// g_print (" <"); +/* g_print (" <"); */ if (cut_start_signalled) { g_print ("\nDEBUG: main: cut_start_signalled true !\n"); diff --git a/examples/events/seek.c b/examples/events/seek.c index 89a6e27189..11b045e2b1 100644 --- a/examples/events/seek.c +++ b/examples/events/seek.c @@ -7,7 +7,7 @@ main (int argc, char *argv[]) GstElement *src, *sink; GstPad *srcpad, *sinkpad; -// _gst_plugin_spew = TRUE; +/* _gst_plugin_spew = TRUE; */ gst_init (&argc, &argv); bin = GST_BIN (gst_pipeline_new ("pipeline")); diff --git a/examples/helloworld2/helloworld2.c b/examples/helloworld2/helloworld2.c index c98f6bf8d8..2e61fcb189 100644 --- a/examples/helloworld2/helloworld2.c +++ b/examples/helloworld2/helloworld2.c @@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); - // disconnect the typefind from the pipeline and remove it + /* disconnect the typefind from the pipeline and remove it */ gst_element_disconnect (cache, "src", typefind, "sink"); gst_bin_remove (GST_BIN (autobin), typefind); diff --git a/examples/mixer/mixer.c b/examples/mixer/mixer.c index 2221d95b32..31ba579149 100644 --- a/examples/mixer/mixer.c +++ b/examples/mixer/mixer.c @@ -18,10 +18,10 @@ #include "mixer.h" #include -//#define WITH_BUG -//#define WITH_BUG2 -//#define DEBUG -//#define AUTOPLUG /* define if you want autoplugging of input channels */ +/*#define WITH_BUG */ +/*#define WITH_BUG2 */ +/*#define DEBUG */ +/*#define AUTOPLUG * define if you want autoplugging of input channels * */ /* function prototypes */ input_channel_t* create_input_channel (int id, char* location); @@ -37,7 +37,7 @@ void eos(GstElement *element) { g_print("have eos, quitting ?\n"); -// playing = FALSE; +/* playing = FALSE; */ } static GstCaps* @@ -62,7 +62,7 @@ gst_play_typefind (GstBin *bin, GstElement *element) gst_element_set_state (pipeline, GST_STATE_PLAYING); - // push a buffer... the have_type signal handler will set the found flag + /* push a buffer... the have_type signal handler will set the found flag */ gst_bin_iterate (GST_BIN (pipeline)); gst_element_set_state (pipeline, GST_STATE_NULL); @@ -188,17 +188,17 @@ int main(int argc,char *argv[]) /* start playing */ gst_element_set_state(main_bin, GST_STATE_PLAYING); - // write out the schedule + /* write out the schedule */ gst_scheduler_show(GST_ELEMENT_SCHED(main_bin)); playing = TRUE; j = 0; - //printf ("main: start iterating from 0"); + /*printf ("main: start iterating from 0"); */ while (playing && j < 100) { -// printf ("main: iterating %d\n", j); +/* printf ("main: iterating %d\n", j); */ gst_bin_iterate(GST_BIN(main_bin)); - //fprintf(stderr,"after iterate()\n"); + /*fprintf(stderr,"after iterate()\n"); */ ++j; } } @@ -206,7 +206,7 @@ int main(int argc,char *argv[]) while (playing) { gst_bin_iterate(GST_BIN(main_bin)); - //fprintf(stderr,"after iterate()\n"); + /*fprintf(stderr,"after iterate()\n"); */ } /* stop the bin */ gst_element_set_state(main_bin, GST_STATE_NULL); diff --git a/examples/plugins/Makefile.am b/examples/plugins/Makefile.am index 41edbfea85..17a6bd6466 100644 --- a/examples/plugins/Makefile.am +++ b/examples/plugins/Makefile.am @@ -2,6 +2,6 @@ noinst_LTLIBRARIES = libexample.la libexample_la_SOURCES = example.c libexample_la_CFLAGS = $(GST_CFLAGS) -libexample_la_LIBADD = $(GST_LIBS) +libexample_la_LIBADD = noinst_HEADERS = example.h diff --git a/examples/plugins/example.c b/examples/plugins/example.c index 3b721f9c98..f7eb754c60 100644 --- a/examples/plugins/example.c +++ b/examples/plugins/example.c @@ -161,7 +161,7 @@ gst_example_class_init (GstExampleClass *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 */ /* Here we add a signal to the object. This is avery useless signal * called asdf. The signal will also pass a pointer to the listeners diff --git a/examples/thread/thread.c b/examples/thread/thread.c index 7011880a49..5492210c4d 100644 --- a/examples/thread/thread.c +++ b/examples/thread/thread.c @@ -55,9 +55,9 @@ int main(int argc,char *argv[]) } */ - //gst_bin_remove(GST_BIN(pipeline), filesrc); + /*gst_bin_remove(GST_BIN(pipeline), filesrc); */ - //gst_bin_add(GST_BIN(thread), filesrc); + /*gst_bin_add(GST_BIN(thread), filesrc); */ gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline)); /* make it ready */ diff --git a/examples/xml/runxml.c b/examples/xml/runxml.c index e3f2d755e2..5b91e44ce4 100644 --- a/examples/xml/runxml.c +++ b/examples/xml/runxml.c @@ -36,8 +36,8 @@ int main(int argc,char *argv[]) xml = gst_xml_new (); -// g_signal_connect (G_OBJECT (xml), "object_loaded", -// G_CALLBACK (xml_loaded), xml); +/* g_signal_connect (G_OBJECT (xml), "object_loaded", */ +/* G_CALLBACK (xml_loaded), xml); */ if (argc == 2) ret = gst_xml_parse_file(xml, argv[1], NULL); diff --git a/gst/autoplug/Makefile.am b/gst/autoplug/Makefile.am index 76ee6e04b7..d23cc8d11f 100644 --- a/gst/autoplug/Makefile.am +++ b/gst/autoplug/Makefile.am @@ -9,27 +9,27 @@ plugin_LTLIBRARIES = \ libgststaticautoplug_la_SOURCES = gststaticautoplug.c libgststaticautoplug_la_CFLAGS = $(GST_CFLAGS) -libgststaticautoplug_la_LIBADD = $(GST_LIBS) +libgststaticautoplug_la_LIBADD = libgststaticautoplug_la_LDFLAGS = @GST_LT_LDFLAGS@ libgststaticautoplugrender_la_SOURCES = gststaticautoplugrender.c libgststaticautoplugrender_la_CFLAGS = $(GST_CFLAGS) -libgststaticautoplugrender_la_LIBADD = $(GST_LIBS) +libgststaticautoplugrender_la_LIBADD = libgststaticautoplugrender_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstautoplugcache_la_SOURCES = gstautoplugcache.c libgstautoplugcache_la_CFLAGS = $(GST_CFLAGS) -libgstautoplugcache_la_LIBADD = $(GST_LIBS) +libgstautoplugcache_la_LIBADD = libgstautoplugcache_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstautoplugger_la_SOURCES = gstautoplugger.c libgstautoplugger_la_CFLAGS = $(GST_CFLAGS) -libgstautoplugger_la_LIBADD = $(GST_LIBS) +libgstautoplugger_la_LIBADD = libgstautoplugger_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstspider_la_SOURCES = gstspider.c gstspideridentity.c gstsearchfuncs.c libgstspider_la_CFLAGS = $(GST_CFLAGS) -libgstspider_la_LIBADD = $(GST_LIBS) +libgstspider_la_LIBADD = libgstspider_la_LDFLAGS = @GST_LT_LDFLAGS@ noinst_HEADERS = gststaticautoplug.h gststaticautoplugrender.h \ diff --git a/gst/autoplug/gstautoplugger.c b/gst/autoplug/gstautoplugger.c index 9d70c3f176..1ec48cd4ac 100644 --- a/gst/autoplug/gstautoplugger.c +++ b/gst/autoplug/gstautoplugger.c @@ -146,10 +146,10 @@ gst_autoplugger_class_init (GstAutopluggerClass *klass) /* g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BUFFER_COUNT, g_param_spec_int("buffer_count","buffer_count","buffer_count", - 0,G_MAXINT,0,G_PARAM_READABLE)); // CHECKME! + 0,G_MAXINT,0,G_PARAM_READABLE)); * CHECKME! * g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_RESET, g_param_spec_boolean("reset","reset","reset", - FALSE,G_PARAM_WRITABLE)); // CHECKME! + FALSE,G_PARAM_WRITABLE)); * CHECKME! * */ gobject_class->set_property = gst_autoplugger_set_property; @@ -461,11 +461,11 @@ gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); g_return_if_fail(autoplugger->autobin != NULL); gst_bin_add(GST_BIN(autoplugger),autoplugger->autobin); -// // re-attach the srcpad's original peer to the cache -// GST_DEBUG(GST_CAT_AUTOPLUG, "reconnecting the cache to the downstream peer\n"); -// gst_pad_connect(autoplugger->cache_srcpad,autoplugger->srcpadpeer); +* // re-attach the srcpad's original peer to the cache * +* GST_DEBUG(GST_CAT_AUTOPLUG, "reconnecting the cache to the downstream peer\n"); * +* gst_pad_connect(autoplugger->cache_srcpad,autoplugger->srcpadpeer); * - // attach the autoplugged bin + * attach the autoplugged bin * GST_DEBUG(GST_CAT_AUTOPLUG, "attaching the autoplugged bin between cache and downstream peer\n"); gst_pad_connect(autoplugger->cache_srcpad,gst_element_get_pad(autoplugger->autobin,"sink")); gst_pad_connect(gst_element_get_pad(autoplugger->autobin,"src_00"),autoplugger->srcpadpeer); @@ -549,7 +549,7 @@ gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); GST_INFO(GST_CAT_AUTOPLUG,"here we go into nothingness, hoping the typefind will return us to safety"); gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); } else { -/* // attach the cache_empty handler, since the cache simply isn't needed +/* * attach the cache_empty handler, since the cache simply isn't needed * * g_signal_connect (G_OBJECT(autoplugger->cache),"cache_empty", * gst_autoplugger_cache_empty,autoplugger); */ diff --git a/gst/autoplug/gstspider.c b/gst/autoplug/gstspider.c index af3e374f3c..631d65e9bd 100644 --- a/gst/autoplug/gstspider.c +++ b/gst/autoplug/gstspider.c @@ -96,7 +96,7 @@ static GstSpiderConnection * gst_spider_connection_get (GstSpiderIdentity *sink static GstElement * gst_spider_find_element_to_plug (GstElement *src, GstElementFactory *fac, GstPadDirection dir); static GstPadConnectReturn gst_spider_plug (GstSpiderConnection *conn); static GstPadConnectReturn gst_spider_plug_from_srcpad (GstSpiderConnection *conn, GstPad *srcpad); -//static GstPadConnectReturn gst_spider_plug_peers (GstSpider *spider, GstPad *srcpad, GstPad *sinkpad); +/*static GstPadConnectReturn gst_spider_plug_peers (GstSpider *spider, GstPad *srcpad, GstPad *sinkpad); */ static GstPadConnectReturn gst_spider_create_and_plug (GstSpiderConnection *conn, GList *plugpath); /* random functions */ diff --git a/gst/elements/Makefile.am b/gst/elements/Makefile.am index 8518d82ebb..d9e68fb0b5 100644 --- a/gst/elements/Makefile.am +++ b/gst/elements/Makefile.am @@ -19,7 +19,7 @@ libgstelements_la_SOURCES = \ gststatistics.c \ gstmd5sink.c libgstelements_la_CFLAGS = $(GST_CFLAGS) -libgstelements_la_LIBADD = $(GST_LIBS) +libgstelements_la_LIBADD = libgstelements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @GST_LT_LDFLAGS@ noinst_HEADERS = \ diff --git a/gst/elements/gstmd5sink.c b/gst/elements/gstmd5sink.c index 767a0ccaa8..e220d364fc 100644 --- a/gst/elements/gstmd5sink.c +++ b/gst/elements/gstmd5sink.c @@ -141,7 +141,7 @@ md5_read_ctx (GstMD5Sink *ctx, gpointer resbuf) void md5_process_bytes (const void *buffer, size_t len, GstMD5Sink *ctx) { - //const void aligned_buffer = buffer; + /*const void aligned_buffer = buffer; */ /* When we already have some bits in our internal buffer concatenate both inputs first. */ diff --git a/gst/gstinfo.c b/gst/gstinfo.c index 38742b7854..148c94a988 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -324,7 +324,7 @@ gst_default_info_handler (gint category, gboolean incore, #else fprintf(stderr,"INFO (%5d:%2d)%s%s %s\n", pthread_id,cothread_id,location,elementname,string); - #endif /* GST_DEBUG_COLOR */ +#endif /* GST_DEBUG_COLOR */ /* #else #ifdef GST_DEBUG_COLOR @@ -333,7 +333,7 @@ gst_default_info_handler (gint category, gboolean incore, #else fprintf(stderr,"INFO:%s%s %s\n", location,elementname,string); - #endif // GST_DEBUG_COLOR + #endif * GST_DEBUG_COLOR * #endif */ diff --git a/gst/gstparse.c b/gst/gstparse.c index 8957d7254a..5bd48be7f8 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -501,7 +501,7 @@ gst_parse_launchv (const gchar **argv) ret = gst_parse_launchv_recurse (argv, GST_BIN (pipeline), NULL); if (ret <= 0) { - // print an error + /* print an error */ gst_object_unref (GST_OBJECT (pipeline)); return NULL; } else { diff --git a/gst/gstqueue.c b/gst/gstqueue.c index 61ec8f1cbe..3540743755 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -312,7 +312,7 @@ restart: GST_ELEMENT_NAME (queue), queue->level_buffers); break; default: - //gst_pad_event_default (pad, GST_EVENT (buf)); + /*gst_pad_event_default (pad, GST_EVENT (buf)); */ break; } } @@ -536,8 +536,8 @@ gst_queue_change_state (GstElement *element) new_state = GST_STATE_PENDING (element); if (new_state == GST_STATE_PAUSED) { - //g_cond_signal (queue->not_full); - //g_cond_signal (queue->not_empty); + /*g_cond_signal (queue->not_full); */ + /*g_cond_signal (queue->not_empty); */ } else if (new_state == GST_STATE_READY) { gst_queue_locked_flush (queue); diff --git a/gst/schedulers/Makefile.am b/gst/schedulers/Makefile.am index 67e43c8a0f..36bc761940 100644 --- a/gst/schedulers/Makefile.am +++ b/gst/schedulers/Makefile.am @@ -4,12 +4,12 @@ plugin_LTLIBRARIES = libgstbasicscheduler.la libgststandardscheduler.la libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS) -libgstbasicscheduler_la_LIBADD = $(GST_LIBS) ../libcothreads.la +libgstbasicscheduler_la_LIBADD = ../libcothreads.la libgstbasicscheduler_la_LDFLAGS = @GST_LT_LDFLAGS@ libgststandardscheduler_la_SOURCES = gststandardscheduler.c libgststandardscheduler_la_CFLAGS = $(GST_CFLAGS) -I$(top_srcdir)/libs/ext/cothreads -libgststandardscheduler_la_LIBADD = $(GST_LIBS) $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la +libgststandardscheduler_la_LIBADD = $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la libgststandardscheduler_la_LDFLAGS = @GST_LT_LDFLAGS@ ## this is a REALLY evil hack diff --git a/gst/schedulers/gstbasicscheduler.c b/gst/schedulers/gstbasicscheduler.c index 6ed625c7b8..fb4e69fbcb 100644 --- a/gst/schedulers/gstbasicscheduler.c +++ b/gst/schedulers/gstbasicscheduler.c @@ -597,42 +597,6 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain) return TRUE; } -/* -G_GNUC_UNUSED static void -gst_basic_scheduler_chained_chain (GstBin *bin, _GstBinChain *chain) { - GList *elements; - GstElement *element; - GList *pads; - GstPad *pad; - - GST_DEBUG (GST_CAT_SCHEDULING,"chain entered\n"); - // walk through all the elements - elements = chain->elements; - while (elements) { - element = GST_ELEMENT (elements->data); - elements = g_list_next (elements); - - // walk through all the pads - pads = gst_element_get_pad_list (element); - while (pads) { - pad = GST_PAD (pads->data); - pads = g_list_next (pads); - if (!GST_IS_REAL_PAD(pad)) continue; - - if (GST_RPAD_DIRECTION(pad) == GST_PAD_SINK) { - GST_DEBUG (GST_CAT_SCHEDULING,"copying chain function into push proxy for %s:%s\n",GST_DEBUG_PAD_NAME(pad)); - GST_RPAD_CHAINHANDLER(pad) = GST_RPAD_CHAINFUNC(pad); - } else { - GST_DEBUG (GST_CAT_SCHEDULING,"copying get function into pull proxy for %s:%s\n",GST_DEBUG_PAD_NAME(pad)); - GST_RPAD_GETHANDLER(pad) = GST_RPAD_GETFUNC(pad); - GST_RPAD_PULLREGIONFUNC(pad) = GST_RPAD_GETREGIONFUNC(pad); - } - } - } -} -*/ - - static GstSchedulerChain * gst_basic_scheduler_chain_new (GstBasicScheduler * sched) { diff --git a/gst/schedulers/gststandardscheduler.c b/gst/schedulers/gststandardscheduler.c index d94538e439..9be6f48057 100644 --- a/gst/schedulers/gststandardscheduler.c +++ b/gst/schedulers/gststandardscheduler.c @@ -242,8 +242,6 @@ static inline void sched_switch (cothread *to) if (from == to) { GST_DEBUG (GST_CAT_COTHREAD_SWITCH, "trying to switch to the same cothread (%p), not allowed\n", to); - /* wingo says G_BREAKPOINT only works for x86, so change it */ - /* G_BREAKPOINT(); */ g_assert_not_reached (); } GST_INFO (GST_CAT_COTHREAD_SWITCH, "switching from cothread %p to cothread %p", @@ -611,42 +609,6 @@ gst_standard_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain return TRUE; } -/* -G_GNUC_UNUSED static void -gst_standard_scheduler_chained_chain (GstBin *bin, _GstBinChain *chain) { - GList *elements; - GstElement *element; - GList *pads; - GstPad *pad; - - GST_DEBUG (GST_CAT_SCHEDULING,"chain entered\n"); - // walk through all the elements - elements = chain->elements; - while (elements) { - element = GST_ELEMENT (elements->data); - elements = g_list_next (elements); - - // walk through all the pads - pads = gst_element_get_pad_list (element); - while (pads) { - pad = GST_PAD (pads->data); - pads = g_list_next (pads); - if (!GST_IS_REAL_PAD(pad)) continue; - - if (GST_RPAD_DIRECTION(pad) == GST_PAD_SINK) { - GST_DEBUG (GST_CAT_SCHEDULING,"copying chain function into push proxy for %s:%s\n",GST_DEBUG_PAD_NAME(pad)); - GST_RPAD_CHAINHANDLER(pad) = GST_RPAD_CHAINFUNC(pad); - } else { - GST_DEBUG (GST_CAT_SCHEDULING,"copying get function into pull proxy for %s:%s\n",GST_DEBUG_PAD_NAME(pad)); - GST_RPAD_GETHANDLER(pad) = GST_RPAD_GETFUNC(pad); - GST_RPAD_PULLREGIONFUNC(pad) = GST_RPAD_GETREGIONFUNC(pad); - } - } - } -} -*/ - - static GstSchedulerChain * gst_standard_scheduler_chain_new (GstStandardScheduler * sched) { @@ -1073,15 +1035,15 @@ gst_standard_scheduler_state_transition (GstScheduler *sched, GstElement *elemen static void gst_standard_scheduler_lock_element (GstScheduler * sched, GstElement * element) { -// if (GST_ELEMENT_THREADSTATE (element)) -// cothread_lock (GST_ELEMENT_THREADSTATE (element)); +/* if (GST_ELEMENT_THREADSTATE (element)) */ +/* cothread_lock (GST_ELEMENT_THREADSTATE (element)); */ } static void gst_standard_scheduler_unlock_element (GstScheduler * sched, GstElement * element) { -// if (GST_ELEMENT_THREADSTATE (element)) -// cothread_unlock (GST_ELEMENT_THREADSTATE (element)); +/* if (GST_ELEMENT_THREADSTATE (element)) */ +/* cothread_unlock (GST_ELEMENT_THREADSTATE (element)); */ } static void diff --git a/gst/types/Makefile.am b/gst/types/Makefile.am index ff24f475c2..0ff45c38d8 100644 --- a/gst/types/Makefile.am +++ b/gst/types/Makefile.am @@ -4,5 +4,5 @@ plugin_LTLIBRARIES = libgsttypes.la libgsttypes_la_SOURCES = gsttypes.c libgsttypes_la_CFLAGS = $(GST_CFLAGS) -libgsttypes_la_LIBADD = $(GST_LIBS) +libgsttypes_la_LIBADD = libgsttypes_la_LDFLAGS = @GST_LT_LDFLAGS@ diff --git a/include/mmx.h b/include/mmx.h index 9e0ba8b8f9..2b8aff8e77 100644 --- a/include/mmx.h +++ b/include/mmx.h @@ -66,7 +66,7 @@ #ifndef _MMX_H #define _MMX_H -//#define MMX_TRACE +/*#define MMX_TRACE */ /* Warning: at this writing, the version of GAS packaged with most Linux distributions does not handle the diff --git a/libs/gst/bytestream/bstest.c b/libs/gst/bytestream/bstest.c index f8968818e5..7fe35b3fd3 100644 --- a/libs/gst/bytestream/bstest.c +++ b/libs/gst/bytestream/bstest.c @@ -87,7 +87,7 @@ static void gst_identity_get_property (GObject *object, guint prop_id, GValue *v static void gst_identity_loop (GstElement *element); static GstElementClass *parent_class = NULL; -// static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; +/* static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; */ GType gst_identity_get_type (void) @@ -157,11 +157,11 @@ gst_identity_init (GstIdentity *identity) { identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK); gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad); - //gst_pad_set_negotiate_function (identity->sinkpad, gst_identity_negotiate_sink); + /*gst_pad_set_negotiate_function (identity->sinkpad, gst_identity_negotiate_sink); */ identity->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); - //gst_pad_set_negotiate_function (identity->srcpad, gst_identity_negotiate_src); + /*gst_pad_set_negotiate_function (identity->srcpad, gst_identity_negotiate_src); */ gst_element_set_loop_function (GST_ELEMENT (identity), gst_identity_loop); @@ -185,17 +185,17 @@ gst_identity_loop (GstElement *element) /* THIS IS THE BUFFER BASED ONE do { -// g_print("\n"); +* g_print("\n"); * for (i=0;icount;i++) { -// g_print("bstest: getting a buffer of %d bytes\n",identity->byte_size); +* g_print("bstest: getting a buffer of %d bytes\n",identity->byte_size); * buf = gst_bytestream_read(identity->bs,identity->byte_size); if (!buf) g_print("BUFFER IS BOGUS\n"); -// g_print("pushing the buffer, %d bytes at %d\n",GST_BUFFER_SIZE(buf),GST_BUFFER_OFFSET(buf)); +* g_print("pushing the buffer, %d bytes at %d\n",GST_BUFFER_SIZE(buf),GST_BUFFER_OFFSET(buf)); * gst_pad_push(identity->srcpad,buf); -// g_print("\n"); +* g_print("\n"); * gst_bytestream_print_status(identity->bs); -// g_print("\n\n"); +* g_print("\n\n"); * } exit(1); @@ -206,7 +206,7 @@ gst_identity_loop (GstElement *element) do { for (i=0;icount;i++) { buf = gst_buffer_new(); - // note that this is dangerous, as it does *NOT* refcount the data, it can go away!!! + /* note that this is dangerous, as it does *NOT* refcount the data, it can go away!!! */ GST_BUFFER_DATA(buf) = gst_bytestream_peek_bytes(identity->bs,identity->byte_size); GST_BUFFER_SIZE(buf) = identity->byte_size; GST_BUFFER_FLAG_SET(buf,GST_BUFFER_DONTFREE); @@ -268,7 +268,7 @@ plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - // we need gstbytestream + /* we need gstbytestream */ if (!gst_library_load ("gstbytestream")) { g_print("can't load bytestream\n"); return FALSE; diff --git a/libs/gst/control/dparam.c b/libs/gst/control/dparam.c index d5cfd645a8..a533f7a83a 100644 --- a/libs/gst/control/dparam.c +++ b/libs/gst/control/dparam.c @@ -100,7 +100,7 @@ gst_dparam_class_init (GstDParamClass *klass) gobject_class->dispose = gst_dparam_dispose; - //gstobject_class->save_thyself = gst_dparam_save_thyself; + /*gstobject_class->save_thyself = gst_dparam_save_thyself; */ } diff --git a/libs/gst/control/dparam_smooth.c b/libs/gst/control/dparam_smooth.c index 64e053dd69..b08721e742 100644 --- a/libs/gst/control/dparam_smooth.c +++ b/libs/gst/control/dparam_smooth.c @@ -95,7 +95,7 @@ gst_dpsmooth_class_init (GstDParamSmoothClass *klass) "The amount a float value can change for a given slope_time", 0.0F, G_MAXFLOAT, 0.2F, G_PARAM_READWRITE)); - //gstobject_class->save_thyself = gst_dparam_save_thyself; + /*gstobject_class->save_thyself = gst_dparam_save_thyself; */ } diff --git a/libs/gst/control/dparammanager.c b/libs/gst/control/dparammanager.c index 71265b1e4b..5b8a163a07 100644 --- a/libs/gst/control/dparammanager.c +++ b/libs/gst/control/dparammanager.c @@ -583,7 +583,7 @@ gst_dpman_state_change (GstElement *element, gint old_state, gint new_state, Gst if (new_state == GST_STATE_PLAYING){ GST_DEBUG(GST_CAT_PARAMS, "initialising params\n"); - // force all params to be updated + /* force all params to be updated */ dwraps = GST_DPMAN_DPARAMS_LIST(dpman); while (dwraps){ dpwrap = (GstDParamWrapper*)dwraps->data; @@ -622,7 +622,7 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t g_return_val_if_fail (dpman != NULL, frames); g_return_val_if_fail (GST_IS_DPMAN (dpman), frames); - // now check whether any passive dparams are ready for an update + /* now check whether any passive dparams are ready for an update */ dwraps = GST_DPMAN_DPARAMS_LIST(dpman); while (dwraps){ dpwrap = (GstDParamWrapper*)dwraps->data; @@ -633,7 +633,7 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t switch (dpwrap->update_method) { - // direct method - set the value directly in the struct of the element + /* direct method - set the value directly in the struct of the element */ case GST_DPMAN_DIRECT: GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value); GST_DEBUG(GST_CAT_PARAMS, "doing direct update\n"); @@ -652,15 +652,15 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t } break; - // callback method - call the element's callback so it can do what it likes + /* callback method - call the element's callback so it can do what it likes */ case GST_DPMAN_CALLBACK: GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value); GST_DEBUG(GST_CAT_PARAMS, "doing callback update\n"); GST_DPMAN_DO_UPDATE(dpwrap); break; - // array method - generate an array of the right size - // with each value being the same (in synchronous update mode) + /* array method - generate an array of the right size */ + /* with each value being the same (in synchronous update mode) */ case GST_DPMAN_ARRAY: GST_DEBUG(GST_CAT_PARAMS, "doing array update\n"); switch (G_VALUE_TYPE(dpwrap->value)){ diff --git a/libs/gst/getbits/getbits.c b/libs/gst/getbits/getbits.c index f0eafecb8f..1985a4fdd2 100644 --- a/libs/gst/getbits/getbits.c +++ b/libs/gst/getbits/getbits.c @@ -163,9 +163,9 @@ void gst_getbits_init(gst_getbits_t *gb, GstGetbitsCallback callback, void *data #ifdef HAVE_LIBMMX if (1) { gb->getbits = _gst_getbits_mmx; -// gb->backbits = _gst_getbits_back_mmx; -// gb->backbytes = _gst_getbits_byteback_mmx; -// printf("gstgetbits: using MMX optimized versions\n"); +/* gb->backbits = _gst_getbits_back_mmx; */ +/* gb->backbytes = _gst_getbits_byteback_mmx; */ +/* printf("gstgetbits: using MMX optimized versions\n"); */ } else #endif /* HAVE_LIBMMX */ { @@ -174,7 +174,7 @@ void gst_getbits_init(gst_getbits_t *gb, GstGetbitsCallback callback, void *data gb->showbits = _gst_showbits_int; gb->flushbits = _gst_flushbits_int; gb->backbits = _gst_getbits_back_int; -// printf("gstgetbits: using callback versions\n"); +/* printf("gstgetbits: using callback versions\n"); */ } else { #ifdef HAVE_CPU_I386 @@ -186,7 +186,7 @@ void gst_getbits_init(gst_getbits_t *gb, GstGetbitsCallback callback, void *data gb->showbits = _gst_showbits_i386; gb->flushbits = _gst_flushbits_i386; gb->backbits = _gst_getbits_back_i386; -// printf("gstgetbits: using i386 optimized versions\n"); +/* printf("gstgetbits: using i386 optimized versions\n"); */ #else gb->get1bit = _gst_get1bit_int; gb->getbits = _gst_getbits_int; @@ -196,7 +196,7 @@ void gst_getbits_init(gst_getbits_t *gb, GstGetbitsCallback callback, void *data gb->showbits = _gst_showbits_int; gb->flushbits = _gst_flushbits_int; gb->backbits = _gst_getbits_back_int; -// printf("gstgetbits: using normal versions\n"); +/* printf("gstgetbits: using normal versions\n"); */ #endif } } @@ -208,6 +208,6 @@ void gst_getbits_newbuf(gst_getbits_t *gb,unsigned char *buffer, unsigned long l gb->endptr = buffer+len; gb->bits = 0; #ifdef HAVE_LIBMMX -// gb->qword = 0; +/* gb->qword = 0; */ #endif /* HAVE_LIBMMX */ } diff --git a/libs/gst/getbits/getbits.h b/libs/gst/getbits/getbits.h index 79b29f3de0..8d27e66bbe 100644 --- a/libs/gst/getbits/getbits.h +++ b/libs/gst/getbits/getbits.h @@ -3,7 +3,7 @@ #include -// getbits is critical, we need to forcibly disable DEBUG +/* getbits is critical, we need to forcibly disable DEBUG */ #define GST_DEBUG_FORCE_DISABLE #include diff --git a/libs/gst/getbits/gstgetbits_generic.c b/libs/gst/getbits/gstgetbits_generic.c index eb9768208c..3307d45c07 100644 --- a/libs/gst/getbits/gstgetbits_generic.c +++ b/libs/gst/getbits/gstgetbits_generic.c @@ -13,7 +13,7 @@ unsigned long _gst_getbits_int_cb(gst_getbits_t *gb, unsigned long bits) { int result; int bitsleft; - //printf("gst_getbits%lu %ld %p %08x\n", bits, gb->bits, gb->ptr, gb->dword); + /*printf("gst_getbits%lu %ld %p %08x\n", bits, gb->bits, gb->ptr, gb->dword); */ if (!bits) return 0; diff --git a/libs/gst/getbits/gstgetbits_inl.h b/libs/gst/getbits/gstgetbits_inl.h index 0fcbc3b590..32c5b2aa67 100644 --- a/libs/gst/getbits/gstgetbits_inl.h +++ b/libs/gst/getbits/gstgetbits_inl.h @@ -54,8 +54,8 @@ #include -//#define GETBITS_DEBUG_ENABLED -//#define GETBITS_OVERRUN_ENABLED +/*#define GETBITS_DEBUG_ENABLED */ +/*#define GETBITS_OVERRUN_ENABLED */ #ifdef GETBITS_DEBUG_ENABLED #define debug2(format,args...) g_print(format,##args) diff --git a/libs/gst/putbits/putbits.c b/libs/gst/putbits/putbits.c index 5bfc6c202d..e14f3aa05a 100644 --- a/libs/gst/putbits/putbits.c +++ b/libs/gst/putbits/putbits.c @@ -63,7 +63,7 @@ void gst_putbits(gst_putbits_t *pb, int val, int n) int i; unsigned int mask; - //printf("putbits: %p %08x %d %d %d\n", pb, val, n, pb->outcnt, pb->newlen); + /*printf("putbits: %p %08x %d %d %d\n", pb, val, n, pb->outcnt, pb->newlen); */ mask = 1 << (n-1); /* selects first (leftmost) bit */ for (i=0; ilevel_buffers); break; default: - //gst_pad_event_default (pad, GST_EVENT (buf)); + /*gst_pad_event_default (pad, GST_EVENT (buf)); */ break; } } @@ -536,8 +536,8 @@ gst_queue_change_state (GstElement *element) new_state = GST_STATE_PENDING (element); if (new_state == GST_STATE_PAUSED) { - //g_cond_signal (queue->not_full); - //g_cond_signal (queue->not_empty); + /*g_cond_signal (queue->not_full); */ + /*g_cond_signal (queue->not_empty); */ } else if (new_state == GST_STATE_READY) { gst_queue_locked_flush (queue); diff --git a/tests/bufspeed/gstbuffer.c b/tests/bufspeed/gstbuffer.c index 35a92ee90a..d5b189874b 100644 --- a/tests/bufspeed/gstbuffer.c +++ b/tests/bufspeed/gstbuffer.c @@ -53,18 +53,18 @@ _gst_buffer_initialize (void) { int buffersize = sizeof(GstBuffer); static const GTypeInfo buffer_info = { - 0, // sizeof(class), + 0, /* sizeof(class), */ NULL, NULL, NULL, NULL, NULL, - 0, // sizeof(object), + 0, /* sizeof(object), */ 0, NULL, }; - // round up to the nearest 32 bytes for cache-line and other efficiencies + /* round up to the nearest 32 bytes for cache-line and other efficiencies */ buffersize = (((buffersize-1) / 32) + 1) * 32; _gst_buffer_pool = gst_mem_pool_new ("GstBuffer", buffersize, @@ -170,29 +170,29 @@ gst_buffer_create_sub (GstBuffer *parent, buffer->refcount = 1; #endif - // copy flags and type from parent, for lack of better + /* copy flags and type from parent, for lack of better */ buffer->flags = parent->flags; - // set the data pointer, size, offset, and maxsize + /* set the data pointer, size, offset, and maxsize */ buffer->data = parent->data + offset; buffer->size = size; buffer->maxsize = parent->size - offset; - // deal with bogus/unknown offsets + /* deal with bogus/unknown offsets */ if (parent->offset != -1) buffer->offset = parent->offset + offset; else buffer->offset = -1; - // again, for lack of better, copy parent's timestamp + /* again, for lack of better, copy parent's timestamp */ buffer->timestamp = parent->timestamp; buffer->maxage = parent->maxage; - // if the parent buffer is a subbuffer itself, use its parent, a real buffer + /* if the parent buffer is a subbuffer itself, use its parent, a real buffer */ if (parent->parent != NULL) parent = parent->parent; - // set parentage and reference the parent + /* set parentage and reference the parent */ buffer->parent = parent; gst_buffer_ref (parent); @@ -202,7 +202,7 @@ gst_buffer_create_sub (GstBuffer *parent, } -// FIXME FIXME: how does this overlap with the newly-added gst_buffer_span() ??? +/* FIXME FIXME: how does this overlap with the newly-added gst_buffer_span() ??? */ /** * gst_buffer_append: * @buffer: a buffer @@ -229,17 +229,17 @@ gst_buffer_append (GstBuffer *buffer, GST_INFO (GST_CAT_BUFFER,"appending buffers %p and %p",buffer,append); GST_BUFFER_LOCK (buffer); - // the buffer is not used by anyone else + /* the buffer is not used by anyone else */ if (GST_BUFFER_REFCOUNT (buffer) == 1 && buffer->parent == NULL && !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) { - // save the old size + /* save the old size */ size = buffer->size; buffer->size += append->size; buffer->data = g_realloc (buffer->data, buffer->size); memcpy(buffer->data + size, append->data, append->size); GST_BUFFER_UNLOCK (buffer); } - // the buffer is used, create a new one + /* the buffer is used, create a new one */ else { newbuf = gst_buffer_new (); newbuf->size = buffer->size+append->size; @@ -269,11 +269,11 @@ gst_buffer_destroy (GstBuffer *buffer) (buffer->parent?"sub":""), buffer); - // free the data only if there is some, DONTFREE isn't set, and not sub + /* free the data only if there is some, DONTFREE isn't set, and not sub */ if (GST_BUFFER_DATA (buffer) && !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) && (buffer->parent == NULL)) { - // if there's a free function, use it + /* if there's a free function, use it */ if (buffer->free != NULL) { (buffer->free)(buffer); } else { @@ -281,11 +281,11 @@ gst_buffer_destroy (GstBuffer *buffer) } } - // unreference the parent if there is one + /* unreference the parent if there is one */ if (buffer->parent != NULL) gst_buffer_unref (buffer->parent); - // remove it entirely from memory + /* remove it entirely from memory */ gst_mem_pool_free (_gst_buffer_pool,buffer); } @@ -359,27 +359,27 @@ gst_buffer_copy (GstBuffer *buffer) g_return_val_if_fail (GST_BUFFER_REFCOUNT(buffer) > 0, NULL); - // if a copy function exists, use it, else copy the bytes + /* if a copy function exists, use it, else copy the bytes */ if (buffer->copy != NULL) { newbuf = (buffer->copy)(buffer); } else { - // allocate a new buffer + /* allocate a new buffer */ newbuf = gst_buffer_new(); - // copy the absolute size + /* copy the absolute size */ newbuf->size = buffer->size; - // allocate space for the copy + /* allocate space for the copy */ newbuf->data = (guchar *)g_malloc (buffer->size); - // copy the data straight across + /* copy the data straight across */ memcpy(newbuf->data,buffer->data,buffer->size); - // the new maxsize is the same as the size, since we just malloc'd it + /* the new maxsize is the same as the size, since we just malloc'd it */ newbuf->maxsize = newbuf->size; } newbuf->offset = buffer->offset; newbuf->timestamp = buffer->timestamp; newbuf->maxage = buffer->maxage; - // since we just created a new buffer, so we have no ties to old stuff + /* since we just created a new buffer, so we have no ties to old stuff */ newbuf->parent = NULL; newbuf->pool = NULL; @@ -425,7 +425,7 @@ gst_buffer_is_span_fast (GstBuffer *buf1, GstBuffer *buf2) * * Returns: new buffer that spans the two source buffers */ -// FIXME need to think about CoW and such... +/* FIXME need to think about CoW and such... */ GstBuffer * gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) { @@ -434,7 +434,7 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) g_return_val_if_fail (GST_BUFFER_REFCOUNT(buf1) > 0, NULL); g_return_val_if_fail (GST_BUFFER_REFCOUNT(buf2) > 0, NULL); - // make sure buf1 has a lower address than buf2 + /* make sure buf1 has a lower address than buf2 */ if (buf1->data > buf2->data) { GstBuffer *tmp = buf1; g_print ("swapping buffers\n"); @@ -442,23 +442,23 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) buf2 = tmp; } - // if the two buffers have the same parent and are adjacent + /* if the two buffers have the same parent and are adjacent */ if (gst_buffer_is_span_fast(buf1,buf2)) { - // we simply create a subbuffer of the common parent + /* we simply create a subbuffer of the common parent */ newbuf = gst_buffer_create_sub (buf1->parent, buf1->data - (buf1->parent->data) + offset, len); } else { g_print ("slow path taken in buffer_span\n"); - // otherwise we simply have to brute-force copy the buffers + /* otherwise we simply have to brute-force copy the buffers */ newbuf = gst_buffer_new (); - // put in new size + /* put in new size */ newbuf->size = len; - // allocate space for the copy + /* allocate space for the copy */ newbuf->data = (guchar *)g_malloc(len); - // copy the first buffer's data across + /* copy the first buffer's data across */ memcpy(newbuf->data, buf1->data + offset, buf1->size - offset); - // copy the second buffer's data across + /* copy the second buffer's data across */ memcpy(newbuf->data + (buf1->size - offset), buf2->data, len - (buf1->size - offset)); if (newbuf->offset != -1) @@ -490,6 +490,6 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) GstBuffer * gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2) { - // we're just a specific case of the more general gst_buffer_span() + /* we're just a specific case of the more general gst_buffer_span() */ return gst_buffer_span (buf1, 0, buf2, buf1->size + buf2->size); } diff --git a/tests/bufspeed/gstbuffer.h b/tests/bufspeed/gstbuffer.h index 4c78d786aa..5a7b524811 100644 --- a/tests/bufspeed/gstbuffer.h +++ b/tests/bufspeed/gstbuffer.h @@ -24,16 +24,16 @@ #ifndef __GST_BUFFER_H__ #define __GST_BUFFER_H__ -// -// Define this to add file:line info to each GstBuffer showing -// the location in the source code where the buffer was created. -// -// #define GST_BUFFER_WHERE -// -// Then in gdb, you can `call gst_buffer_print_live()' to get a list -// of allocated GstBuffers and also the file:line where they were -// allocated. -// +/* */ +/* Define this to add file:line info to each GstBuffer showing */ +/* the location in the source code where the buffer was created. */ +/* */ +/* #define GST_BUFFER_WHERE */ +/* */ +/* Then in gdb, you can `call gst_buffer_print_live()' to get a list */ +/* of allocated GstBuffers and also the file:line where they were */ +/* allocated. */ +/* */ #include @@ -133,8 +133,8 @@ struct _GstBuffer { gpointer pool_private; /* utility function pointers */ - GstBufferFreeFunc free; // free the data associated with the buffer - GstBufferCopyFunc copy; // copy the data from one buffer to another + GstBufferFreeFunc free; /* free the data associated with the buffer */ + GstBufferCopyFunc copy; /* copy the data from one buffer to another */ }; /* initialisation */ diff --git a/tests/bufspeed/gstmempool.c b/tests/bufspeed/gstmempool.c index c9f956e6f3..ffd5862c58 100644 --- a/tests/bufspeed/gstmempool.c +++ b/tests/bufspeed/gstmempool.c @@ -145,7 +145,7 @@ again: #endif if (!pool) { - //g_print ("extending\n"); + /*g_print ("extending\n"); */ if (populate (mem_pool)) goto again; else diff --git a/tests/lat.c b/tests/lat.c index b246ffafd9..8b8a9950bb 100644 --- a/tests/lat.c +++ b/tests/lat.c @@ -203,7 +203,7 @@ int main(int argc,char *argv[]) { } g_return_val_if_fail(pipeline != NULL, -1); - //xmlSaveFile("lat.gst", gst_xml_write(GST_ELEMENT(pipeline))); + /*xmlSaveFile("lat.gst", gst_xml_write(GST_ELEMENT(pipeline))); */ gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); diff --git a/tests/memchunk/gstmemchunk.c b/tests/memchunk/gstmemchunk.c index be99be5a79..f51e7d6295 100644 --- a/tests/memchunk/gstmemchunk.c +++ b/tests/memchunk/gstmemchunk.c @@ -123,7 +123,7 @@ again: :"ecx", "ebx"); if (!chunk) { - //g_print ("extending\n"); + /*g_print ("extending\n"); */ if (populate (mem_chunk)) goto again; else diff --git a/tests/old/examples/autoplug/autoplug.c b/tests/old/examples/autoplug/autoplug.c index feeebb20b8..e28362af63 100644 --- a/tests/old/examples/autoplug/autoplug.c +++ b/tests/old/examples/autoplug/autoplug.c @@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); - // disconnect the typefind from the pipeline and remove it + /* disconnect the typefind from the pipeline and remove it */ gst_element_disconnect (cache, "src", typefind, "sink"); gst_bin_remove (GST_BIN (autobin), typefind); diff --git a/tests/old/examples/cutter/cutter.c b/tests/old/examples/cutter/cutter.c index e1bd639a80..544da73eba 100644 --- a/tests/old/examples/cutter/cutter.c +++ b/tests/old/examples/cutter/cutter.c @@ -47,7 +47,7 @@ void cut_start (GstElement *element) struct tm *ct; time (&seconds); ct = localtime (&seconds); -// sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id); +/* sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id); */ sprintf (buffer, "/news/incoming/audio/cutter.%04d%02d%02d.%02d%02d%02d.wav", ct->tm_year + 1900, ct->tm_mon, ct->tm_mday, ct->tm_hour, ct->tm_min, ct->tm_sec); @@ -93,12 +93,12 @@ void cut_stop_signal (GstElement *element) int main (int argc, char *argv[]) { - //int i, j; - //gboolean done; + /*int i, j; */ + /*gboolean done; */ - //char buffer[20]; + /*char buffer[20]; */ - //output_channel_t *channel_out; + /*output_channel_t *channel_out; */ GstElement *audiosrc; @@ -183,9 +183,9 @@ int main (int argc, char *argv[]) */ while (playing) { -// g_print ("> "); +/* g_print ("> "); */ gst_bin_iterate (GST_BIN (main_bin)); -// g_print (" <"); +/* g_print (" <"); */ if (cut_start_signalled) { g_print ("\nDEBUG: main: cut_start_signalled true !\n"); diff --git a/tests/old/examples/events/seek.c b/tests/old/examples/events/seek.c index 89a6e27189..11b045e2b1 100644 --- a/tests/old/examples/events/seek.c +++ b/tests/old/examples/events/seek.c @@ -7,7 +7,7 @@ main (int argc, char *argv[]) GstElement *src, *sink; GstPad *srcpad, *sinkpad; -// _gst_plugin_spew = TRUE; +/* _gst_plugin_spew = TRUE; */ gst_init (&argc, &argv); bin = GST_BIN (gst_pipeline_new ("pipeline")); diff --git a/tests/old/examples/helloworld2/helloworld2.c b/tests/old/examples/helloworld2/helloworld2.c index c98f6bf8d8..2e61fcb189 100644 --- a/tests/old/examples/helloworld2/helloworld2.c +++ b/tests/old/examples/helloworld2/helloworld2.c @@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline) autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); - // disconnect the typefind from the pipeline and remove it + /* disconnect the typefind from the pipeline and remove it */ gst_element_disconnect (cache, "src", typefind, "sink"); gst_bin_remove (GST_BIN (autobin), typefind); diff --git a/tests/old/examples/mixer/mixer.c b/tests/old/examples/mixer/mixer.c index 2221d95b32..31ba579149 100644 --- a/tests/old/examples/mixer/mixer.c +++ b/tests/old/examples/mixer/mixer.c @@ -18,10 +18,10 @@ #include "mixer.h" #include -//#define WITH_BUG -//#define WITH_BUG2 -//#define DEBUG -//#define AUTOPLUG /* define if you want autoplugging of input channels */ +/*#define WITH_BUG */ +/*#define WITH_BUG2 */ +/*#define DEBUG */ +/*#define AUTOPLUG * define if you want autoplugging of input channels * */ /* function prototypes */ input_channel_t* create_input_channel (int id, char* location); @@ -37,7 +37,7 @@ void eos(GstElement *element) { g_print("have eos, quitting ?\n"); -// playing = FALSE; +/* playing = FALSE; */ } static GstCaps* @@ -62,7 +62,7 @@ gst_play_typefind (GstBin *bin, GstElement *element) gst_element_set_state (pipeline, GST_STATE_PLAYING); - // push a buffer... the have_type signal handler will set the found flag + /* push a buffer... the have_type signal handler will set the found flag */ gst_bin_iterate (GST_BIN (pipeline)); gst_element_set_state (pipeline, GST_STATE_NULL); @@ -188,17 +188,17 @@ int main(int argc,char *argv[]) /* start playing */ gst_element_set_state(main_bin, GST_STATE_PLAYING); - // write out the schedule + /* write out the schedule */ gst_scheduler_show(GST_ELEMENT_SCHED(main_bin)); playing = TRUE; j = 0; - //printf ("main: start iterating from 0"); + /*printf ("main: start iterating from 0"); */ while (playing && j < 100) { -// printf ("main: iterating %d\n", j); +/* printf ("main: iterating %d\n", j); */ gst_bin_iterate(GST_BIN(main_bin)); - //fprintf(stderr,"after iterate()\n"); + /*fprintf(stderr,"after iterate()\n"); */ ++j; } } @@ -206,7 +206,7 @@ int main(int argc,char *argv[]) while (playing) { gst_bin_iterate(GST_BIN(main_bin)); - //fprintf(stderr,"after iterate()\n"); + /*fprintf(stderr,"after iterate()\n"); */ } /* stop the bin */ gst_element_set_state(main_bin, GST_STATE_NULL); diff --git a/tests/old/examples/plugins/Makefile.am b/tests/old/examples/plugins/Makefile.am index 41edbfea85..17a6bd6466 100644 --- a/tests/old/examples/plugins/Makefile.am +++ b/tests/old/examples/plugins/Makefile.am @@ -2,6 +2,6 @@ noinst_LTLIBRARIES = libexample.la libexample_la_SOURCES = example.c libexample_la_CFLAGS = $(GST_CFLAGS) -libexample_la_LIBADD = $(GST_LIBS) +libexample_la_LIBADD = noinst_HEADERS = example.h diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c index 3b721f9c98..f7eb754c60 100644 --- a/tests/old/examples/plugins/example.c +++ b/tests/old/examples/plugins/example.c @@ -161,7 +161,7 @@ gst_example_class_init (GstExampleClass *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 */ /* Here we add a signal to the object. This is avery useless signal * called asdf. The signal will also pass a pointer to the listeners diff --git a/tests/old/examples/thread/thread.c b/tests/old/examples/thread/thread.c index 7011880a49..5492210c4d 100644 --- a/tests/old/examples/thread/thread.c +++ b/tests/old/examples/thread/thread.c @@ -55,9 +55,9 @@ int main(int argc,char *argv[]) } */ - //gst_bin_remove(GST_BIN(pipeline), filesrc); + /*gst_bin_remove(GST_BIN(pipeline), filesrc); */ - //gst_bin_add(GST_BIN(thread), filesrc); + /*gst_bin_add(GST_BIN(thread), filesrc); */ gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline)); /* make it ready */ diff --git a/tests/old/examples/xml/runxml.c b/tests/old/examples/xml/runxml.c index e3f2d755e2..5b91e44ce4 100644 --- a/tests/old/examples/xml/runxml.c +++ b/tests/old/examples/xml/runxml.c @@ -36,8 +36,8 @@ int main(int argc,char *argv[]) xml = gst_xml_new (); -// g_signal_connect (G_OBJECT (xml), "object_loaded", -// G_CALLBACK (xml_loaded), xml); +/* g_signal_connect (G_OBJECT (xml), "object_loaded", */ +/* G_CALLBACK (xml_loaded), xml); */ if (argc == 2) ret = gst_xml_parse_file(xml, argv[1], NULL); diff --git a/tests/old/testsuite/bytestream/gstbstest.c b/tests/old/testsuite/bytestream/gstbstest.c index 04b84cb752..7dc91e79bc 100644 --- a/tests/old/testsuite/bytestream/gstbstest.c +++ b/tests/old/testsuite/bytestream/gstbstest.c @@ -102,7 +102,7 @@ static void gst_bstest_loop (GstElement * element); static GstElementClass *parent_class = NULL; -// static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; +/* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */ GType gst_bstest_get_type (void) @@ -387,7 +387,7 @@ plugin_init (GModule * module, GstPlugin * plugin) { GstElementFactory *factory; - // we need gstbytestream + /* we need gstbytestream */ if (!gst_library_load ("gstbytestream")) { g_print ("can't load bytestream\n"); return FALSE; diff --git a/tests/sched/dynamic-pipeline.c b/tests/sched/dynamic-pipeline.c index abaee6f7cd..5b25770d1c 100644 --- a/tests/sched/dynamic-pipeline.c +++ b/tests/sched/dynamic-pipeline.c @@ -22,34 +22,34 @@ int main (int argc, char *argv[]) pipe1 = gst_pipeline_new("pipe1"); pipe2 = gst_pipeline_new("pipe2"); - // make the first pipeline + /* make the first pipeline */ gst_bin_add (GST_BIN(pipe1), fakesrc); gst_bin_add (GST_BIN(pipe1), fakesink1); gst_element_connect(fakesrc, "src", fakesink1, "sink"); - // initialize cothreads + /* initialize cothreads */ gst_element_set_state(pipe1, GST_STATE_PLAYING); gst_bin_iterate (GST_BIN (pipe1)); gst_element_set_state(pipe1, GST_STATE_READY); - // destroy the fakesink, but keep fakesrc (its state is GST_STATE_READY) + /* destroy the fakesink, but keep fakesrc (its state is GST_STATE_READY) */ gst_element_disconnect(fakesrc, "src", fakesink1, "sink"); gst_object_ref(GST_OBJECT(fakesrc)); gst_bin_remove(GST_BIN(pipe1), fakesrc); gst_bin_remove(GST_BIN(pipe1), fakesink1); gst_object_unref(GST_OBJECT(pipe1)); - // make a new pipeline + /* make a new pipeline */ gst_bin_add (GST_BIN(pipe2), fakesink2); - // don't change the new pipeline's state, it should change on the bin_add + /* don't change the new pipeline's state, it should change on the bin_add */ gst_bin_add (GST_BIN(pipe2), fakesrc); gst_element_connect(fakesrc, "src", fakesink2, "sink"); - // show the pipeline state + /* show the pipeline state */ gst_xml_write_file (GST_ELEMENT (pipe2), stdout); - // try to iterate the pipeline + /* try to iterate the pipeline */ gst_element_set_state(pipe2, GST_STATE_PLAYING); gst_bin_iterate(GST_BIN(pipe2)); gst_element_set_state(pipe2, GST_STATE_NULL); diff --git a/tests/sched/runxml.c b/tests/sched/runxml.c index 38a630912a..309f68d317 100644 --- a/tests/sched/runxml.c +++ b/tests/sched/runxml.c @@ -75,7 +75,7 @@ int main(int argc,char *argv[]) incount = 0; outcount = 0; -// gst_element_set_state(bin, GST_STATE_READY); +/* gst_element_set_state(bin, GST_STATE_READY); */ gst_element_set_state(bin, GST_STATE_PLAYING); if (GST_IS_THREAD (bin)) { diff --git a/testsuite/bytestream/gstbstest.c b/testsuite/bytestream/gstbstest.c index 04b84cb752..7dc91e79bc 100644 --- a/testsuite/bytestream/gstbstest.c +++ b/testsuite/bytestream/gstbstest.c @@ -102,7 +102,7 @@ static void gst_bstest_loop (GstElement * element); static GstElementClass *parent_class = NULL; -// static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; +/* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */ GType gst_bstest_get_type (void) @@ -387,7 +387,7 @@ plugin_init (GModule * module, GstPlugin * plugin) { GstElementFactory *factory; - // we need gstbytestream + /* we need gstbytestream */ if (!gst_library_load ("gstbytestream")) { g_print ("can't load bytestream\n"); return FALSE;