Has anyone made dynamic libs build of gstreamer for Android

The prebuilt gstreamer for Android is static. I would like to build gstreamer to dynamic libs. Any info available? Any issues to use gstreamer in this way in Android?

Back in the days, only 64 shared object was allowed, which wasn’t sufficient. As we needed to go static for iOS, we opted for that in Android. I don’t think we will soon move back, since the application loading time is so much faster with just the plugin you need and preloaded. A system wide installation would be different, maybe you don’t use the application model ?

License issue. If gstreamer static libs are applied, my app will violate LGPL, right?

No, you only need to follow the requirements of the LGPL: mostly, allowing to re-link your application against changed versions of the LGPL code. But for details you should talk to a lawyer.

Note that GStreamer on Android is linking all of GStreamer and all selected plugins into a single shared library that is then loaded dynamically into the application. There is no static linking between the application and GStreamer, and GStreamer is just dynamically loaded by your application.

On iOS this is not the case and you actually statically link to GStreamer and its dependencies. iOS AFAIU supports dynamic linking in applications nowadays, so that’s probably something that should be changed but it needs someone do actually implement that change.

Thank you for your reply, Sebastian. My case may be like on iOS. I downloaded gstreamer static libs(.a) and compiled my app with these static libs to build an apk for installation in an Android device. Do you think only one single shared lib is created in my case as well?

Is it possible to install gstreamer in Android and link my app to it dynamically?

I don’t know how you’re building your Android app. If you use the build system integration by GStreamer then yes, but I’d recommend you to actually look at how things are working and for legal questions to involve someone who can advise you about such things.

Unless you’re building your own Android-based OS, no.

Thank you for your reply. I build my app in Linux for Android. I simply link my app with prebuilt gstreamer for Android(all libs are static) to make an apk in Linux. Then copy the apk to an Android device. Are all static libs + plugins used in my app a single shared lib in the apk?

Why don’t you look what’s actually inside the apk :slight_smile: It’s just ZIP file in the end.

1 Like

Good idea. There is no single gstreamer dynamic lib there. I think I now know what you mean. Thanks a lot!

1 Like