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:13 +00:00
parent 6ae5f15064
commit 0067d17205
53 changed files with 265 additions and 339 deletions

View file

@ -73,84 +73,84 @@ int main(int argc,char *argv[]) {
TEST_CATEGORY("Creation"); TEST_CATEGORY("Creation");
TEST("create object"); TEST("create object");
// setup /* setup */
// action /* action */
object = gst_object_new(); object = gst_object_new();
// assertions /* assertions */
ASSERT(object != NULL); ASSERT(object != NULL);
ASSERT(GST_IS_OBJECT(object)); ASSERT(GST_IS_OBJECT(object));
// cleanup /* cleanup */
g_free(object); g_free(object);
ENDTEST(); ENDTEST();
// new category /* new category */
TEST_CATEGORY("Refcounting"); TEST_CATEGORY("Refcounting");
// category setup /* category setup */
object = gst_object_new(); object = gst_object_new();
TEST("new object"); TEST("new object");
// setup /* setup */
// action /* action */
// assertions /* assertions */
ASSERT(object->refcount == 1); ASSERT(object->refcount == 1);
ASSERT(GTK_OBJECT_FLOATING(object) == TRUE); ASSERT(GTK_OBJECT_FLOATING(object) == TRUE);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("increment refcount"); TEST("increment refcount");
// setup /* setup */
// action /* action */
gst_object_ref(object); gst_object_ref(object);
// assertions /* assertions */
ASSERT(object->refcount == 2); ASSERT(object->refcount == 2);
ASSERT(GTK_OBJECT_FLOATING(object) == TRUE); ASSERT(GTK_OBJECT_FLOATING(object) == TRUE);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("sink object"); TEST("sink object");
// setup /* setup */
// action /* action */
gst_object_sink(object); gst_object_sink(object);
// assertions /* assertions */
ASSERT(object->refcount == 1); ASSERT(object->refcount == 1);
ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("increment refcount after sink"); TEST("increment refcount after sink");
// setup /* setup */
// action /* action */
gst_object_ref(object); gst_object_ref(object);
// assertions /* assertions */
ASSERT(object->refcount == 2); ASSERT(object->refcount == 2);
ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("decrement refcount after sink"); TEST("decrement refcount after sink");
// setup /* setup */
// action /* action */
gst_object_unref(object); gst_object_unref(object);
// assertions /* assertions */
ASSERT(object->refcount == 1); ASSERT(object->refcount == 1);
ASSERT(GTK_OBJECT_FLOATING(object) == FALSE); ASSERT(GTK_OBJECT_FLOATING(object) == FALSE);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
// category cleanup /* category cleanup */
g_free(object); g_free(object);
// new category /* new category */
TEST_CATEGORY("Parentage"); TEST_CATEGORY("Parentage");
// category setup /* category setup */
object = gst_object_new(); object = gst_object_new();
parent = gst_object_new(); parent = gst_object_new();
newparent = gst_object_new(); newparent = gst_object_new();
gtkobject = gtk_type_new(gtk_object_get_type()); gtkobject = gtk_type_new(gtk_object_get_type());
// category assertions /* category assertions */
ASSERT(object != NULL); ASSERT(object != NULL);
ASSERT(object->refcount == 1); ASSERT(object->refcount == 1);
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
@ -160,135 +160,135 @@ int main(int argc,char *argv[]) {
ASSERT(!GST_IS_OBJECT(gtkobject)); ASSERT(!GST_IS_OBJECT(gtkobject));
TEST("gst_object_set_parent: null object"); TEST("gst_object_set_parent: null object");
// setup /* setup */
// action /* action */
gst_object_set_parent(NULL,NULL); gst_object_set_parent(NULL,NULL);
// assertions /* assertions */
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: invalid object"); TEST("gst_object_set_parent: invalid object");
// setup /* setup */
// action /* action */
gst_object_set_parent((GstObject*)gtkobject,NULL); gst_object_set_parent((GstObject*)gtkobject,NULL);
// assertions /* assertions */
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: null parent"); TEST("gst_object_set_parent: null parent");
// setup /* setup */
// action /* action */
gst_object_set_parent(object,NULL); gst_object_set_parent(object,NULL);
// assertions /* assertions */
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: invalid parent"); TEST("gst_object_set_parent: invalid parent");
// setup /* setup */
// action /* action */
gst_object_set_parent(object,(GstObject*)gtkobject); gst_object_set_parent(object,(GstObject*)gtkobject);
// assertions /* assertions */
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: valid object, parent is object"); TEST("gst_object_set_parent: valid object, parent is object");
// setup /* setup */
// action /* action */
gst_object_set_parent(object,object); gst_object_set_parent(object,object);
// assertions /* assertions */
ASSERT(object->parent == NULL); ASSERT(object->parent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: valid object and parent"); TEST("gst_object_set_parent: valid object and parent");
// setup /* setup */
// action /* action */
gst_object_set_parent(object,parent); gst_object_set_parent(object,parent);
// assertions /* assertions */
ASSERT(object->parent == parent); ASSERT(object->parent == parent);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_set_parent: parent already set"); TEST("gst_object_set_parent: parent already set");
// setup /* setup */
// action /* action */
gst_object_set_parent(object,newparent); gst_object_set_parent(object,newparent);
// assertions /* assertions */
ASSERT(object->parent != newparent); ASSERT(object->parent != newparent);
ASSERT(object->parent == parent); ASSERT(object->parent == parent);
// cleanup /* cleanup */
g_free(object); g_free(object);
ENDTEST(); ENDTEST();
TEST("gst_object_get_parent: null object"); TEST("gst_object_get_parent: null object");
// setup /* setup */
// action /* action */
curparent = gst_object_get_parent(NULL); curparent = gst_object_get_parent(NULL);
// assertions /* assertions */
ASSERT(curparent == NULL); ASSERT(curparent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_get_parent: invalid object"); TEST("gst_object_get_parent: invalid object");
// setup /* setup */
// action /* action */
curparent = gst_object_get_parent((GstObject*)gtkobject); curparent = gst_object_get_parent((GstObject*)gtkobject);
// assertions /* assertions */
ASSERT(curparent == NULL); ASSERT(curparent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_get_parent: no parent"); TEST("gst_object_get_parent: no parent");
// setup /* setup */
object = gst_object_new(); object = gst_object_new();
// action /* action */
curparent = gst_object_get_parent(object); curparent = gst_object_get_parent(object);
// assertions /* assertions */
ASSERT(curparent == NULL); ASSERT(curparent == NULL);
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_get_parent: valid parent"); TEST("gst_object_get_parent: valid parent");
// setup /* setup */
gst_object_set_parent(object,parent); gst_object_set_parent(object,parent);
// action /* action */
curparent = gst_object_get_parent(object); curparent = gst_object_get_parent(object);
// assertions /* assertions */
ASSERT(curparent == parent); ASSERT(curparent == parent);
// cleanup /* cleanup */
g_free(object); g_free(object);
ENDTEST(); ENDTEST();
TEST("gst_object_unparent: null object"); TEST("gst_object_unparent: null object");
// setup /* setup */
// action /* action */
gst_object_unparent(NULL); gst_object_unparent(NULL);
// assertions /* assertions */
// NONE - FIXME! /* NONE - FIXME! */
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_unparent: invalid object"); TEST("gst_object_unparent: invalid object");
// setup /* setup */
// action /* action */
gst_object_unparent((GstObject*)gtkobject); gst_object_unparent((GstObject*)gtkobject);
// assertions /* assertions */
// NONE - FIXME! /* NONE - FIXME! */
// cleanup /* cleanup */
ENDTEST(); ENDTEST();
TEST("gst_object_unparent: no parent"); TEST("gst_object_unparent: no parent");
// setup /* setup */
object = gst_object_new(); object = gst_object_new();
// category cleanup /* category cleanup */
g_free(object); g_free(object);
g_free(parent); g_free(parent);
g_free(newparent); g_free(newparent);

View file

@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); 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_element_disconnect (cache, "src", typefind, "sink");
gst_bin_remove (GST_BIN (autobin), typefind); gst_bin_remove (GST_BIN (autobin), typefind);

View file

@ -47,7 +47,7 @@ void cut_start (GstElement *element)
struct tm *ct; struct tm *ct;
time (&seconds); time (&seconds);
ct = localtime (&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", 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_year + 1900, ct->tm_mon, ct->tm_mday,
ct->tm_hour, ct->tm_min, ct->tm_sec); 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 main (int argc, char *argv[])
{ {
//int i, j; /*int i, j; */
//gboolean done; /*gboolean done; */
//char buffer[20]; /*char buffer[20]; */
//output_channel_t *channel_out; /*output_channel_t *channel_out; */
GstElement *audiosrc; GstElement *audiosrc;
@ -183,9 +183,9 @@ int main (int argc, char *argv[])
*/ */
while (playing) while (playing)
{ {
// g_print ("> "); /* g_print ("> "); */
gst_bin_iterate (GST_BIN (main_bin)); gst_bin_iterate (GST_BIN (main_bin));
// g_print (" <"); /* g_print (" <"); */
if (cut_start_signalled) if (cut_start_signalled)
{ {
g_print ("\nDEBUG: main: cut_start_signalled true !\n"); g_print ("\nDEBUG: main: cut_start_signalled true !\n");

View file

@ -7,7 +7,7 @@ main (int argc, char *argv[])
GstElement *src, *sink; GstElement *src, *sink;
GstPad *srcpad, *sinkpad; GstPad *srcpad, *sinkpad;
// _gst_plugin_spew = TRUE; /* _gst_plugin_spew = TRUE; */
gst_init (&argc, &argv); gst_init (&argc, &argv);
bin = GST_BIN (gst_pipeline_new ("pipeline")); bin = GST_BIN (gst_pipeline_new ("pipeline"));

View file

@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); 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_element_disconnect (cache, "src", typefind, "sink");
gst_bin_remove (GST_BIN (autobin), typefind); gst_bin_remove (GST_BIN (autobin), typefind);

View file

@ -18,10 +18,10 @@
#include "mixer.h" #include "mixer.h"
#include <unistd.h> #include <unistd.h>
//#define WITH_BUG /*#define WITH_BUG */
//#define WITH_BUG2 /*#define WITH_BUG2 */
//#define DEBUG /*#define DEBUG */
//#define AUTOPLUG /* define if you want autoplugging of input channels */ /*#define AUTOPLUG * define if you want autoplugging of input channels * */
/* function prototypes */ /* function prototypes */
input_channel_t* create_input_channel (int id, char* location); input_channel_t* create_input_channel (int id, char* location);
@ -37,7 +37,7 @@ void eos(GstElement *element)
{ {
g_print("have eos, quitting ?\n"); g_print("have eos, quitting ?\n");
// playing = FALSE; /* playing = FALSE; */
} }
static GstCaps* static GstCaps*
@ -62,7 +62,7 @@ gst_play_typefind (GstBin *bin, GstElement *element)
gst_element_set_state (pipeline, GST_STATE_PLAYING); 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_bin_iterate (GST_BIN (pipeline));
gst_element_set_state (pipeline, GST_STATE_NULL); gst_element_set_state (pipeline, GST_STATE_NULL);
@ -188,17 +188,17 @@ int main(int argc,char *argv[])
/* start playing */ /* start playing */
gst_element_set_state(main_bin, GST_STATE_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)); gst_scheduler_show(GST_ELEMENT_SCHED(main_bin));
playing = TRUE; playing = TRUE;
j = 0; j = 0;
//printf ("main: start iterating from 0"); /*printf ("main: start iterating from 0"); */
while (playing && j < 100) while (playing && j < 100)
{ {
// printf ("main: iterating %d\n", j); /* printf ("main: iterating %d\n", j); */
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
//fprintf(stderr,"after iterate()\n"); /*fprintf(stderr,"after iterate()\n"); */
++j; ++j;
} }
} }
@ -206,7 +206,7 @@ int main(int argc,char *argv[])
while (playing) while (playing)
{ {
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
//fprintf(stderr,"after iterate()\n"); /*fprintf(stderr,"after iterate()\n"); */
} }
/* stop the bin */ /* stop the bin */
gst_element_set_state(main_bin, GST_STATE_NULL); gst_element_set_state(main_bin, GST_STATE_NULL);

View file

@ -2,6 +2,6 @@ noinst_LTLIBRARIES = libexample.la
libexample_la_SOURCES = example.c libexample_la_SOURCES = example.c
libexample_la_CFLAGS = $(GST_CFLAGS) libexample_la_CFLAGS = $(GST_CFLAGS)
libexample_la_LIBADD = $(GST_LIBS) libexample_la_LIBADD =
noinst_HEADERS = example.h noinst_HEADERS = example.h

View file

@ -161,7 +161,7 @@ gst_example_class_init (GstExampleClass *klass)
*/ */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE,
g_param_spec_int("active","active","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 /* 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 * called asdf. The signal will also pass a pointer to the listeners

View file

@ -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)); gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline));
/* make it ready */ /* make it ready */

View file

@ -36,8 +36,8 @@ int main(int argc,char *argv[])
xml = gst_xml_new (); xml = gst_xml_new ();
// g_signal_connect (G_OBJECT (xml), "object_loaded", /* g_signal_connect (G_OBJECT (xml), "object_loaded", */
// G_CALLBACK (xml_loaded), xml); /* G_CALLBACK (xml_loaded), xml); */
if (argc == 2) if (argc == 2)
ret = gst_xml_parse_file(xml, argv[1], NULL); ret = gst_xml_parse_file(xml, argv[1], NULL);

View file

@ -9,27 +9,27 @@ plugin_LTLIBRARIES = \
libgststaticautoplug_la_SOURCES = gststaticautoplug.c libgststaticautoplug_la_SOURCES = gststaticautoplug.c
libgststaticautoplug_la_CFLAGS = $(GST_CFLAGS) libgststaticautoplug_la_CFLAGS = $(GST_CFLAGS)
libgststaticautoplug_la_LIBADD = $(GST_LIBS) libgststaticautoplug_la_LIBADD =
libgststaticautoplug_la_LDFLAGS = @GST_LT_LDFLAGS@ libgststaticautoplug_la_LDFLAGS = @GST_LT_LDFLAGS@
libgststaticautoplugrender_la_SOURCES = gststaticautoplugrender.c libgststaticautoplugrender_la_SOURCES = gststaticautoplugrender.c
libgststaticautoplugrender_la_CFLAGS = $(GST_CFLAGS) libgststaticautoplugrender_la_CFLAGS = $(GST_CFLAGS)
libgststaticautoplugrender_la_LIBADD = $(GST_LIBS) libgststaticautoplugrender_la_LIBADD =
libgststaticautoplugrender_la_LDFLAGS = @GST_LT_LDFLAGS@ libgststaticautoplugrender_la_LDFLAGS = @GST_LT_LDFLAGS@
libgstautoplugcache_la_SOURCES = gstautoplugcache.c libgstautoplugcache_la_SOURCES = gstautoplugcache.c
libgstautoplugcache_la_CFLAGS = $(GST_CFLAGS) libgstautoplugcache_la_CFLAGS = $(GST_CFLAGS)
libgstautoplugcache_la_LIBADD = $(GST_LIBS) libgstautoplugcache_la_LIBADD =
libgstautoplugcache_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstautoplugcache_la_LDFLAGS = @GST_LT_LDFLAGS@
libgstautoplugger_la_SOURCES = gstautoplugger.c libgstautoplugger_la_SOURCES = gstautoplugger.c
libgstautoplugger_la_CFLAGS = $(GST_CFLAGS) libgstautoplugger_la_CFLAGS = $(GST_CFLAGS)
libgstautoplugger_la_LIBADD = $(GST_LIBS) libgstautoplugger_la_LIBADD =
libgstautoplugger_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstautoplugger_la_LDFLAGS = @GST_LT_LDFLAGS@
libgstspider_la_SOURCES = gstspider.c gstspideridentity.c gstsearchfuncs.c libgstspider_la_SOURCES = gstspider.c gstspideridentity.c gstsearchfuncs.c
libgstspider_la_CFLAGS = $(GST_CFLAGS) libgstspider_la_CFLAGS = $(GST_CFLAGS)
libgstspider_la_LIBADD = $(GST_LIBS) libgstspider_la_LIBADD =
libgstspider_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstspider_la_LDFLAGS = @GST_LT_LDFLAGS@
noinst_HEADERS = gststaticautoplug.h gststaticautoplugrender.h \ noinst_HEADERS = gststaticautoplug.h gststaticautoplugrender.h \

View file

@ -146,10 +146,10 @@ gst_autoplugger_class_init (GstAutopluggerClass *klass)
/* /*
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BUFFER_COUNT, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_BUFFER_COUNT,
g_param_spec_int("buffer_count","buffer_count","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_object_class_install_property(G_OBJECT_CLASS(klass), ARG_RESET,
g_param_spec_boolean("reset","reset","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; 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); g_return_if_fail(autoplugger->autobin != NULL);
gst_bin_add(GST_BIN(autoplugger),autoplugger->autobin); gst_bin_add(GST_BIN(autoplugger),autoplugger->autobin);
// // re-attach the srcpad's original peer to the cache * // re-attach the srcpad's original peer to the cache *
// GST_DEBUG(GST_CAT_AUTOPLUG, "reconnecting the cache to the downstream peer\n"); * GST_DEBUG(GST_CAT_AUTOPLUG, "reconnecting the cache to the downstream peer\n"); *
// gst_pad_connect(autoplugger->cache_srcpad,autoplugger->srcpadpeer); * 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_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(autoplugger->cache_srcpad,gst_element_get_pad(autoplugger->autobin,"sink"));
gst_pad_connect(gst_element_get_pad(autoplugger->autobin,"src_00"),autoplugger->srcpadpeer); 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_INFO(GST_CAT_AUTOPLUG,"here we go into nothingness, hoping the typefind will return us to safety");
gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger)); gst_scheduler_show(GST_ELEMENT_SCHED(autoplugger));
} else { } 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", * g_signal_connect (G_OBJECT(autoplugger->cache),"cache_empty",
* gst_autoplugger_cache_empty,autoplugger); * gst_autoplugger_cache_empty,autoplugger);
*/ */

View file

@ -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 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 (GstSpiderConnection *conn);
static GstPadConnectReturn gst_spider_plug_from_srcpad (GstSpiderConnection *conn, GstPad *srcpad); 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); static GstPadConnectReturn gst_spider_create_and_plug (GstSpiderConnection *conn, GList *plugpath);
/* random functions */ /* random functions */

View file

@ -19,7 +19,7 @@ libgstelements_la_SOURCES = \
gststatistics.c \ gststatistics.c \
gstmd5sink.c gstmd5sink.c
libgstelements_la_CFLAGS = $(GST_CFLAGS) libgstelements_la_CFLAGS = $(GST_CFLAGS)
libgstelements_la_LIBADD = $(GST_LIBS) libgstelements_la_LIBADD =
libgstelements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @GST_LT_LDFLAGS@ libgstelements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @GST_LT_LDFLAGS@
noinst_HEADERS = \ noinst_HEADERS = \

View file

@ -141,7 +141,7 @@ md5_read_ctx (GstMD5Sink *ctx, gpointer resbuf)
void void
md5_process_bytes (const void *buffer, size_t len, GstMD5Sink *ctx) 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 /* When we already have some bits in our internal buffer concatenate
both inputs first. */ both inputs first. */

View file

@ -333,7 +333,7 @@ gst_default_info_handler (gint category, gboolean incore,
#else #else
fprintf(stderr,"INFO:%s%s %s\n", fprintf(stderr,"INFO:%s%s %s\n",
location,elementname,string); location,elementname,string);
#endif // GST_DEBUG_COLOR #endif * GST_DEBUG_COLOR *
#endif #endif
*/ */

View file

@ -501,7 +501,7 @@ gst_parse_launchv (const gchar **argv)
ret = gst_parse_launchv_recurse (argv, GST_BIN (pipeline), NULL); ret = gst_parse_launchv_recurse (argv, GST_BIN (pipeline), NULL);
if (ret <= 0) { if (ret <= 0) {
// print an error /* print an error */
gst_object_unref (GST_OBJECT (pipeline)); gst_object_unref (GST_OBJECT (pipeline));
return NULL; return NULL;
} else { } else {

View file

@ -312,7 +312,7 @@ restart:
GST_ELEMENT_NAME (queue), queue->level_buffers); GST_ELEMENT_NAME (queue), queue->level_buffers);
break; break;
default: default:
//gst_pad_event_default (pad, GST_EVENT (buf)); /*gst_pad_event_default (pad, GST_EVENT (buf)); */
break; break;
} }
} }
@ -536,8 +536,8 @@ gst_queue_change_state (GstElement *element)
new_state = GST_STATE_PENDING (element); new_state = GST_STATE_PENDING (element);
if (new_state == GST_STATE_PAUSED) { if (new_state == GST_STATE_PAUSED) {
//g_cond_signal (queue->not_full); /*g_cond_signal (queue->not_full); */
//g_cond_signal (queue->not_empty); /*g_cond_signal (queue->not_empty); */
} }
else if (new_state == GST_STATE_READY) { else if (new_state == GST_STATE_READY) {
gst_queue_locked_flush (queue); gst_queue_locked_flush (queue);

View file

@ -4,12 +4,12 @@ plugin_LTLIBRARIES = libgstbasicscheduler.la libgststandardscheduler.la
libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c
libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS) libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS)
libgstbasicscheduler_la_LIBADD = $(GST_LIBS) ../libcothreads.la libgstbasicscheduler_la_LIBADD = ../libcothreads.la
libgstbasicscheduler_la_LDFLAGS = @GST_LT_LDFLAGS@ libgstbasicscheduler_la_LDFLAGS = @GST_LT_LDFLAGS@
libgststandardscheduler_la_SOURCES = gststandardscheduler.c libgststandardscheduler_la_SOURCES = gststandardscheduler.c
libgststandardscheduler_la_CFLAGS = $(GST_CFLAGS) -I$(top_srcdir)/libs/ext/cothreads 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@ libgststandardscheduler_la_LDFLAGS = @GST_LT_LDFLAGS@
## this is a REALLY evil hack ## this is a REALLY evil hack

