summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2013-12-23 10:50:53 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-23 10:59:42 +0900
commit9c752106f75c9a6415971cd965eedaf3d15fedc6 (patch)
tree52c05f04936d7832c689f354624eca9468afaf7f /src/examples
parent574c5c1ba78d6a02f62b26e4070ef266b0d4bc8e (diff)
emotion: initial port of emotion to GStreamer 1.0
Some commits to port emotion to GStreamer 1.0 and implement some missing features, clean up code a bit and fix some bugs on the way. This works as good as the 0.10 code for me now with the emotion examples, just the Samsung hardware specific code is commented out. This should be ported by someone who has such hardware, and also in a clean way now that GStreamer since 1.0 has features to handle all this properly. There's still a lot of potential to clean things up and fix many bugs, and also to implement zerocopy rendering. But those are for later if there's actual interest in this at all. Commits: - Update configure checks and ecore example to GStreamer 1.0 - Initial port of emotion to GStreamer 1.0 - Samsung specific code commented out, should be ported by someone with the hardware. - Return GST_FLOW_FLUSHING when the sink is unlocked - Remove unused GSignal from the sink - Use GstVideoInfo to store the format details inside the sink - Add support for pixel-aspect-ratio - Store video format information in GstVideoInfo for the different video streams - Use GstAudioInfo to store the audio format information - Remove some unused defines - Header cleanup - Implement initial support for GstNavigation interface - Implement setting of audio/video channel Reviewers: cedric CC: cedric Differential Revision: https://phab.enlightenment.org/D387 Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/Makefile.examples9
-rw-r--r--src/examples/ecore/ecore_pipe_gstreamer_example.c18
2 files changed, 23 insertions, 4 deletions
diff --git a/src/examples/ecore/Makefile.examples b/src/examples/ecore/Makefile.examples
index f8ac82d50f..63e5f6b796 100644
--- a/src/examples/ecore/Makefile.examples
+++ b/src/examples/ecore/Makefile.examples
@@ -1,6 +1,13 @@
1CC=gcc 1CC=gcc
2
3if HAVE_GSTREAMER_1
4 GSTREAMER_DEP="gstreamer-1.0"
5else
6 GSTREAMER_DEP="gstreamer-0.10"
7endif
8
2COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,evas,ecore-evas,ecore-audio,ecore-con,ecore-file, \ 9COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,evas,ecore-evas,ecore-audio,ecore-con,ecore-file, \
3 eo,evas-software-buffer,gnutls,ecore-imf,ecore-imf-evas,gstreamer-0.10` -lm 10 eo,evas-software-buffer,gnutls,ecore-imf,ecore-imf-evas,$(GSTREAMER_DEP)` -lm
4 11
5EXAMPLES= ecore_animator_example \ 12EXAMPLES= ecore_animator_example \
6 ecore_audio_custom \ 13 ecore_audio_custom \
diff --git a/src/examples/ecore/ecore_pipe_gstreamer_example.c b/src/examples/ecore/ecore_pipe_gstreamer_example.c
index 008b96e5d8..20d3fa1163 100644
--- a/src/examples/ecore/ecore_pipe_gstreamer_example.c
+++ b/src/examples/ecore/ecore_pipe_gstreamer_example.c
@@ -1,4 +1,6 @@
1//Compile with: 1//Compile with:
2// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-1.0`
3// or
2// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-0.10` 4// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-0.10`
3 5
4#include <gst/gst.h> 6#include <gst/gst.h>
@@ -98,23 +100,33 @@ new_decoded_pad_cb(GstElement *demuxer,
98 GstElement *decoder; 100 GstElement *decoder;
99 GstPad *pad; 101 GstPad *pad;
100 GstCaps *caps; 102 GstCaps *caps;
101 gchar *str; 103 GstStructure *s;
104 const gchar *str;
102 105
106#if GST_CHECK_VERSION(1,0,0)
107 caps = gst_pad_get_current_caps(new_pad);
108#else
103 caps = gst_pad_get_caps(new_pad); 109 caps = gst_pad_get_caps(new_pad);
104 str = gst_caps_to_string(caps); 110#endif
111 s = gst_caps_get_structure(caps, 0);
112 str = gst_structure_get_name(s);
105 113
106 if (g_str_has_prefix(str, "video/")) 114 if (g_str_has_prefix(str, "video/"))
107 { 115 {
108 decoder = GST_ELEMENT(user_data); 116 decoder = GST_ELEMENT(user_data);
109 117
118#if GST_CHECK_VERSION(1,0,0)
119 pad = gst_element_get_static_pad(decoder, "sink");
120#else
110 pad = gst_element_get_pad(decoder, "sink"); 121 pad = gst_element_get_pad(decoder, "sink");
122#endif
111 if (GST_PAD_LINK_FAILED(gst_pad_link(new_pad, pad))) 123 if (GST_PAD_LINK_FAILED(gst_pad_link(new_pad, pad)))
112 { 124 {
113 g_warning("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME(new_pad), 125 g_warning("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME(new_pad),
114 GST_DEBUG_PAD_NAME(pad)); 126 GST_DEBUG_PAD_NAME(pad));
115 } 127 }
128 gst_object_unref(pad);
116 } 129 }
117 g_free(str);
118 gst_caps_unref(caps); 130 gst_caps_unref(caps);
119} 131}
120 132