6 GstElement *fakesrc, *fakesink;
10 pipeline = gst_pipeline_new ("main_pipeline");
12 fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
13 bin = gst_bin_new ("bin");
14 fakesink = gst_element_factory_make ("fakesink", "fakesink");
15 gst_bin_add (GST_BIN (bin), fakesink);
16 gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"),
19 gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
21 gst_element_link (fakesrc, bin);
23 g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
29 main (gint argc, gchar * argv[])
35 free (malloc (8)); /* -lefence */
37 gst_init (&argc, &argv);
43 fprintf (stderr, "%10d\r", i);
44 pipeline = create_pipeline ();
46 gst_element_set_state (pipeline, GST_STATE_PLAYING);
48 while (gst_bin_iterate (GST_BIN (pipeline)));
50 gst_element_set_state (pipeline, GST_STATE_NULL);
52 gst_element_set_state (pipeline, GST_STATE_PLAYING);
54 while (gst_bin_iterate (GST_BIN (pipeline)));
56 gst_element_set_state (pipeline, GST_STATE_NULL);
58 gst_object_unref (pipeline);
60 fprintf (stderr, "\n");