Gstremer compatibility with android 10+ devices
Jérôme Laheurte
jerome at jeromelaheurte.net
Thu Dec 10 09:03:35 UTC 2020
> Le 10 déc. 2020 à 05:43, Purva <gevaria.purva at einfochips.com> a écrit :
>
> Hi,
>
> Thanks for trying to help me out.
>
>
>
> Here is overall status,
>
> 1. Apk is working fine on Android 7
> 2. Apk is not working on Android 10 with the same setup.
>
> I am getting below error in logcat for Android 10,
>
>
>
>
>
> ./sys/androidmedia/gst-android-hardware-camera.c:1616:_init_classes Failed
> to initialize android.hardware.Camera classes: Failed to call Java method:
> java.lang.ClassNotFoundException: Didn't find class
> "org/freedesktop/gstreamer/androidmedia/GstAhcCallback" on path:
> DexPathList[[zip file
> "/data/app/org.freedesktop.gstreamer.livestream.livestreaming-1/base.apk"],nativeLibraryDirectories=[/data/app/org.freedesktop.gstreamer.livestream.livestreaming-1/lib/arm64,
> /data/app/org.freedesktop.gstreamer.livestream.livestreaming-1/base.apk!/lib/arm64-v8a,
> /system/lib64, /vendor/lib64]]
Ah yes I stumbled upon this too. The androidmedia plugin will not correctly initialize if you don’t include the Ahc callbacks in your Java code. I don’t understant how it could work on Android 7 though, since this happened to me on 7.0. Just add the following classes to your Java project:
GstAhcCallback.java
GstAhsCallback.java
GstAmcOnFrameAvailableListener.java
I can’t find them on my Linux system even though I installed gst-plugins-bad (there’s no gst-android package for Ubuntu, it seems?) but you can find them in git:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/sys/androidmedia/org/freedesktop/gstreamer/androidmedia <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/tree/master/sys/androidmedia/org/freedesktop/gstreamer/androidmedia>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201210/fe8ce40f/attachment.htm>
More information about the gstreamer-devel
mailing list