5 * { fakesrc ! fakesink }
9 int main(int argc,char *argv[])
11 GstElement *fakesrc, *fakesink;
15 gst_init(&argc,&argv);
17 thread = gst_thread_new("thread");
18 g_assert(thread != NULL);
20 fakesrc = gst_element_factory_make("fakesrc", "fake_source");
21 g_assert(fakesrc != NULL);
23 fakesink = gst_element_factory_make("fakesink", "fake_sink");
24 g_assert(fakesink != NULL);
26 gst_bin_add_many (GST_BIN(thread), fakesrc, fakesink, NULL);
27 gst_element_link (fakesrc, fakesink);
29 for (x = 0 ; x < 10 ; x++){
30 g_print("playing %d\n", x);
31 gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
32 g_usleep (G_USEC_PER_SEC);
34 g_print("pausing %d\n", x);
35 gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PAUSED);
36 g_usleep (G_USEC_PER_SEC);