View file

@ -597,42 +597,6 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
return TRUE; 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 * static GstSchedulerChain *
gst_basic_scheduler_chain_new (GstBasicScheduler * sched) gst_basic_scheduler_chain_new (GstBasicScheduler * sched)
{ {

View file

@ -242,8 +242,6 @@ static inline void sched_switch (cothread *to)
if (from == to) { if (from == to) {
GST_DEBUG (GST_CAT_COTHREAD_SWITCH, "trying to switch to the same cothread (%p), not allowed\n", GST_DEBUG (GST_CAT_COTHREAD_SWITCH, "trying to switch to the same cothread (%p), not allowed\n",
to); to);
/* wingo says G_BREAKPOINT only works for x86, so change it */
/* G_BREAKPOINT(); */
g_assert_not_reached (); g_assert_not_reached ();
} }
GST_INFO (GST_CAT_COTHREAD_SWITCH, "switching from cothread %p to cothread %p", 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; 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 * static GstSchedulerChain *
gst_standard_scheduler_chain_new (GstStandardScheduler * sched) gst_standard_scheduler_chain_new (GstStandardScheduler * sched)
{ {
@ -1073,15 +1035,15 @@ gst_standard_scheduler_state_transition (GstScheduler *sched, GstElement *elemen
static void static void
gst_standard_scheduler_lock_element (GstScheduler * sched, GstElement * element) gst_standard_scheduler_lock_element (GstScheduler * sched, GstElement * element)
{ {
// if (GST_ELEMENT_THREADSTATE (element)) /* if (GST_ELEMENT_THREADSTATE (element)) */
// cothread_lock (GST_ELEMENT_THREADSTATE (element)); /* cothread_lock (GST_ELEMENT_THREADSTATE (element)); */
} }
static void static void
gst_standard_scheduler_unlock_element (GstScheduler * sched, GstElement * element) gst_standard_scheduler_unlock_element (GstScheduler * sched, GstElement * element)
{ {
// if (GST_ELEMENT_THREADSTATE (element)) /* if (GST_ELEMENT_THREADSTATE (element)) */
// cothread_unlock (GST_ELEMENT_THREADSTATE (element)); /* cothread_unlock (GST_ELEMENT_THREADSTATE (element)); */
} }
static void static void

View file

@ -4,5 +4,5 @@ plugin_LTLIBRARIES = libgsttypes.la
libgsttypes_la_SOURCES = gsttypes.c libgsttypes_la_SOURCES = gsttypes.c
libgsttypes_la_CFLAGS = $(GST_CFLAGS) libgsttypes_la_CFLAGS = $(GST_CFLAGS)
libgsttypes_la_LIBADD = $(GST_LIBS) libgsttypes_la_LIBADD =
libgsttypes_la_LDFLAGS = @GST_LT_LDFLAGS@ libgsttypes_la_LDFLAGS = @GST_LT_LDFLAGS@

View file

@ -66,7 +66,7 @@
#ifndef _MMX_H #ifndef _MMX_H
#define _MMX_H #define _MMX_H
//#define MMX_TRACE /*#define MMX_TRACE */
/* Warning: at this writing, the version of GAS packaged /* Warning: at this writing, the version of GAS packaged
with most Linux distributions does not handle the with most Linux distributions does not handle the

View file

@ -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 void gst_identity_loop (GstElement *element);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
// static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; /* static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_identity_get_type (void) gst_identity_get_type (void)
@ -157,11 +157,11 @@ gst_identity_init (GstIdentity *identity)
{ {
identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK); identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad); 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); identity->srcpad = gst_pad_new ("src", GST_PAD_SRC);
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); 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); 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 /* THIS IS THE BUFFER BASED ONE
do { do {
// g_print("\n"); * g_print("\n"); *
for (i=0;i<identity->count;i++) { for (i=0;i<identity->count;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); buf = gst_bytestream_read(identity->bs,identity->byte_size);
if (!buf) g_print("BUFFER IS BOGUS\n"); 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); gst_pad_push(identity->srcpad,buf);
// g_print("\n"); * g_print("\n"); *
gst_bytestream_print_status(identity->bs); gst_bytestream_print_status(identity->bs);
// g_print("\n\n"); * g_print("\n\n"); *
} }
exit(1); exit(1);
@ -206,7 +206,7 @@ gst_identity_loop (GstElement *element)
do { do {
for (i=0;i<identity->count;i++) { for (i=0;i<identity->count;i++) {
buf = gst_buffer_new(); 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_DATA(buf) = gst_bytestream_peek_bytes(identity->bs,identity->byte_size);
GST_BUFFER_SIZE(buf) = identity->byte_size; GST_BUFFER_SIZE(buf) = identity->byte_size;
GST_BUFFER_FLAG_SET(buf,GST_BUFFER_DONTFREE); GST_BUFFER_FLAG_SET(buf,GST_BUFFER_DONTFREE);
@ -268,7 +268,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
{ {
GstElementFactory *factory; GstElementFactory *factory;
// we need gstbytestream /* we need gstbytestream */
if (!gst_library_load ("gstbytestream")) { if (!gst_library_load ("gstbytestream")) {
g_print("can't load bytestream\n"); g_print("can't load bytestream\n");
return FALSE; return FALSE;

View file

@ -100,7 +100,7 @@ gst_dparam_class_init (GstDParamClass *klass)
gobject_class->dispose = gst_dparam_dispose; gobject_class->dispose = gst_dparam_dispose;
//gstobject_class->save_thyself = gst_dparam_save_thyself; /*gstobject_class->save_thyself = gst_dparam_save_thyself; */
} }

View file

@ -95,7 +95,7 @@ gst_dpsmooth_class_init (GstDParamSmoothClass *klass)
"The amount a float value can change for a given slope_time", "The amount a float value can change for a given slope_time",
0.0F, G_MAXFLOAT, 0.2F, G_PARAM_READWRITE)); 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; */
} }

View file

@ -583,7 +583,7 @@ gst_dpman_state_change (GstElement *element, gint old_state, gint new_state, Gst
if (new_state == GST_STATE_PLAYING){ if (new_state == GST_STATE_PLAYING){
GST_DEBUG(GST_CAT_PARAMS, "initialising params\n"); 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); dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
while (dwraps){ while (dwraps){
dpwrap = (GstDParamWrapper*)dwraps->data; 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 (dpman != NULL, frames);
g_return_val_if_fail (GST_IS_DPMAN (dpman), 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); dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
while (dwraps){ while (dwraps){
dpwrap = (GstDParamWrapper*)dwraps->data; dpwrap = (GstDParamWrapper*)dwraps->data;
@ -633,7 +633,7 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t
switch (dpwrap->update_method) { 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: case GST_DPMAN_DIRECT:
GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value); GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value);
GST_DEBUG(GST_CAT_PARAMS, "doing direct update\n"); GST_DEBUG(GST_CAT_PARAMS, "doing direct update\n");
@ -652,15 +652,15 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t
} }
break; 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: case GST_DPMAN_CALLBACK:
GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value); GST_DPARAM_DO_UPDATE(dparam, timestamp, dpwrap->value);
GST_DEBUG(GST_CAT_PARAMS, "doing callback update\n"); GST_DEBUG(GST_CAT_PARAMS, "doing callback update\n");
GST_DPMAN_DO_UPDATE(dpwrap); GST_DPMAN_DO_UPDATE(dpwrap);
break; break;
// array method - generate an array of the right size /* array method - generate an array of the right size */
// with each value being the same (in synchronous update mode) /* with each value being the same (in synchronous update mode) */
case GST_DPMAN_ARRAY: case GST_DPMAN_ARRAY:
GST_DEBUG(GST_CAT_PARAMS, "doing array update\n"); GST_DEBUG(GST_CAT_PARAMS, "doing array update\n");
switch (G_VALUE_TYPE(dpwrap->value)){ switch (G_VALUE_TYPE(dpwrap->value)){

View file

@ -163,9 +163,9 @@ void gst_getbits_init(gst_getbits_t *gb, GstGetbitsCallback callback, void *data
#ifdef HAVE_LIBMMX #ifdef HAVE_LIBMMX
if (1) { if (1) {
gb->getbits = _gst_getbits_mmx; gb->getbits = _gst_getbits_mmx;
// gb->backbits = _gst_getbits_back_mmx; /* gb->backbits = _gst_getbits_back_mmx; */
// gb->backbytes = _gst_getbits_byteback_mmx; /* gb->backbytes = _gst_getbits_byteback_mmx; */
// printf("gstgetbits: using MMX optimized versions\n"); /* printf("gstgetbits: using MMX optimized versions\n"); */
} else } else
#endif /* HAVE_LIBMMX */ #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->showbits = _gst_showbits_int;
gb->flushbits = _gst_flushbits_int; gb->flushbits = _gst_flushbits_int;
gb->backbits = _gst_getbits_back_int; gb->backbits = _gst_getbits_back_int;
// printf("gstgetbits: using callback versions\n"); /* printf("gstgetbits: using callback versions\n"); */
} }
else { else {
#ifdef HAVE_CPU_I386 #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->showbits = _gst_showbits_i386;
gb->flushbits = _gst_flushbits_i386; gb->flushbits = _gst_flushbits_i386;
gb->backbits = _gst_getbits_back_i386; gb->backbits = _gst_getbits_back_i386;
// printf("gstgetbits: using i386 optimized versions\n"); /* printf("gstgetbits: using i386 optimized versions\n"); */
#else #else
gb->get1bit = _gst_get1bit_int; gb->get1bit = _gst_get1bit_int;
gb->getbits = _gst_getbits_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->showbits = _gst_showbits_int;
gb->flushbits = _gst_flushbits_int; gb->flushbits = _gst_flushbits_int;
gb->backbits = _gst_getbits_back_int; gb->backbits = _gst_getbits_back_int;
// printf("gstgetbits: using normal versions\n"); /* printf("gstgetbits: using normal versions\n"); */
#endif #endif
} }
} }
@ -208,6 +208,6 @@ void gst_getbits_newbuf(gst_getbits_t *gb,unsigned char *buffer, unsigned long l
gb->endptr = buffer+len; gb->endptr = buffer+len;
gb->bits = 0; gb->bits = 0;
#ifdef HAVE_LIBMMX #ifdef HAVE_LIBMMX
// gb->qword = 0; /* gb->qword = 0; */
#endif /* HAVE_LIBMMX */ #endif /* HAVE_LIBMMX */
} }

View file

@ -3,7 +3,7 @@
#include <stdio.h> #include <stdio.h>
// getbits is critical, we need to forcibly disable DEBUG /* getbits is critical, we need to forcibly disable DEBUG */
#define GST_DEBUG_FORCE_DISABLE #define GST_DEBUG_FORCE_DISABLE
#include <gst/gst.h> #include <gst/gst.h>

View file

@ -13,7 +13,7 @@ unsigned long _gst_getbits_int_cb(gst_getbits_t *gb, unsigned long bits) {
int result; int result;
int bitsleft; 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; if (!bits) return 0;

View file

@ -54,8 +54,8 @@
#include <glib.h> #include <glib.h>
//#define GETBITS_DEBUG_ENABLED /*#define GETBITS_DEBUG_ENABLED */
//#define GETBITS_OVERRUN_ENABLED /*#define GETBITS_OVERRUN_ENABLED */
#ifdef GETBITS_DEBUG_ENABLED #ifdef GETBITS_DEBUG_ENABLED
#define debug2(format,args...) g_print(format,##args) #define debug2(format,args...) g_print(format,##args)

View file

@ -63,7 +63,7 @@ void gst_putbits(gst_putbits_t *pb, int val, int n)
int i; int i;
unsigned int mask; 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 */ mask = 1 << (n-1); /* selects first (leftmost) bit */
for (i=0; i<n; i++) for (i=0; i<n; i++)

View file

@ -19,7 +19,7 @@ libgstelements_la_SOURCES = \
gststatistics.c \ gststatistics.c \
gstmd5sink.c gstmd5sink.c
libgstelements_la_CFLAGS = $(GST_CFLAGS) libgstelements_la_CFLAGS = $(GST_CFLAGS)
libgstelements_la_LIBADD = $(GST_LIBS) libgstelements_la_LIBADD =
libgstelements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @GST_LT_LDFLAGS@ libgstelements_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) @GST_LT_LDFLAGS@
noinst_HEADERS = \ noinst_HEADERS = \

View file

@ -141,7 +141,7 @@ md5_read_ctx (GstMD5Sink *ctx, gpointer resbuf)
void void
md5_process_bytes (const void *buffer, size_t len, GstMD5Sink *ctx) 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 /* When we already have some bits in our internal buffer concatenate
both inputs first. */ both inputs first. */

View file

@ -312,7 +312,7 @@ restart:
GST_ELEMENT_NAME (queue), queue->level_buffers); GST_ELEMENT_NAME (queue), queue->level_buffers);
break; break;
default: default:
//gst_pad_event_default (pad, GST_EVENT (buf)); /*gst_pad_event_default (pad, GST_EVENT (buf)); */
break; break;
} }
} }
@ -536,8 +536,8 @@ gst_queue_change_state (GstElement *element)
new_state = GST_STATE_PENDING (element); new_state = GST_STATE_PENDING (element);
if (new_state == GST_STATE_PAUSED) { if (new_state == GST_STATE_PAUSED) {
//g_cond_signal (queue->not_full); /*g_cond_signal (queue->not_full); */
//g_cond_signal (queue->not_empty); /*g_cond_signal (queue->not_empty); */
} }
else if (new_state == GST_STATE_READY) { else if (new_state == GST_STATE_READY) {
gst_queue_locked_flush (queue); gst_queue_locked_flush (queue);

View file

@ -53,18 +53,18 @@ _gst_buffer_initialize (void)
{ {
int buffersize = sizeof(GstBuffer); int buffersize = sizeof(GstBuffer);
static const GTypeInfo buffer_info = { static const GTypeInfo buffer_info = {
0, // sizeof(class), 0, /* sizeof(class), */
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
0, // sizeof(object), 0, /* sizeof(object), */
0, 0,
NULL, 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; buffersize = (((buffersize-1) / 32) + 1) * 32;
_gst_buffer_pool = gst_mem_pool_new ("GstBuffer", buffersize, _gst_buffer_pool = gst_mem_pool_new ("GstBuffer", buffersize,
@ -170,29 +170,29 @@ gst_buffer_create_sub (GstBuffer *parent,
buffer->refcount = 1; buffer->refcount = 1;
#endif #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; 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->data = parent->data + offset;
buffer->size = size; buffer->size = size;
buffer->maxsize = parent->size - offset; buffer->maxsize = parent->size - offset;
// deal with bogus/unknown offsets /* deal with bogus/unknown offsets */
if (parent->offset != -1) if (parent->offset != -1)
buffer->offset = parent->offset + offset; buffer->offset = parent->offset + offset;
else else
buffer->offset = -1; 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->timestamp = parent->timestamp;
buffer->maxage = parent->maxage; 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) if (parent->parent != NULL)
parent = parent->parent; parent = parent->parent;
// set parentage and reference the parent /* set parentage and reference the parent */
buffer->parent = parent; buffer->parent = parent;
gst_buffer_ref (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: * gst_buffer_append:
* @buffer: a buffer * @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_INFO (GST_CAT_BUFFER,"appending buffers %p and %p",buffer,append);
GST_BUFFER_LOCK (buffer); 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 if (GST_BUFFER_REFCOUNT (buffer) == 1 && buffer->parent == NULL
&& !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) { && !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE)) {
// save the old size /* save the old size */
size = buffer->size; size = buffer->size;
buffer->size += append->size; buffer->size += append->size;
buffer->data = g_realloc (buffer->data, buffer->size); buffer->data = g_realloc (buffer->data, buffer->size);
memcpy(buffer->data + size, append->data, append->size); memcpy(buffer->data + size, append->data, append->size);
GST_BUFFER_UNLOCK (buffer); GST_BUFFER_UNLOCK (buffer);
} }
// the buffer is used, create a new one /* the buffer is used, create a new one */
else { else {
newbuf = gst_buffer_new (); newbuf = gst_buffer_new ();
newbuf->size = buffer->size+append->size; newbuf->size = buffer->size+append->size;
@ -269,11 +269,11 @@ gst_buffer_destroy (GstBuffer *buffer)
(buffer->parent?"sub":""), (buffer->parent?"sub":""),
buffer); 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) && if (GST_BUFFER_DATA (buffer) &&
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) && !GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_DONTFREE) &&
(buffer->parent == NULL)) { (buffer->parent == NULL)) {
// if there's a free function, use it /* if there's a free function, use it */
if (buffer->free != NULL) { if (buffer->free != NULL) {
(buffer->free)(buffer); (buffer->free)(buffer);
} else { } 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) if (buffer->parent != NULL)
gst_buffer_unref (buffer->parent); gst_buffer_unref (buffer->parent);
// remove it entirely from memory /* remove it entirely from memory */
gst_mem_pool_free (_gst_buffer_pool,buffer); 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); 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) { if (buffer->copy != NULL) {
newbuf = (buffer->copy)(buffer); newbuf = (buffer->copy)(buffer);
} else { } else {
// allocate a new buffer /* allocate a new buffer */
newbuf = gst_buffer_new(); newbuf = gst_buffer_new();
// copy the absolute size /* copy the absolute size */
newbuf->size = buffer->size; newbuf->size = buffer->size;
// allocate space for the copy /* allocate space for the copy */
newbuf->data = (guchar *)g_malloc (buffer->size); newbuf->data = (guchar *)g_malloc (buffer->size);
// copy the data straight across /* copy the data straight across */
memcpy(newbuf->data,buffer->data,buffer->size); 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->maxsize = newbuf->size;
} }
newbuf->offset = buffer->offset; newbuf->offset = buffer->offset;
newbuf->timestamp = buffer->timestamp; newbuf->timestamp = buffer->timestamp;
newbuf->maxage = buffer->maxage; 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->parent = NULL;
newbuf->pool = 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 * 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 * GstBuffer *
gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len) 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(buf1) > 0, NULL);
g_return_val_if_fail (GST_BUFFER_REFCOUNT(buf2) > 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) { if (buf1->data > buf2->data) {
GstBuffer *tmp = buf1; GstBuffer *tmp = buf1;
g_print ("swapping buffers\n"); g_print ("swapping buffers\n");
@ -442,23 +442,23 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len)
buf2 = tmp; 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)) { 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); newbuf = gst_buffer_create_sub (buf1->parent, buf1->data - (buf1->parent->data) + offset, len);
} }
else { else {
g_print ("slow path taken in buffer_span\n"); 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 (); newbuf = gst_buffer_new ();
// put in new size /* put in new size */
newbuf->size = len; newbuf->size = len;
// allocate space for the copy /* allocate space for the copy */
newbuf->data = (guchar *)g_malloc(len); 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); 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)); memcpy(newbuf->data + (buf1->size - offset), buf2->data, len - (buf1->size - offset));
if (newbuf->offset != -1) if (newbuf->offset != -1)
@ -490,6 +490,6 @@ gst_buffer_span (GstBuffer *buf1, guint32 offset, GstBuffer *buf2, guint32 len)
GstBuffer * GstBuffer *
gst_buffer_merge (GstBuffer *buf1, GstBuffer *buf2) 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); return gst_buffer_span (buf1, 0, buf2, buf1->size + buf2->size);
} }

