From 40f192075c3177a5edf4bb8999540e5b2cf1e15a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 27 Dec 2000 22:39:45 +0000 Subject: [PATCH] Updates for the gst_pad_push changes Original commit message from CVS: Updates for the gst_pad_push changes --- test/Makefile.am | 2 +- test/ac3parse.c | 3 ++- test/avi2mpg.c | 6 +++--- test/aviparse.c | 4 ++-- test/dvdcat.c | 2 +- test/mp1parse.c | 4 ++-- test/mp1tomp1.c | 4 ++-- test/mp2toavi.c | 4 ++-- test/mp2tomp1.c | 4 ++-- test/mp3.c | 2 +- test/mp3parse.c | 2 +- test/mp3play.c | 5 +++-- test/mp3tovorbis.c | 4 ++-- test/mpeg2parse.c | 4 ++-- test/pipetest.c | 4 ++-- test/record.c | 5 +++-- test/spectrum.c | 2 +- test/vidcapture.c | 2 +- test/vidcapture2.c | 2 +- test/videotest.c | 4 ++-- test/wave.c | 4 ++-- test/xml/createreg.c | 2 +- test/xml/readreg.c | 4 ++-- 23 files changed, 41 insertions(+), 38 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index dceff9dc88..36e1cff21f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -4,7 +4,7 @@ noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \ aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \ vidcapture2 mp2toavi mp3tovorbis -SUBDIRS = xml cothreads bindings +SUBDIRS = xml bindings CFLAGS = -Wall $(shell gnome-config --cflags gnomeui) LDFLAGS = $(shell gnome-config --libs gnomeui) diff --git a/test/ac3parse.c b/test/ac3parse.c index f0bd0cbb92..e83b92a760 100644 --- a/test/ac3parse.c +++ b/test/ac3parse.c @@ -48,8 +48,9 @@ int main(int argc,char *argv[]) { g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); g_print("about to enter loop\n"); while (1) - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } diff --git a/test/avi2mpg.c b/test/avi2mpg.c index 37a63d0c42..be4f4d1f69 100644 --- a/test/avi2mpg.c +++ b/test/avi2mpg.c @@ -173,11 +173,11 @@ int main(int argc,char *argv[]) { gst_element_get_pad(fdsink,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); g_print("about to enter loop\n"); - g_idle_add(idle_func,src); + g_idle_add(idle_func,pipeline); gdk_threads_enter(); gtk_main(); @@ -187,6 +187,6 @@ int main(int argc,char *argv[]) { } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } diff --git a/test/aviparse.c b/test/aviparse.c index 9f2d4641f0..2fb8c2499b 100644 --- a/test/aviparse.c +++ b/test/aviparse.c @@ -134,7 +134,7 @@ int main(int argc,char *argv[]) { g_print("about to enter loop\n"); // this does not work due to multithreading - g_idle_add(idle_func,src); + g_idle_add(idle_func,pipeline); gdk_threads_enter(); gtk_main(); @@ -144,6 +144,6 @@ int main(int argc,char *argv[]) { } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } diff --git a/test/dvdcat.c b/test/dvdcat.c index bbc81f3f96..32f0f370ea 100644 --- a/test/dvdcat.c +++ b/test/dvdcat.c @@ -41,5 +41,5 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while (1) - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } diff --git a/test/mp1parse.c b/test/mp1parse.c index 5ffe003d2d..dba55950e2 100644 --- a/test/mp1parse.c +++ b/test/mp1parse.c @@ -170,7 +170,7 @@ int main(int argc,char *argv[]) { g_print("about to enter loop\n"); - g_idle_add(idle_func,src); + g_idle_add(idle_func,pipeline); gdk_threads_enter(); gtk_main(); @@ -180,6 +180,6 @@ int main(int argc,char *argv[]) { } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } diff --git a/test/mp1tomp1.c b/test/mp1tomp1.c index ab20813770..0d63f34a63 100644 --- a/test/mp1tomp1.c +++ b/test/mp1tomp1.c @@ -210,9 +210,9 @@ int main(int argc,char *argv[]) { gst_element_get_pad(parse,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while (1) { - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } } diff --git a/test/mp2toavi.c b/test/mp2toavi.c index cc2d5fc4b5..32b94dee98 100644 --- a/test/mp2toavi.c +++ b/test/mp2toavi.c @@ -283,9 +283,9 @@ int main(int argc,char *argv[]) { gst_element_get_pad(fdsink,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while (1) { - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } } diff --git a/test/mp2tomp1.c b/test/mp2tomp1.c index 1340edb66a..cca6b42a7d 100644 --- a/test/mp2tomp1.c +++ b/test/mp2tomp1.c @@ -270,10 +270,10 @@ int main(int argc,char *argv[]) { gst_element_get_pad(fdsink,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while (1) { - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } return 0; diff --git a/test/mp3.c b/test/mp3.c index 036aeea67e..2b7c696816 100644 --- a/test/mp3.c +++ b/test/mp3.c @@ -57,7 +57,7 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING); while (playing) - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(bin)); return 0; } diff --git a/test/mp3parse.c b/test/mp3parse.c index 03e70474d4..d7dddc50f8 100644 --- a/test/mp3parse.c +++ b/test/mp3parse.c @@ -59,5 +59,5 @@ int main(int argc,char *argv[]) { g_print("about to enter loop\n"); while (1) - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } diff --git a/test/mp3play.c b/test/mp3play.c index e3f71db835..fec0983702 100644 --- a/test/mp3play.c +++ b/test/mp3play.c @@ -58,9 +58,10 @@ int main(int argc,char *argv[]) { g_print("setting to READY state\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); g_print("about to enter loop\n"); while (1) { - gst_src_push(GST_SRC(src)); - } + gst_bin_iterate(GST_BIN(pipeline)); + } } diff --git a/test/mp3tovorbis.c b/test/mp3tovorbis.c index cf8ba5ca1a..2587745998 100644 --- a/test/mp3tovorbis.c +++ b/test/mp3tovorbis.c @@ -68,10 +68,10 @@ int main(int argc,char *argv[]) { gst_element_get_pad(sink,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); g_print("about to enter loop\n"); while (1) { - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } } diff --git a/test/mpeg2parse.c b/test/mpeg2parse.c index 32f4c8ce47..d0fed19751 100644 --- a/test/mpeg2parse.c +++ b/test/mpeg2parse.c @@ -8,7 +8,7 @@ void eof(GstSrc *src) { } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } @@ -220,7 +220,7 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); - gtk_idle_add(idle_func,src); + gtk_idle_add(idle_func,pipeline); gdk_threads_enter(); gtk_main(); diff --git a/test/pipetest.c b/test/pipetest.c index 74f23b63f5..50fd223e8a 100644 --- a/test/pipetest.c +++ b/test/pipetest.c @@ -55,10 +55,10 @@ int main(int argc,char *argv[]) { gst_element_get_pad(sink,"sink")); g_print("setting to READY state\n"); - gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_READY); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); g_print("about to enter loop\n"); while (1) { - gst_src_push(GST_SRC(src)); + gst_bin_iterate(GST_BIN(pipeline)); } } diff --git a/test/record.c b/test/record.c index 9000145d56..50726aaeef 100644 --- a/test/record.c +++ b/test/record.c @@ -37,7 +37,8 @@ int main(int argc,char *argv[]) { g_print("\nok, runnable, hitting 'play'...\n"); gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); - while(1) - gst_src_push(GST_SRC(audiosrc)); + while(1) { + gst_bin_iterate(GST_BIN(pipeline)); + } } diff --git a/test/spectrum.c b/test/spectrum.c index 107b4296c3..767deabf0b 100644 --- a/test/spectrum.c +++ b/test/spectrum.c @@ -77,6 +77,6 @@ void spectrum_chain(GstPad *pad,GstBuffer *buf) { } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + //gst_src_push(GST_SRC(data)); return TRUE; } diff --git a/test/vidcapture.c b/test/vidcapture.c index 90f38b01b8..738588acf4 100644 --- a/test/vidcapture.c +++ b/test/vidcapture.c @@ -76,6 +76,6 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while(1) - gst_src_push(GST_SRC(videosrc)); + gst_bin_iterate(GST_BIN(pipeline)); } diff --git a/test/vidcapture2.c b/test/vidcapture2.c index 8dc947461e..b4a83bf142 100644 --- a/test/vidcapture2.c +++ b/test/vidcapture2.c @@ -77,6 +77,6 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); while(1) - gst_src_push(GST_SRC(videosrc)); + gst_bin_iterate(GST_BIN(pipeline)); } diff --git a/test/videotest.c b/test/videotest.c index 74ba9d3003..2012e3c66b 100644 --- a/test/videotest.c +++ b/test/videotest.c @@ -72,7 +72,7 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING); //gtk_object_set(GTK_OBJECT(src),"tune",133250,NULL); - g_idle_add(idle_func,src); + g_idle_add(idle_func,bin); gtk_main(); } @@ -80,6 +80,6 @@ int main(int argc,char *argv[]) { gboolean idle_func(gpointer data) { static int i=0; //g_print("pushing %d\n",i++); - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } diff --git a/test/wave.c b/test/wave.c index c92dea1502..cacfd03069 100644 --- a/test/wave.c +++ b/test/wave.c @@ -48,12 +48,12 @@ int main(int argc,char *argv[]) { gst_element_set_state(GST_ELEMENT(bin),GST_STATE_READY); gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING); - g_idle_add(idle_func,src); + g_idle_add(idle_func,bin); gtk_main(); } gboolean idle_func(gpointer data) { - gst_src_push(GST_SRC(data)); + gst_bin_iterate(GST_BIN(data)); return TRUE; } diff --git a/test/xml/createreg.c b/test/xml/createreg.c index fc93c76073..7ca35148ee 100644 --- a/test/xml/createreg.c +++ b/test/xml/createreg.c @@ -42,7 +42,7 @@ int main(int argc,char *argv[]) { subtree = xmlNewChild(tree,NULL,"longname", element->details->longname); subtree = xmlNewChild(tree,NULL,"class", - element->details->class); + element->details->klass); subtree = xmlNewChild(tree,NULL,"description", element->details->description); subtree = xmlNewChild(tree,NULL,"version", diff --git a/test/xml/readreg.c b/test/xml/readreg.c index 4a04f136a5..8db054b32e 100644 --- a/test/xml/readreg.c +++ b/test/xml/readreg.c @@ -88,7 +88,7 @@ int main(int argc,char *argv[]) { else if (!strcmp(field->name,"longname")) element->details.longname = getcontents(doc,field); else if (!strcmp(field->name,"class")) - element->details.class = getcontents(doc,field); + element->details.klass = getcontents(doc,field); else if (!strcmp(field->name,"description")) element->details.description = getcontents(doc,field); else if (!strcmp(field->name,"version")) @@ -117,7 +117,7 @@ int main(int argc,char *argv[]) { g_print("Plugin filename: %s\n",element->plugin->filename); g_print("Element name: %s\n",element->name); g_print("Element long name: %s\n",element->details.longname); - g_print("Element class: %s\n",element->details.class); + g_print("Element class: %s\n",element->details.klass); g_print("Element description: %s\n",element->details.description); g_print("Element version: %s\n",element->details.version); g_print("Element author: %s\n",element->details.author);