6 GstElement *fakesrc, *fakesink;
8 GstElement *thread, *queue;
10 pipeline = gst_pipeline_new ("main_pipeline");
12 fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
13 thread = gst_thread_new ("thread");
14 fakesink = gst_element_factory_make ("fakesink", "fakesink");
15 queue = gst_element_factory_make ("queue", "queue");
16 gst_bin_add (GST_BIN (thread), fakesink);
17 gst_bin_add (GST_BIN (thread), queue);
18 gst_element_link (queue, fakesink);
19 gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"),
22 gst_element_link (fakesrc, thread);
24 gst_bin_add (GST_BIN (pipeline), fakesrc);
25 gst_bin_add (GST_BIN (pipeline), thread);
27 g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
33 main (gint argc, gchar * argv[])
39 free (malloc (8)); /* -lefence */
41 gst_init (&argc, &argv);
47 fprintf (stderr, "%10d\r", i);
48 pipeline = create_pipeline ();
50 gst_element_set_state (pipeline, GST_STATE_PLAYING);
52 while (gst_bin_iterate (GST_BIN (pipeline)));
54 gst_element_set_state (pipeline, GST_STATE_NULL);
56 gst_element_set_state (pipeline, GST_STATE_PLAYING);
58 while (gst_bin_iterate (GST_BIN (pipeline)));
60 gst_element_set_state (pipeline, GST_STATE_NULL);
62 gst_object_unref (pipeline);
64 fprintf (stderr, "\n");