Playbin and memory:EGLImage on android

Matthew Waters ystreet00 at gmail.com
Thu Sep 24 23:02:56 PDT 2015


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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150925/7b8af454/attachment.sig>


More information about the gstreamer-devel mailing list