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 781860 - Androidmedia:encode/decode:Using libdvm fails in new Android versions (>v4.4).
Androidmedia:encode/decode:Using libdvm fails in new Android versions (>v4.4).
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other other
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-27 19:28 UTC by Reza Razavi
Modified: 2018-11-03 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Reza Razavi 2017-04-27 19:28:16 UTC
Androidmedia plugin tries  to create a Java VM (using libdvm.so) when Java VM is  not available, but it fails in most recent devices because since android 4.4 google has moved from using dalvik to art (and libdvm.so is not even available). This bug prevents using androidmedia at runtime level for most Android devices and it needs get fixed by adding libart support. A good sample can be found in google libnativehelper.
Comment 1 Sebastian Dröge (slomo) 2017-04-27 21:53:27 UTC
This is when using the androidmedia plugin from outside a proper Android application?
Comment 2 Reza Razavi 2017-04-28 12:50:43 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> This is when using the androidmedia plugin from outside a proper Android
> application?

Yes this happen outside a proper Android application using runtime build, the logic is in gstamx.c to fallback using libdvm.so while it's not available anymore sonce google switch to using art.
Comment 3 Sebastian Dröge (slomo) 2017-04-28 13:03:31 UTC
Generally you can't use the MediaCodec API without a proper Android application, at least not the hardware codecs. On virtually all devices special initialization happens that you can't easily replicate.


Nonetheless it would make sense to try ART first instead of DVM depending on the Android version, and otherwise fall back to the other one. Do you want to provide a patch?
Comment 4 Reza Razavi 2017-04-28 14:56:47 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> Generally you can't use the MediaCodec API without a proper Android
> application, at least not the hardware codecs. On virtually all devices
> special initialization happens that you can't easily replicate.
> 
> 
> Nonetheless it would make sense to try ART first instead of DVM depending on
> the Android version, and otherwise fall back to the other one. Do you want
> to provide a patch?

I did a test and simply added using libart.so before trying libdvm but it did not work with current code and in android command line I get Aborted message once trying to run create_java_vm. do you have any suggestion ?
Comment 5 GStreamer system administrator 2018-11-03 14:07:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/550.