EFL and Enlightenment GStreamer 1.x support

Over the past few weeks I did some work on porting Emotion to GStreamer 1.x. Emotion is the media library used by Enlightenment and part of the Enlightenment Foundation Libraries (EFL). It provides a media playback library abstraction (there are also Xine and VLC backends).

Previously there was a GStreamer 0.10 backend (which was the default one for Emotion), but GStreamer 0.10 is no longer maintained and supported by the community. At Centricular we want to make sure that GStreamer and other Free Software shine, so I started porting the backend to GStreamer 1.0.

I started doing a straightforward port of the old GStreamer 0.10 backend. That was a few hours of work, but the old 0.10 backend was rather bitrotten and was lacking a lot of features compared to the other backends. So I spent some more time on cleaning it up, fixing a lot of bugs on the way and making it (almost) feature-complete. Some of the new features I added were selection and switching of audio/video/text streams, support for the navigation interface for DVDs, buffering for network streams, improved support for live streams and proper support for non-1:1 pixel-aspect-ratios. I’ll work on adding some further features and improvements (like zerocopy rendering) to it over the next weeks every now and then, but overall I would say that this is ready for general use now and definitely an improvement over the old code.

The code can be found here and will also be in the 1.9 release, which will be released soonish. It’s also the default backend for Emotion now, and should give proper out-of-the-box multimedia experience with Enlightenment. The GStreamer 0.10 backend is still available but has to be enabled explicitly, if anybody needs it for whatever reason.

11 thoughts on “EFL and Enlightenment GStreamer 1.x support”

  1. Thank you so much for this! I disabled gstreamer in emotion for EFL 1.8 in my local builds, as it felt outdated to pull in 0.10 stuff. Can’t wait for 1.9 to be released!

  2. Hi,
    I am new in EFL and enlightement , and i want if possible to give me an example or a tutorial on how to use gstreamer1.0 using EFL as GUI.
    I am already familiar with Gstreamer1.0.

    Thank you in advance.

    1. See https://git.enlightenment.org/core/efl.git/tree/src/tests/emotion or https://git.enlightenment.org/apps/rage.git/ if you want to use Emotion.

      If you want to use GStreamer directly inside an EFL application I think the best would be to look at the Emotion GStreamer backend, especially the video sink. You’ll need to do something like that in your application to have the video rendered inside your window. Or you could use the GstVideoOverlay interface to have ximagesink or xvimagesink render to the XID of your window.

      1. Hi slomo,

        First, i would like to thank you for your response.
        I want to use Gstreamer directly inside an EFL application. And i would like if possible to pass me an example how it is done and perhaps how to compile it. just to see how the code is written. After that i would understand it and try to do something similar when using EFL with gstreamer.

        Thank you in advance,

      2. See the two links I gave above. I currently don’t have any standalone application using EFL and GStreamer directly (and not via Emotion), but in general it would need to replicate what the Emotion GStreamer video sink is doing.

  3. Hi slomo,

    i looked at the links you gave me, and i found it interesting especially the “emotion_basic_example.c” which give an idea how to read a video and i will try to add gstreamer in it so that i can use the video player.
    the other example that i have found interresting is the “ecore_pipe_gstreamer_example.c” which is very clear , and i will work on it.

    The only problem i got is with the “emotion_gstreamer.c”, i can’t compile it. i have the error of undefined VERSION , undefined PACKAGE.

    So if you know how to compile it (perhaps i’m missing a library or something in the pkg-config) or if you know how can i solve this problem please help me.

    Thank you in advance,

    1. The first two examples are using emotion (a library provided by EFL, which can use GStreamer or xine or VLC as backend). The emotion_gstreamer.c is part of the emotion GStreamer backend and I only linked to it as an example of how to integrate GStreamer directly into emotion (however the video sink file next to it is more interesting, shows how to integrate GStreamer video into Evas).
      You won’t be able to compile emotion_gstreamer.c outside the EFL source tree.

  4. Hi,

    I am trying gstreamer pipeline on windows to record Audio/Video from two sources desktop microphone as input for Audio src and usb camera for video src.

    gstreamer pipeline :
    gst-launch-1.0 ksvideosrc device-index=0 ! videorate ! queue ! theoraenc ! queue ! mux. autoaudiosrc ! queue ! audioconvert ! queue ! vorbisenc ! queue ! mux. oggmux name=mux ! filesink location=stream.ogv

    Above pipeline works fine for webcam having microphone integrated with it but the same pipe line does not work for two sources, desktop microphone as input for Audio src and usb camera for video src.

    It gives internal data flow error

    Any suggestion is highly appreciated
    Thanks

    1. hello, after hunting for issue it I solved it myself, Just posting the solution so that it may help someone else:

      below pipeline worked for me:
      gst-launch-1.0 ksvideosrc device-index=0 ! decodebin ! queue ! autoaudiosrc ! vorbisenc ! queue ! mux. avimux name=mux ! filesink location=output.avi

Leave a Reply

Your email address will not be published. Required fields are marked *