don't mix tabs and spaces
[platform/upstream/gstreamer.git] / tests / old / testsuite / cleanup / cleanup5.c
index 482a21b..5ec03b5 100644 (file)
@@ -1,11 +1,14 @@
 #include <gst/gst.h>
 
-int main(int argc,char *argv[]) 
+int
+main (int argc, char *argv[])
 {
   GstElement *bin, *element;
-  gint i=1000000;
+  gint i = 1000;
+  gint step = 100;
 
-  free (malloc(8)); /* -lefence */
+
+  free (malloc (8));            /* -lefence */
 
   gst_init (&argc, &argv);
 
@@ -13,17 +16,17 @@ int main(int argc,char *argv[])
 
   bin = gst_pipeline_new ("pipeline");
 
-  while (i--)
-  {
+  while (i--) {
     GstPad *pad;
 
-    fprintf (stderr, "+");
+    if (i % step == 0)
+      fprintf (stderr, "\r%10d", i);
 
     element = gst_element_factory_make ("tee", "tee");
-    if (!element) 
+    if (!element)
       break;
 
-    pad = gst_element_request_pad_by_name (element, "src%d");
+    pad = gst_element_get_request_pad (element, "src%d");
 
     gst_bin_add (GST_BIN (bin), element);
     gst_bin_remove (GST_BIN (bin), element);
@@ -34,4 +37,5 @@ int main(int argc,char *argv[])
   gst_object_unref (GST_OBJECT (bin));
 
   g_mem_chunk_info ();
+  return 0;
 }