Gstremer compatibility with android 10+ devices

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Gstremer compatibility with android 10+ devices

Purva
I am using gstreamer and I am checking it with android 10 but it's not
workig. I am receiving below error.

<http://gstreamer-devel.966125.n4.nabble.com/file/t379722/Screenshot_2020-10-19-11-58-25-432_org.jpg>

Tried below combination :
ndk 19 and ndk 21 both
Gstreamer version 1.16, 1.18 and 1.18.1




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5
Le vendredi 30 octobre 2020 à 08:19 -0500, Ironman einfochips a écrit :
> I am using gstreamer and I am checking it with android 10 but it's not
> workig. I am receiving below error.
>
> <http://gstreamer-devel.966125.n4.nabble.com/file/t379722/Screenshot_2020-10-19-11-58-25-432_org.jpg>
>
> Tried below combination :
> ndk 19 and ndk 21 both
> Gstreamer version 1.16, 1.18 and 1.18.1

"is missing a plugin" is highly dependant on your selected plugins
during compilation time of your application. More details of what you
are trying to achieve is needed.

>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Purva
Thanks for reply but right now I am not aware about how to install those
plugings. I want to achive live streaming. So any idea which plugin is
missing and how to install it ?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Purva
In reply to this post by Nicolas Dufresne-5
I am not getting any error inwhile compiling it with android 7 devices. My
live streaming functionality works perfectly with android 7 but I am facing
an issue while I am trying to compile it with android 10 version. Below is
the error log cat.

10-12 18:44:32.443  2847  2847 E GStreamer+ahc: 0:00:00.146510989
0x7f7964c500
../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]]

Another issue is I am not getting error while initializing gstreamer but it
occors only while I am trying to play and start live streaming . And that is
specifically in android 10. Things are good and find in android 7 devices.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5
Le jeudi 05 novembre 2020 à 07:29 -0600, Purva a écrit :

> I am not getting any error inwhile compiling it with android 7 devices. My
> live streaming functionality works perfectly with android 7 but I am facing
> an issue while I am trying to compile it with android 10 version. Below is
> the error log cat.
>
> 10-12 18:44:32.443  2847  2847 E GStreamer+ahc: 0:00:00.146510989
> 0x7f7964c500
> ../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]]

They must have removed the deprecated Camera API. That's fair game, we
need to update the build system to skip that source. A Camera2 base
implementation is needed. Will you file issues ? or even better submit
MRs ?

>
> Another issue is I am not getting error while initializing gstreamer but it
> occors only while I am trying to play and start live streaming . And that is
> specifically in android 10. Things are good and find in android 7 devices.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5
Le jeudi 05 novembre 2020 à 10:12 -0500, Nicolas Dufresne a écrit :

> Le jeudi 05 novembre 2020 à 07:29 -0600, Purva a écrit :
> > I am not getting any error inwhile compiling it with android 7 devices. My
> > live streaming functionality works perfectly with android 7 but I am facing
> > an issue while I am trying to compile it with android 10 version. Below is
> > the error log cat.
> >
> > 10-12 18:44:32.443  2847  2847 E GStreamer+ahc: 0:00:00.146510989
> > 0x7f7964c500
> > ../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]]
>
> They must have removed the deprecated Camera API. That's fair game, we
> need to update the build system to skip that source. A Camera2 base
> implementation is needed. Will you file issues ? or even better submit
> MRs ?

What is needed is to resurrect this as an MR and finish whatever is
needed:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/618

>
> >
> > Another issue is I am not getting error while initializing gstreamer but it
> > occors only while I am trying to play and start live streaming . And that is
> > specifically in android 10. Things are good and find in android 7 devices.
> >
> >
> >
> > --
> > Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Purva
- I am using gstreamer version 1.18  with ndk version 21. I have downloaded
code from below link
https://gstreamer.freedesktop.org/download/

- Are you suggesting to replace gstreamer with gstreamer-bad plugin or
source code to make it work on Android 10?

- And, also suggest me how can I add gstreamer-bad plugin in my code to
resolve my issue if I need to use my code itself
 
I appreciate your help and looking forward to your response.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Purva
In reply to this post by Nicolas Dufresne-5
I am not using camera code every thing is handled by library itself.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Jérôme Laheurte-3
In reply to this post by Nicolas Dufresne-5


Le 5 nov. 2020 à 16:28, Nicolas Dufresne <[hidden email]> a écrit :

What is needed is to resurrect this as an MR and finish whatever is
needed:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/618

It just so happens that I’m currently investigating this for work. I did a quick and dirty merge and some fixes for Meson, but haven’t had the occasion to test it yet (lack of hardware). Since I’m definitely not an Android developer there’s not much I could do if it doesn’t work but I’ll keep you informed.

