From: Wim Taymans Date: Sun, 27 Jan 2002 19:29:57 +0000 (+0000) Subject: Use a core element (tee) for this testcase X-Git-Tag: RELEASE-0_3_2-DOBDAY~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=132f776069ed117b8d50ed70a50a6418536e362c;p=platform%2Fupstream%2Fgstreamer.git Use a core element (tee) for this testcase Original commit message from CVS: Use a core element (tee) for this testcase --- diff --git a/tests/old/testsuite/cleanup/cleanup5.c b/tests/old/testsuite/cleanup/cleanup5.c index 8d9078b..95e173b 100644 --- a/tests/old/testsuite/cleanup/cleanup5.c +++ b/tests/old/testsuite/cleanup/cleanup5.c @@ -2,19 +2,22 @@ int main(int argc,char *argv[]) { - GstElement *bin, *decoder; + GstElement *bin, *element; + gint i=10000; - gst_init(&argc,&argv); + gst_init (&argc, &argv); - bin = gst_pipeline_new("pipeline"); + bin = gst_pipeline_new ("pipeline"); - while (TRUE) + while (i--) { - decoder = gst_elementfactory_make("mpeg2dec","mpeg2dec"); - if (!decoder) + element = gst_elementfactory_make ("tee", "tee"); + if (!element) break; - gst_bin_add(GST_BIN(bin), decoder); - gst_bin_remove(GST_BIN(bin), decoder); + gst_element_request_pad_by_name (element, "src%d"); + + gst_bin_add (GST_BIN (bin), element); + gst_bin_remove (GST_BIN (bin), element); } } diff --git a/testsuite/cleanup/cleanup5.c b/testsuite/cleanup/cleanup5.c index 8d9078b..95e173b 100644 --- a/testsuite/cleanup/cleanup5.c +++ b/testsuite/cleanup/cleanup5.c @@ -2,19 +2,22 @@ int main(int argc,char *argv[]) { - GstElement *bin, *decoder; + GstElement *bin, *element; + gint i=10000; - gst_init(&argc,&argv); + gst_init (&argc, &argv); - bin = gst_pipeline_new("pipeline"); + bin = gst_pipeline_new ("pipeline"); - while (TRUE) + while (i--) { - decoder = gst_elementfactory_make("mpeg2dec","mpeg2dec"); - if (!decoder) + element = gst_elementfactory_make ("tee", "tee"); + if (!element) break; - gst_bin_add(GST_BIN(bin), decoder); - gst_bin_remove(GST_BIN(bin), decoder); + gst_element_request_pad_by_name (element, "src%d"); + + gst_bin_add (GST_BIN (bin), element); + gst_bin_remove (GST_BIN (bin), element); } }