From 132f776069ed117b8d50ed70a50a6418536e362c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 27 Jan 2002 19:29:57 +0000 Subject: [PATCH] Use a core element (tee) for this testcase Original commit message from CVS: Use a core element (tee) for this testcase --- tests/old/testsuite/cleanup/cleanup5.c | 19 +++++++++++-------- testsuite/cleanup/cleanup5.c | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/tests/old/testsuite/cleanup/cleanup5.c b/tests/old/testsuite/cleanup/cleanup5.c index 8d9078bd76..95e173b30a 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 8d9078bd76..95e173b30a 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); } }