GNOME Bugzilla – Bug 760961
androidmedia: Zerocopy rendering broken by getOutputBuffer() returning a NULL buffer
Last modified: 2016-01-23 07:49:25 UTC
Created attachment 319521 [details] logcat dump I'm using Android Gstreamer 1.7.1 with . I have Environment: Eclipse + SDK 10e + Nexus 5x running 6.0.1 and Nexus 7 2013 running 6.0.1. I have compiled gstreamer as of January 19, 2016, with: ./cerbero-uninstalled -c config/cross-android.cbc bootstrap ./cerbero-uninstalled -c config/cross-android-armv7.cbc package gstreamer-1.0 I have also applied http://cgit.freedesktop.org/gstreamer/cerbero/commit/?id=1c7efc274241c146189360f2af73f74bcaebfa45 I'm running tutorial5 from git://people.freedesktop.org/~slomo/gst-sdk-tutorials with the patch attached. I'm running the video files available at: http://www.gentil.com/tmp/sdcard-gstreamer-1.7.1.zip They all fail. I attach a logcat info.
Created attachment 319522 [details] [review] Patch for tutorial 5
My compilation of Android Tutorial 5 is available here: http://www.gentil.com/tmp/tutorial_5.apk
Also, if I compile the same code against Android gstreamer 1.5, everything works well on the device.
Is this 1.7.1 release or built from latest GIT master?
On January 19, 2016, I did: ./cerbero-uninstalled -c config/cross-android.cbc bootstrap ./cerbero-uninstalled -c config/cross-android-armv7.cbc package gstreamer-1.0 I have also applied the patch http://cgit.freedesktop.org/gstreamer/cerbero/commit/?id=1c7efc274241c146189360f2af73f74bcaebfa45, recompiled libav and copied everything to tutorial-5.
I'm also uploaded tutorial-5 compiled against gstreamer 1.5-git (an old version that worked very well for me). You can test both apk apps with the video I have also uploaded and see by yourself. http://www.gentil.com/tmp/tutorial_5_gstreamer1.5.apk
I can confirm the problem with my Nexus 7 here.
Created attachment 319526 [details] [review] patch to show fps on tutorial 5
Great! :-) :-( At least, I was not dreaming and wasting the time of the community. It's working with gstreamer-1.5 so something has been broken - probably recently. Here is also a handy patch against tutorial5 that displays fps while playing a video.
An interesting data point is that everything works if I remove androidmedia from the plugin list and software libav decoding is used... Definitely a problem with androidmedia then.
FYI, one quick comment not on this bug: if I replace GSTREAMER_PLUGINS_CODEC by GSTREAMER_PLUGINS_CODEC_RESTRICTED in Android.mk, the compilation fails. Another dependency problem. Problem to be opened in another bug.
Can you file another bug about that problem with the compiler/linker errors? And yes, the problem is definitely in androidmedia or libgstgl here.
Done: https://bugzilla.gnome.org/show_bug.cgi?id=760973
commit 5a3744e86c21ac247b451fccbe313a598dd1bdb1 Author: Sebastian Dröge <sebastian@centricular.com> Date: Fri Jan 22 16:13:45 2016 +0200 amc: MediaCodec::getOutputBuffer() can return NULL without exception Happens when doing zerocopy rendering, or when passing a wrong index to it. Handle this properly for zerocopy rendering, fail properly for the other cases. https://bugzilla.gnome.org/show_bug.cgi?id=760961
Full link: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5a3744e86c21ac247b451fccbe313a598dd1bdb1
I have opened a new bug as it's still not working for me. https://bugzilla.gnome.org/show_bug.cgi?id=761014