X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fthreadstate%2Fthreadstate4.c;h=f96f90ba15dc74abc17822e81c5d24b4b720fffc;hb=a967370df58163d7f5219a285a8331b3f79930a3;hp=6776e49a65a0d248d06d479b291ae2b822760280;hpb=b8edc59edb7c71b3edcc9d51bf6f6d145e60df91;p=platform%2Fupstream%2Fgstreamer.git diff --git a/tests/threadstate/threadstate4.c b/tests/threadstate/threadstate4.c index 6776e49..f96f90b 100644 --- a/tests/threadstate/threadstate4.c +++ b/tests/threadstate/threadstate4.c @@ -5,46 +5,48 @@ * { { fakesrc } ! queue ! fakesink } */ -int main(int argc,char *argv[]) +int +main (int argc, char *argv[]) { GstElement *fakesrc, *fakesink; GstElement *thread, *thread2; GstElement *queue; gint x; - gst_init(&argc,&argv); + gst_init (&argc, &argv); - thread = gst_thread_new("thread"); - g_assert(thread != NULL); + thread = gst_thread_new ("thread"); + g_assert (thread != NULL); - thread2 = gst_thread_new("thread"); - g_assert(thread2 != NULL); + thread2 = gst_thread_new ("thread"); + g_assert (thread2 != NULL); - queue = gst_element_factory_make("queue", "the_queue"); - g_assert(queue != NULL); + queue = gst_element_factory_make ("queue", "the_queue"); + g_assert (queue != NULL); - fakesrc = gst_element_factory_make("fakesrc", "fake_source"); - g_assert(fakesrc != NULL); + fakesrc = gst_element_factory_make ("fakesrc", "fake_source"); + g_assert (fakesrc != NULL); - fakesink = gst_element_factory_make("fakesink", "fake_sink"); - g_assert(fakesink != NULL); + fakesink = gst_element_factory_make ("fakesink", "fake_sink"); + g_assert (fakesink != NULL); - gst_bin_add_many (GST_BIN(thread), thread2, queue, fakesink, NULL); + gst_bin_add_many (GST_BIN (thread), thread2, queue, fakesink, NULL); - gst_bin_add(GST_BIN(thread2), fakesrc); - gst_element_add_ghost_pad (thread2, gst_element_get_pad (fakesrc, "src"), "src"); + gst_bin_add (GST_BIN (thread2), fakesrc); + gst_element_add_ghost_pad (thread2, gst_element_get_pad (fakesrc, "src"), + "src"); gst_element_link_many (thread2, queue, fakesink, NULL); - for (x = 0 ; x < 10 ; x++){ - g_print("playing %d\n", x); - gst_element_set_state(thread, GST_STATE_PLAYING); + for (x = 0; x < 10; x++) { + g_print ("playing %d\n", x); + gst_element_set_state (thread, GST_STATE_PLAYING); g_usleep (G_USEC_PER_SEC); - g_print("nulling %d\n", x); - gst_element_set_state(thread, GST_STATE_NULL); + g_print ("nulling %d\n", x); + gst_element_set_state (thread, GST_STATE_NULL); g_usleep (G_USEC_PER_SEC); } - exit(0); + exit (0); }