Playbin and memory:EGLImage on android

Andy Shiue andy.shiue at gmail.com
Mon Sep 28 08:05:39 PDT 2015


Hi Matthew,

Thanks for the information. I guess the problem is the close format
of EGL_ANDROID_image_native_buffer.
I thought we can use the
shared EGLImage buffer between OMX and GLES, but that is apparently not the
case with android mediacodec.

I'll investigate more with your patch. I guess the worst case is to
customize my shaders with OES_EGL_image_external extension.


On Fri, Sep 25, 2015 at 2:02 AM, Matthew Waters <ystreet00 at gmail.com> wrote:

> On 25/09/15 00:30, Andy Shiue wrote:
> > I am researching the possibility of using the gstreamer on android. I
> > managed to get the gst-player (using
> > https://github.com/sdroege/gst-player.git) working on android but the
> > video playing is not very smooth and with many dropped frames on a
> > nexus 5.
> >
> > I have the pipeline diagram attached. The diagram showed both
> > OmxGoogleH264Decoder and GLImageSink were used for playing. That is
> > good since the hw acceleration is on then. I do noticed though that
> > the desired zero-copy (using memory:EGLImage) is not in use. From the
> > information I gathered, playbin should be able to negotiate the
> > allocation to use EGLImage if it is available. But this is apparently
> > not the case with gst-player.
> >
> > Am I wrong in the assumption that playbn by default will automatically
> > choose the EGLImage if it is available? If not, is there a way to
> > configure playbin to use EGLImage?
> >
> > I am pretty new to gstreamer so hopefully I am not totally lost in my
> > question. I am building the gstreamer from source right now; so hint
> > on where to debug will be helpful, too. Thanks for the help.
>
> Currently the android zero-copy path is not merged yet into any release
> so all video frames from Android's MediaCodec are going through system
> memory and possibly being downloaded and reuploaded into GL.  The
> relevant patches are available in the following bug report
> https://bugzilla.gnome.org/show_bug.cgi?id=731204.  They currently don't
> apply against git master so some fiddling is needed to make them
> compile.  https://github.com/ystreet/gst-plugins-bad/tree/amc-zerocopy
> contains the rebased versions on git master as of a few days ago.
>
> Android doesn't actually expose an EGLImage for us to pass on so those
> caps will never occur.  It instead gives us an external texture handle
> to deal with which makes things a little more complicated.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150928/2b48b13d/attachment-0001.html>


More information about the gstreamer-devel mailing list