After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760961 - androidmedia: Zerocopy rendering broken by getOutputBuffer() returning a NULL buffer
androidmedia: Zerocopy rendering broken by getOutputBuffer() returning a NULL...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
1.7.1
Other other
: Normal blocker
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-21 18:46 UTC by Gregoire
Modified: 2016-01-23 07:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
logcat dump (37.75 KB, text/plain)
2016-01-21 18:46 UTC, Gregoire
  Details
Patch for tutorial 5 (3.33 KB, patch)
2016-01-21 18:47 UTC, Gregoire
none Details | Review
patch to show fps on tutorial 5 (5.76 KB, patch)
2016-01-21 21:03 UTC, Gregoire
none Details | Review

Description Gregoire 2016-01-21 18:46:42 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.
Comment 1 Gregoire 2016-01-21 18:47:13 UTC
Created attachment 319522 [details] [review]
Patch for tutorial 5
Comment 2 Gregoire 2016-01-21 18:58:45 UTC
My compilation of Android Tutorial 5 is available here: http://www.gentil.com/tmp/tutorial_5.apk
Comment 3 Gregoire 2016-01-21 19:07:09 UTC
Also, if I compile the same code against Android gstreamer 1.5, everything works well on the device.
Comment 4 Sebastian Dröge (slomo) 2016-01-21 19:51:07 UTC
Is this 1.7.1 release or built from latest GIT master?
Comment 5 Gregoire 2016-01-21 19:56:38 UTC
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.
Comment 6 Gregoire 2016-01-21 20:10:11 UTC
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
Comment 7 Sebastian Dröge (slomo) 2016-01-21 20:15:56 UTC
I can confirm the problem with my Nexus 7 here.
Comment 8 Gregoire 2016-01-21 21:03:52 UTC
Created attachment 319526 [details] [review]
patch to show fps on tutorial 5
Comment 9 Gregoire 2016-01-21 21:04:41 UTC
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.
Comment 10 Gregoire 2016-01-22 06:23:01 UTC
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.
Comment 11 Gregoire 2016-01-22 06:24:57 UTC
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.
Comment 12 Sebastian Dröge (slomo) 2016-01-22 08:01:34 UTC
Can you file another bug about that problem with the compiler/linker errors?

And yes, the problem is definitely in androidmedia or libgstgl here.
Comment 13 Gregoire 2016-01-22 08:15:25 UTC
Done: https://bugzilla.gnome.org/show_bug.cgi?id=760973
Comment 14 Sebastian Dröge (slomo) 2016-01-22 14:17:37 UTC
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
Comment 16 Gregoire 2016-01-23 07:49:25 UTC
I have opened a new bug as it's still not working for me. https://bugzilla.gnome.org/show_bug.cgi?id=761014