Enlightenment CVS committal Author : englebass Project : e17 Module : libs/emotion
Dir : e17/libs/emotion/src/modules/gstreamer Modified Files: emotion_gstreamer_pipeline_file.c Log Message: formatting =================================================================== RCS file: /cvs/e/e17/libs/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- emotion_gstreamer_pipeline_file.c 6 Jul 2008 09:32:08 -0000 1.2 +++ emotion_gstreamer_pipeline_file.c 6 Jul 2008 10:03:40 -0000 1.3 @@ -5,7 +5,7 @@ #include "emotion_gstreamer_pipeline.h" int -emotion_pipeline_file_build (void *video, const char *file) +emotion_pipeline_file_build(void *video, const char *file) { GstElement *filesrc; GstElement *decodebin; @@ -14,50 +14,51 @@ ev = (Emotion_Gstreamer_Video *)video; if (!ev) return 0; - filesrc = gst_element_factory_make ("filesrc", "src"); + filesrc = gst_element_factory_make("filesrc", "src"); if (!filesrc) goto failure_filesrc; - g_object_set (G_OBJECT (filesrc), "location", file, NULL); + g_object_set(G_OBJECT(filesrc), "location", file, NULL); - decodebin = gst_element_factory_make ("decodebin", "decodebin"); + decodebin = gst_element_factory_make("decodebin", "decodebin"); if (!decodebin) goto failure_decodebin; - g_signal_connect (decodebin, "new-decoded-pad", - G_CALLBACK (file_new_decoded_pad_cb), ev); + g_signal_connect(decodebin, "new-decoded-pad", + G_CALLBACK(file_new_decoded_pad_cb), ev); - gst_bin_add_many (GST_BIN (ev->pipeline), filesrc, decodebin, NULL); - if (!gst_element_link (filesrc, decodebin)) + gst_bin_add_many(GST_BIN(ev->pipeline), filesrc, decodebin, NULL); + if (!gst_element_link(filesrc, decodebin)) goto failure_link; - if (!emotion_pipeline_pause (ev->pipeline)) + if (!emotion_pipeline_pause(ev->pipeline)) goto failure_gstreamer_pause; - emotion_streams_sinks_get (ev, decodebin); + emotion_streams_sinks_get(ev, decodebin); /* The first vsink is a valid Emotion_Video_Sink * */ /* If no video stream is found, it's a visualisation sink */ - { - Emotion_Video_Sink *vsink; + { + Emotion_Video_Sink *vsink; - vsink = (Emotion_Video_Sink *)ecore_list_first_goto (ev->video_sinks); - if (vsink && vsink->sink) { - g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL); - g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL); - g_signal_connect (G_OBJECT (vsink->sink), - "handoff", - G_CALLBACK (cb_handoff), ev); - } - } + vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); + if (vsink && vsink->sink) + { + g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL); + g_object_set(G_OBJECT(vsink->sink), "signal-handoffs", TRUE, NULL); + g_signal_connect(G_OBJECT(vsink->sink), + "handoff", + G_CALLBACK(cb_handoff), ev); + } + } return 1; - failure_gstreamer_pause: - failure_link: - gst_element_set_state (ev->pipeline, GST_STATE_NULL); - gst_bin_remove (GST_BIN (ev->pipeline), decodebin); - failure_decodebin: - gst_bin_remove (GST_BIN (ev->pipeline), filesrc); - failure_filesrc: +failure_gstreamer_pause: +failure_link: + gst_element_set_state(ev->pipeline, GST_STATE_NULL); + gst_bin_remove(GST_BIN(ev->pipeline), decodebin); +failure_decodebin: + gst_bin_remove(GST_BIN(ev->pipeline), filesrc); +failure_filesrc: return 0; } ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs