fixing up tests
[platform/upstream/gstreamer.git] / tests / old / testsuite / cleanup / cleanup5.c
1 #include <gst/gst.h>
2
3 int main(int argc,char *argv[]) 
4 {
5   GstElement *bin, *element;
6   gint i = 100000;
7   gint step = 100;
8   
9
10   free (malloc(8)); /* -lefence */
11
12   gst_init (&argc, &argv);
13
14   g_mem_chunk_info ();
15
16   bin = gst_pipeline_new ("pipeline");
17
18   while (i--)
19   {
20     GstPad *pad;
21
22     if (i % step == 0)
23       fprintf (stderr, "\r%10d", i);
24
25     element = gst_element_factory_make ("tee", "tee");
26     if (!element) 
27       break;
28
29     pad = gst_element_get_request_pad (element, "src%d");
30
31     gst_bin_add (GST_BIN (bin), element);
32     gst_bin_remove (GST_BIN (bin), element);
33
34   }
35   fprintf (stderr, "+\n");
36
37   gst_object_unref (GST_OBJECT (bin));
38
39   g_mem_chunk_info ();
40   return 0;
41 }