5ec03b5a901f8990ef1cfd7ead92cb8e793c7802
[platform/upstream/gstreamer.git] / tests / old / testsuite / cleanup / cleanup5.c
1 #include <gst/gst.h>
2
3 int
4 main (int argc, char *argv[])
5 {
6   GstElement *bin, *element;
7   gint i = 1000;
8   gint step = 100;
9
10
11   free (malloc (8));            /* -lefence */
12
13   gst_init (&argc, &argv);
14
15   g_mem_chunk_info ();
16
17   bin = gst_pipeline_new ("pipeline");
18
19   while (i--) {
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 }