GNOME Bugzilla – Bug 781860
Androidmedia:encode/decode:Using libdvm fails in new Android versions (>v4.4).
Last modified: 2018-11-03 14:07:55 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.
This is when using the androidmedia plugin from outside a proper Android application?
(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.
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?
(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 ?
-- 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.