Gstreamer shared libraries in Android
Sebastian Dröge
sebastian at centricular.com
Thu Oct 6 09:51:31 UTC 2016
On Wed, 2016-10-05 at 09:15 -0700, Alfred wrote:
> Hi,
>
> I am able to use gstreamer sdk "gstreamer-1.0-android-arm-1.8.2.tar.bz2" in
> tutorial2. Now I am trying to build and run gstreamer tutorial 2 using
> gstreamer shared libraries(.so). My platform is Android Jelly Bean 4.2.2.
> Below are the steps which I followed.
>
> 1. Built gstreamer 1.8.2 using Cerbero.
> ("gstreamer-1.0-android-arm-1.8.2-runtime.tar.bz2").
> 2. Compiled tutorial-2.c using ndk-build.
> 3. Loaded libtutorial-2.so, libgstreamer-1.0.so, libgstbase-1.0.so and their
> dependencies using System.loadLibrary() in Tutorial2.java file
> 4. Built the application without errors and ran on the device.
> 5. In tutorial-2.c, it's creating a pipeline "filesrc location =
> somefile.wav ! wavparse ! audioconvert ! autoaudiosink" in the application.
> I got the error "Unable to build pipeline : no element filesrc"
> 6. So I tried loading the plugin libgstcoreelements, which contains filesrc,
> using gst_plugin_load_file(). please see the code snippet in the file
> attached. But it is not coming out of gst_plugin_load_file() API. (log
> attached)
> 7. Then I tried with gst_registry_scan_path(), but faced same issue.
>
> Can we discuss on this issue? Also in some threads in gstreamer-development
> forum, I saw it's recommended to use
> "gstreamer-1.0-android-arm-1.8.2.tar.bz2" instead of runtime package
> "gstreamer-1.0-android-arm-1.8.2-runtime.tar.bz2". Is there any disadvantage
> in using runtime package in Android? What are the benefits of using static
> package over runtime package?
It reduces the number of files that have to be opened, allows link-time
optimizations (and removal of unused code), and is the only way how
things can work on older Android versions (they had a limit of 64
shared libraries... just count the plugins).
Loading shared plugins from Android works just fine though, you just
have to ensure that the ABI matches and you get them from the correct
path.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161006/640df42a/attachment.sig>
More information about the gstreamer-devel
mailing list