summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2008-07-06 10:05:47 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2008-07-06 10:05:47 +0000
commit84553cfb4a50abb01719d4a835c3b3f2825ff649 (patch)
tree2dc6412b50de9759403a8f1ce6a50d11a4ecd458 /legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
parentec19c6f7007ba54ecfe922514104ab217d0eae81 (diff)
formatting
SVN revision: 35012
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c57
1 files changed, 29 insertions, 28 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
index d83590f9f3..d6a1c00609 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
@@ -5,7 +5,7 @@
5#include "emotion_gstreamer_pipeline.h" 5#include "emotion_gstreamer_pipeline.h"
6 6
7int 7int
8emotion_pipeline_uri_build (void *video, const char *uri) 8emotion_pipeline_uri_build(void *video, const char *uri)
9{ 9{
10 GstElement *src; 10 GstElement *src;
11 GstElement *decodebin; 11 GstElement *decodebin;
@@ -16,50 +16,51 @@ emotion_pipeline_uri_build (void *video, const char *uri)
16 16
17 if (gst_uri_protocol_is_supported(GST_URI_SRC, uri)) 17 if (gst_uri_protocol_is_supported(GST_URI_SRC, uri))
18 goto failure_src; 18 goto failure_src;
19 src = gst_element_make_from_uri (GST_URI_SRC, uri, "src"); 19 src = gst_element_make_from_uri(GST_URI_SRC, uri, "src");
20 if (!src) 20 if (!src)
21 goto failure_src; 21 goto failure_src;
22 g_object_set (G_OBJECT (src), "location", uri, NULL); 22 g_object_set(G_OBJECT(src), "location", uri, NULL);
23 23
24 decodebin = gst_element_factory_make ("decodebin", "decodebin"); 24 decodebin = gst_element_factory_make("decodebin", "decodebin");
25 if (!decodebin) 25 if (!decodebin)
26 goto failure_decodebin; 26 goto failure_decodebin;
27 g_signal_connect (decodebin, "new-decoded-pad", 27 g_signal_connect(decodebin, "new-decoded-pad",
28 G_CALLBACK (file_new_decoded_pad_cb), ev); 28 G_CALLBACK(file_new_decoded_pad_cb), ev);
29 29
30 gst_bin_add_many (GST_BIN (ev->pipeline), src, decodebin, NULL); 30 gst_bin_add_many(GST_BIN(ev->pipeline), src, decodebin, NULL);
31 if (!gst_element_link (src, decodebin)) 31 if (!gst_element_link(src, decodebin))
32 goto failure_link; 32 goto failure_link;
33 33
34 if (!emotion_pipeline_pause (ev->pipeline)) 34 if (!emotion_pipeline_pause(ev->pipeline))
35 goto failure_gstreamer_pause; 35 goto failure_gstreamer_pause;
36 36
37 emotion_streams_sinks_get (ev, decodebin); 37 emotion_streams_sinks_get(ev, decodebin);
38 38
39 /* The first vsink is a valid Emotion_Video_Sink * */ 39 /* The first vsink is a valid Emotion_Video_Sink * */
40 /* If no video stream is found, it's a visualisation sink */ 40 /* If no video stream is found, it's a visualisation sink */
41 { 41 {
42 Emotion_Video_Sink *vsink; 42 Emotion_Video_Sink *vsink;
43 43
44 vsink = (Emotion_Video_Sink *)ecore_list_first_goto (ev->video_sinks); 44 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks);
45 if (vsink && vsink->sink) { 45 if (vsink && vsink->sink)
46 g_object_set (G_OBJECT (vsink->sink), "sync", TRUE, NULL); 46 {
47 g_object_set (G_OBJECT (vsink->sink), "signal-handoffs", TRUE, NULL); 47 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
48 g_signal_connect (G_OBJECT (vsink->sink), 48 g_object_set(G_OBJECT(vsink->sink), "signal-handoffs", TRUE, NULL);
49 "handoff", 49 g_signal_connect(G_OBJECT(vsink->sink),
50 G_CALLBACK (cb_handoff), ev); 50 "handoff",
51 } 51 G_CALLBACK(cb_handoff), ev);
52 } 52 }
53 }
53 54
54 return 1; 55 return 1;
55 56
56 failure_gstreamer_pause: 57failure_gstreamer_pause:
57 failure_link: 58failure_link:
58 gst_element_set_state (ev->pipeline, GST_STATE_NULL); 59 gst_element_set_state(ev->pipeline, GST_STATE_NULL);
59 gst_bin_remove (GST_BIN (ev->pipeline), decodebin); 60 gst_bin_remove(GST_BIN(ev->pipeline), decodebin);
60 failure_decodebin: 61failure_decodebin:
61 gst_bin_remove (GST_BIN (ev->pipeline), src); 62 gst_bin_remove(GST_BIN(ev->pipeline), src);
62 failure_src: 63failure_src:
63 64
64 return 0; 65 return 0;
65} 66}