View file

@ -24,16 +24,16 @@
#ifndef __GST_BUFFER_H__ #ifndef __GST_BUFFER_H__
#define __GST_BUFFER_H__ #define __GST_BUFFER_H__
// /* */
// Define this to add file:line info to each GstBuffer showing /* Define this to add file:line info to each GstBuffer showing */
// the location in the source code where the buffer was created. /* the location in the source code where the buffer was created. */
// /* */
// #define GST_BUFFER_WHERE /* #define GST_BUFFER_WHERE */
// /* */
// Then in gdb, you can `call gst_buffer_print_live()' to get a list /* 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 /* of allocated GstBuffers and also the file:line where they were */
// allocated. /* allocated. */
// /* */
#include <gst/gstdata.h> #include <gst/gstdata.h>
@ -133,8 +133,8 @@ struct _GstBuffer {
gpointer pool_private; gpointer pool_private;
/* utility function pointers */ /* utility function pointers */
GstBufferFreeFunc free; // free the data associated with the buffer GstBufferFreeFunc free; /* free the data associated with the buffer */
GstBufferCopyFunc copy; // copy the data from one buffer to another GstBufferCopyFunc copy; /* copy the data from one buffer to another */
}; };
/* initialisation */ /* initialisation */

View file

@ -145,7 +145,7 @@ again:
#endif #endif
if (!pool) { if (!pool) {
//g_print ("extending\n"); /*g_print ("extending\n"); */
if (populate (mem_pool)) if (populate (mem_pool))
goto again; goto again;
else else

View file

@ -203,7 +203,7 @@ int main(int argc,char *argv[]) {
} }
g_return_val_if_fail(pipeline != NULL, -1); 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); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);

