fixes to make distcheck work changed registry out of date to warning to allow tests...
[platform/upstream/gstreamer.git] / testsuite / cleanup / cleanup4.c
1 #include <gst/gst.h>
2
3 static GstElement *
4 create_pipeline (void)
5 {
6 }
7
8 gint
9 main (gint argc, gchar *argv[])
10 {
11   GstElement *pipeline;
12   GstElement *fakesrc;
13   gint i;
14
15   free (malloc(8)); /* -lefence */
16
17   gst_init (&argc, &argv);
18
19   i = 10000;
20
21   pipeline = gst_pipeline_new ("main_pipeline");
22
23   fakesrc = gst_elementfactory_make ("fakesrc", "fakesrc");
24   g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
25   gst_bin_add (GST_BIN (pipeline), fakesrc);
26
27   g_mem_chunk_info ();
28   while (i--) {
29     GstElement *bin;
30     GstElement *fakesink;
31
32     fprintf (stderr, "+");
33
34     bin = gst_bin_new ("bin");
35
36     fakesink = gst_elementfactory_make ("fakesink", "fakesink");
37
38     gst_element_connect (fakesrc, "src", fakesink, "sink");
39
40     gst_bin_add (GST_BIN (bin), fakesink);
41     gst_bin_add (GST_BIN (pipeline), bin);
42           
43     gst_element_set_state (pipeline, GST_STATE_PLAYING);
44
45     while (gst_bin_iterate (GST_BIN (pipeline)));
46
47     gst_element_set_state (pipeline, GST_STATE_NULL);
48
49     fprintf (stderr, "-");
50     gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
51
52   }
53   fprintf (stderr, "\n");
54   g_mem_chunk_info ();
55
56   return 0;
57 }