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"), "sink");
21 gst_element_link (fakesrc, thread);
23 gst_bin_add (GST_BIN (pipeline), fakesrc);
24 gst_bin_add (GST_BIN (pipeline), thread);
26 g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
32 main (gint argc, gchar *argv[])
38 free (malloc(8)); /* -lefence */
40 gst_init (&argc, &argv);
46 fprintf (stderr, "%10d\r", i);
47 pipeline = create_pipeline ();
49 gst_element_set_state (pipeline, GST_STATE_PLAYING);
51 while (gst_bin_iterate (GST_BIN (pipeline)));
53 gst_element_set_state (pipeline, GST_STATE_NULL);
55 gst_element_set_state (pipeline, GST_STATE_PLAYING);
57 while (gst_bin_iterate (GST_BIN (pipeline)));
59 gst_element_set_state (pipeline, GST_STATE_NULL);
61 gst_object_unref (GST_OBJECT (pipeline));
63 fprintf (stderr, "\n");