View file

@ -123,7 +123,7 @@ again:
:"ecx", "ebx"); :"ecx", "ebx");
if (!chunk) { if (!chunk) {
//g_print ("extending\n"); /*g_print ("extending\n"); */
if (populate (mem_chunk)) if (populate (mem_chunk))
goto again; goto again;
else else

View file

@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); 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_element_disconnect (cache, "src", typefind, "sink");
gst_bin_remove (GST_BIN (autobin), typefind); gst_bin_remove (GST_BIN (autobin), typefind);

View file

@ -47,7 +47,7 @@ void cut_start (GstElement *element)
struct tm *ct; struct tm *ct;
time (&seconds); time (&seconds);
ct = localtime (&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", 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_year + 1900, ct->tm_mon, ct->tm_mday,
ct->tm_hour, ct->tm_min, ct->tm_sec); 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 main (int argc, char *argv[])
{ {
//int i, j; /*int i, j; */
//gboolean done; /*gboolean done; */
//char buffer[20]; /*char buffer[20]; */
//output_channel_t *channel_out; /*output_channel_t *channel_out; */
GstElement *audiosrc; GstElement *audiosrc;
@ -183,9 +183,9 @@ int main (int argc, char *argv[])
*/ */
while (playing) while (playing)
{ {
// g_print ("> "); /* g_print ("> "); */
gst_bin_iterate (GST_BIN (main_bin)); gst_bin_iterate (GST_BIN (main_bin));
// g_print (" <"); /* g_print (" <"); */
if (cut_start_signalled) if (cut_start_signalled)
{ {
g_print ("\nDEBUG: main: cut_start_signalled true !\n"); g_print ("\nDEBUG: main: cut_start_signalled true !\n");

View file

@ -7,7 +7,7 @@ main (int argc, char *argv[])
GstElement *src, *sink; GstElement *src, *sink;
GstPad *srcpad, *sinkpad; GstPad *srcpad, *sinkpad;
// _gst_plugin_spew = TRUE; /* _gst_plugin_spew = TRUE; */
gst_init (&argc, &argv); gst_init (&argc, &argv);
bin = GST_BIN (gst_pipeline_new ("pipeline")); bin = GST_BIN (gst_pipeline_new ("pipeline"));

View file

@ -18,7 +18,7 @@ gst_play_have_type (GstElement *typefind, GstCaps *caps, GstElement *pipeline)
autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin"); autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
cache = gst_bin_get_by_name (GST_BIN (autobin), "cache"); 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_element_disconnect (cache, "src", typefind, "sink");
gst_bin_remove (GST_BIN (autobin), typefind); gst_bin_remove (GST_BIN (autobin), typefind);

View file

@ -18,10 +18,10 @@
#include "mixer.h" #include "mixer.h"
#include <unistd.h> #include <unistd.h>
//#define WITH_BUG /*#define WITH_BUG */
//#define WITH_BUG2 /*#define WITH_BUG2 */
//#define DEBUG /*#define DEBUG */
//#define AUTOPLUG /* define if you want autoplugging of input channels */ /*#define AUTOPLUG * define if you want autoplugging of input channels * */
/* function prototypes */ /* function prototypes */
input_channel_t* create_input_channel (int id, char* location); input_channel_t* create_input_channel (int id, char* location);
@ -37,7 +37,7 @@ void eos(GstElement *element)
{ {
g_print("have eos, quitting ?\n"); g_print("have eos, quitting ?\n");
// playing = FALSE; /* playing = FALSE; */
} }
static GstCaps* static GstCaps*
@ -62,7 +62,7 @@ gst_play_typefind (GstBin *bin, GstElement *element)
gst_element_set_state (pipeline, GST_STATE_PLAYING); 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_bin_iterate (GST_BIN (pipeline));
gst_element_set_state (pipeline, GST_STATE_NULL); gst_element_set_state (pipeline, GST_STATE_NULL);
@ -188,17 +188,17 @@ int main(int argc,char *argv[])
/* start playing */ /* start playing */
gst_element_set_state(main_bin, GST_STATE_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)); gst_scheduler_show(GST_ELEMENT_SCHED(main_bin));
playing = TRUE; playing = TRUE;
j = 0; j = 0;
//printf ("main: start iterating from 0"); /*printf ("main: start iterating from 0"); */
while (playing && j < 100) while (playing && j < 100)
{ {
// printf ("main: iterating %d\n", j); /* printf ("main: iterating %d\n", j); */
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
//fprintf(stderr,"after iterate()\n"); /*fprintf(stderr,"after iterate()\n"); */
++j; ++j;
} }
} }
@ -206,7 +206,7 @@ int main(int argc,char *argv[])
while (playing) while (playing)
{ {
gst_bin_iterate(GST_BIN(main_bin)); gst_bin_iterate(GST_BIN(main_bin));
//fprintf(stderr,"after iterate()\n"); /*fprintf(stderr,"after iterate()\n"); */
} }
/* stop the bin */ /* stop the bin */
gst_element_set_state(main_bin, GST_STATE_NULL); gst_element_set_state(main_bin, GST_STATE_NULL);

View file

@ -2,6 +2,6 @@ noinst_LTLIBRARIES = libexample.la
libexample_la_SOURCES = example.c libexample_la_SOURCES = example.c
libexample_la_CFLAGS = $(GST_CFLAGS) libexample_la_CFLAGS = $(GST_CFLAGS)
libexample_la_LIBADD = $(GST_LIBS) libexample_la_LIBADD =
noinst_HEADERS = example.h noinst_HEADERS = example.h

View file

@ -161,7 +161,7 @@ gst_example_class_init (GstExampleClass *klass)
*/ */
g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE, g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_ACTIVE,
g_param_spec_int("active","active","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 /* 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 * called asdf. The signal will also pass a pointer to the listeners

View file

@ -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)); gst_bin_add(GST_BIN(thread), GST_ELEMENT(pipeline));
/* make it ready */ /* make it ready */

View file

@ -36,8 +36,8 @@ int main(int argc,char *argv[])
xml = gst_xml_new (); xml = gst_xml_new ();
// g_signal_connect (G_OBJECT (xml), "object_loaded", /* g_signal_connect (G_OBJECT (xml), "object_loaded", */
// G_CALLBACK (xml_loaded), xml); /* G_CALLBACK (xml_loaded), xml); */
if (argc == 2) if (argc == 2)
ret = gst_xml_parse_file(xml, argv[1], NULL); ret = gst_xml_parse_file(xml, argv[1], NULL);

View file

@ -102,7 +102,7 @@ static void gst_bstest_loop (GstElement * element);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
// static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; /* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_bstest_get_type (void) gst_bstest_get_type (void)
@ -387,7 +387,7 @@ plugin_init (GModule * module, GstPlugin * plugin)
{ {
GstElementFactory *factory; GstElementFactory *factory;
// we need gstbytestream /* we need gstbytestream */
if (!gst_library_load ("gstbytestream")) { if (!gst_library_load ("gstbytestream")) {
g_print ("can't load bytestream\n"); g_print ("can't load bytestream\n");
return FALSE; return FALSE;

View file

@ -22,34 +22,34 @@ int main (int argc, char *argv[])
pipe1 = gst_pipeline_new("pipe1"); pipe1 = gst_pipeline_new("pipe1");
pipe2 = gst_pipeline_new("pipe2"); 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), fakesrc);
gst_bin_add (GST_BIN(pipe1), fakesink1); gst_bin_add (GST_BIN(pipe1), fakesink1);
gst_element_connect(fakesrc, "src", fakesink1, "sink"); gst_element_connect(fakesrc, "src", fakesink1, "sink");
// initialize cothreads /* initialize cothreads */
gst_element_set_state(pipe1, GST_STATE_PLAYING); gst_element_set_state(pipe1, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipe1)); gst_bin_iterate (GST_BIN (pipe1));
gst_element_set_state(pipe1, GST_STATE_READY); 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_element_disconnect(fakesrc, "src", fakesink1, "sink");
gst_object_ref(GST_OBJECT(fakesrc)); gst_object_ref(GST_OBJECT(fakesrc));
gst_bin_remove(GST_BIN(pipe1), fakesrc); gst_bin_remove(GST_BIN(pipe1), fakesrc);
gst_bin_remove(GST_BIN(pipe1), fakesink1); gst_bin_remove(GST_BIN(pipe1), fakesink1);
gst_object_unref(GST_OBJECT(pipe1)); gst_object_unref(GST_OBJECT(pipe1));
// make a new pipeline /* make a new pipeline */
gst_bin_add (GST_BIN(pipe2), fakesink2); 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_bin_add (GST_BIN(pipe2), fakesrc);
gst_element_connect(fakesrc, "src", fakesink2, "sink"); gst_element_connect(fakesrc, "src", fakesink2, "sink");
// show the pipeline state /* show the pipeline state */
gst_xml_write_file (GST_ELEMENT (pipe2), stdout); 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_element_set_state(pipe2, GST_STATE_PLAYING);
gst_bin_iterate(GST_BIN(pipe2)); gst_bin_iterate(GST_BIN(pipe2));
gst_element_set_state(pipe2, GST_STATE_NULL); gst_element_set_state(pipe2, GST_STATE_NULL);

View file

@ -75,7 +75,7 @@ int main(int argc,char *argv[])
incount = 0; incount = 0;
outcount = 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); gst_element_set_state(bin, GST_STATE_PLAYING);
if (GST_IS_THREAD (bin)) { if (GST_IS_THREAD (bin)) {

View file

@ -102,7 +102,7 @@ static void gst_bstest_loop (GstElement * element);
static GstElementClass *parent_class = NULL; static GstElementClass *parent_class = NULL;
// static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; /* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */
GType GType
gst_bstest_get_type (void) gst_bstest_get_type (void)
@ -387,7 +387,7 @@ plugin_init (GModule * module, GstPlugin * plugin)
{ {
GstElementFactory *factory; GstElementFactory *factory;
// we need gstbytestream /* we need gstbytestream */
if (!gst_library_load ("gstbytestream")) { if (!gst_library_load ("gstbytestream")) {
g_print ("can't load bytestream\n"); g_print ("can't load bytestream\n");
return FALSE; return FALSE;