mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
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:
parent
6ae5f15064
commit
0067d17205
53 changed files with 265 additions and 339 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#include "mixer.h"
|
||||
#include <unistd.h>
|
||||
|
||||
//#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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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);
|
||||
*/
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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@
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;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);
|
||||
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;i<identity->count;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;
|
||||
|
|
|
@ -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; */
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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; */
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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)){
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#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
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
//#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)
|
||||
|
|
|
@ -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; i<n; i++)
|
||||
|
|
|
@ -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 = \
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 <gst/gstdata.h>
|
||||
|
||||
|
@ -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 */
|
||||
|
|
|
@ -145,7 +145,7 @@ again:
|
|||
#endif
|
||||
|
||||
if (!pool) {
|
||||
//g_print ("extending\n");
|
||||
/*g_print ("extending\n"); */
|
||||
if (populate (mem_pool))
|
||||
goto again;
|
||||
else
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ again:
|
|||
:"ecx", "ebx");
|
||||
|
||||
if (!chunk) {
|
||||
//g_print ("extending\n");
|
||||
/*g_print ("extending\n"); */
|
||||
if (populate (mem_chunk))
|
||||
goto again;
|
||||
else
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#include "mixer.h"
|
||||
#include <unistd.h>
|
||||
|
||||
//#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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue