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>
This commit is contained in:
Sebastian Dröge 2013-12-23 10:50:53 +09:00 committed by Cedric BAIL
parent 3bc8f09733
commit c76ab3cfc9
2 changed files with 23 additions and 4 deletions

View File

@ -1,6 +1,13 @@
CC=gcc
if HAVE_GSTREAMER_1
GSTREAMER_DEP="gstreamer-1.0"
else
GSTREAMER_DEP="gstreamer-0.10"
endif
COMMON_FLAGS=`pkg-config --libs --cflags eina,ecore,evas,ecore-evas,ecore-audio,ecore-con,ecore-file, \
eo,evas-software-buffer,gnutls,ecore-imf,ecore-imf-evas,gstreamer-0.10` -lm
eo,evas-software-buffer,gnutls,ecore-imf,ecore-imf-evas,$(GSTREAMER_DEP)` -lm
EXAMPLES= ecore_animator_example \
ecore_audio_custom \

View File

@ -1,4 +1,6 @@
//Compile with:
// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-1.0`
// or
// gcc -o ecore_pipe_gstreamer_example ecore_pipe_gstreamer_example.c `pkg-config --libs --cflags ecore gstreamer-0.10`
#include <gst/gst.h>
@ -98,23 +100,33 @@ new_decoded_pad_cb(GstElement *demuxer,
GstElement *decoder;
GstPad *pad;
GstCaps *caps;
gchar *str;
GstStructure *s;
const gchar *str;
#if GST_CHECK_VERSION(1,0,0)
caps = gst_pad_get_current_caps(new_pad);
#else
caps = gst_pad_get_caps(new_pad);
str = gst_caps_to_string(caps);
#endif
s = gst_caps_get_structure(caps, 0);
str = gst_structure_get_name(s);
if (g_str_has_prefix(str, "video/"))
{
decoder = GST_ELEMENT(user_data);
#if GST_CHECK_VERSION(1,0,0)
pad = gst_element_get_static_pad(decoder, "sink");
#else
pad = gst_element_get_pad(decoder, "sink");
#endif
if (GST_PAD_LINK_FAILED(gst_pad_link(new_pad, pad)))
{
g_warning("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME(new_pad),
GST_DEBUG_PAD_NAME(pad));
}
gst_object_unref(pad);
}
g_free(str);
gst_caps_unref(caps);
}