Best regards
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5
Le vendredi 06 novembre 2020 à 16:21 +0100, Jérôme Laheurte a écrit :

>
>
> > Le 5 nov. 2020 à 16:28, Nicolas Dufresne <[hidden email]> a
> > écrit :
> >
> > What is needed is to resurrect this as an MR and finish whatever is
> > needed:
> >
> > https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/618
>
> It just so happens that I’m currently investigating this for work. I
> did a quick and dirty merge and some fixes for Meson, but haven’t had
> the occasion to test it yet (lack of hardware). Since I’m definitely
> not an Android developer there’s not much I could do if it doesn’t
> work but I’ll keep you informed.

Great, at least it will refresh the state of it.

>
> Best regards
> Jérôme Laheurte
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5
In reply to this post by Purva
Le vendredi 06 novembre 2020 à 07:58 -0600, Purva a écrit :

> - I am using gstreamer version 1.18  with ndk version 21. I have downloaded
> code from below link
> https://gstreamer.freedesktop.org/download/
>
> - Are you suggesting to replace gstreamer with gstreamer-bad plugin or
> source code to make it work on Android 10?
>
> - And, also suggest me how can I add gstreamer-bad plugin in my code to
> resolve my issue if I need to use my code itself
> I appreciate your help and looking forward to your response.<<


Non of these no. What I'm saying is that the crasher you are getting
happens during initialization of ahcsrc, which is a plugin that calls
the Camera API on the Java side. That API has been deprecated for a
while, in favour of Camera2 API.

From the look of it (because I'm not so up-to-date with Android stack),
Android 10+ removes the deprecated API, so it crash because the API no
longer exist. Of course, Android is all about backward compat, if you
build for 9+, it will work again, and will even work on Android 10.

If for specific reason you must build for Android 10 (because you need
to use new API), then the WIP patches I have posted will be needed to
support camera. If you don't care about camera, you may just out-
compile that plugin and move on.

Nicolas



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Jérôme Laheurte-3
In reply to this post by Jérôme Laheurte-3


Le 6 nov. 2020 à 16:21, Jérôme Laheurte <[hidden email]> a écrit :



Le 5 nov. 2020 à 16:28, Nicolas Dufresne <[hidden email]> a écrit :

What is needed is to resurrect this as an MR and finish whatever is
needed:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/618

It just so happens that I’m currently investigating this for work. I did a quick and dirty merge and some fixes for Meson, but haven’t had the occasion to test it yet (lack of hardware). Since I’m definitely not an Android developer there’s not much I could do if it doesn’t work but I’ll keep you informed.

Obviously Google already gave up on the « don’t be evil » stuff when they designed Android, that was a PITA. Anyway I made some progress but unfortunately the only hardware I have right now (Galaxy Tab S2) does not support camera2 so I couldn’t test the actual capture. I had to add some validation in gst_ahc2_src_get_caps to prevent a SIGSEGV when no compatible camera is found; aside from this the plugin registers. I’ll ask my boss to buy a more recent Android tablet and I’ll come back when I have more news.

IIRC a comment in the PR suggested to « split » androidmedia and this will indeed be necessary. The plugin fails to initialize if it doesn’t find the Java callback classes needed by ahcsrc, even though ahc2src won’t need them…

Best regards
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstremer compatibility with android 10+ devices

Nicolas Dufresne-5


Le mer. 18 nov. 2020 10 h 00, Jérôme Laheurte <[hidden email]> a écrit :


Le 6 nov. 2020 à 16:21, Jérôme Laheurte <[hidden email]> a écrit :



Le 5 nov. 2020 à 16:28, Nicolas Dufresne <[hidden email]> a écrit :

What is needed is to resurrect this as an MR and finish whatever is
needed:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/618

It just so happens that I’m currently investigating this for work. I did a quick and dirty merge and some fixes for Meson, but haven’t had the occasion to test it yet (lack of hardware). Since I’m definitely not an Android developer there’s not much I could do if it doesn’t work but I’ll keep you informed.

Obviously Google already gave up on the « don’t be evil » stuff when they designed Android, that was a PITA. Anyway I made some progress but unfortunately the only hardware I have right now (Galaxy Tab S2) does not support camera2 so I couldn’t test the actual capture. I had to add some validation in gst_ahc2_src_get_caps to prevent a SIGSEGV when no compatible camera is found; aside from this the plugin registers. I’ll ask my boss to buy a more recent Android tablet and I’ll come back when I have more news.

IIRC a comment in the PR suggested to « split » androidmedia and this will indeed be necessary. The plugin fails to initialize if it doesn’t find the Java callback classes needed by ahcsrc, even though ahc2src won’t need them…

Ideally we can outcompile with the split to avoid the back trace.


Best regards
Jérôme Laheurte

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel