diff options
author | Erik Walthinsen <omega@temple-baptist.org> | 2001-03-12 02:30:12 +0000 |
---|---|---|
committer | Erik Walthinsen <omega@temple-baptist.org> | 2001-03-12 02:30:12 +0000 |
commit | 6e1c3705d64579e12cbe6032f7c7c17ea498feab (patch) | |
tree | ef23962d8f9f58b42205efab2c4c5ab990835754 /tests | |
parent | 8c5bad49568f0c9ee7ec5c4f90596a34026e880e (diff) |
added thread REAPING test
Original commit message from CVS:
added thread REAPING test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/reaping.c | 35 |
2 files changed, 37 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 342601f604..cf498e05cf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,8 @@ SUBDIRS = sched eos noinst_PROGRAMS = init loadall simplefake states caps queue registry \ -paranoia rip mp3encode autoplug props case4 markup load tee incsched +paranoia rip mp3encode autoplug props case4 markup load tee incsched \ +reaping # we have nothing but apps here, we can do this safely LIBS += $(GST_LIBS) diff --git a/tests/reaping.c b/tests/reaping.c new file mode 100644 index 0000000000..3714e54dc2 --- /dev/null +++ b/tests/reaping.c @@ -0,0 +1,35 @@ +#include <stdio.h> +#include <gst/gst.h> + +int main(int argc,char *argv[]) { + GstBin *pipeline, *thread; + GstElement *src, *queue1, *sink; + + gst_init(&argc,&argv); + gst_info_set_categories(-1); + gst_debug_set_categories(-1); + + pipeline = gst_pipeline_new("pipeline"); + thread = gst_thread_new("thread"); + src = gst_elementfactory_make("fakesrc","src"); + queue1 = gst_elementfactory_make("queue","queue"); + sink = gst_elementfactory_make("fakesink","sink"); + + gst_bin_add(pipeline,src); + gst_bin_add(pipeline,queue1); + gst_bin_add(pipeline,GST_ELEMENT(thread)); + gst_bin_add(thread,sink); + + gst_element_add_ghost_pad(GST_ELEMENT(thread),gst_element_get_pad(sink,"sink"),"sink"); + + gst_element_connect (src,"src",queue1,"sink"); + gst_element_connect (queue1, "src", thread, "sink"); + + + fprintf(stderr,"\n\n\n"); + gst_element_set_state (pipeline, GST_STATE_READY); + + + fprintf(stderr,"\n\n\n"); + gst_element_set_state (pipeline, GST_STATE_NULL); +} |