GStreamer custom plugin use in Android

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

GStreamer custom plugin use in Android

Akon
Hi there,

First of all my delight for GStreamer. Great project!

I developed a GStreamer 1.0 plugin which works fine in Windows/Linux and
some other systems. Now I want to cover Android. Currently, the plugin is
not integrated into GStreamer in sense that it is not built with
GStreamer/Cerbero, but it is built separately using GStreamer official
binaries (devel) resulting *.so or *.a file.

How can I use the plugin in an Android app? I don't consider direct
inclusion of the plugin sources into the app, but through prebuilt
static/shared lib.

I think a way when my plugin will be used as a separate lib (shared or
static) will not work, due to there will be e.g. two glib instances (one
from GStreamer (there all libs are static) and one from the plugin), so
g_malloc()/g_free() will fail (there will be two heaps).

At the moment I'm considering integration of my plugin to
gstreamer-android.so prebuilt lib (see GStreamer Tutorials for Android)
that is generated by GStreamer's ndk-built scripts. How can I do it with?

Thanks in advance.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-custom-plugin-use-in-Android-tp4679040.html
Sent from the GStreamer-devel mailing list archive at 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: GStreamer custom plugin use in Android

Sebastian Dröge-3
On Do, 2016-08-11 at 00:19 -0700, Akon wrote:

> Hi there,
>
> First of all my delight for GStreamer. Great project!
>
> I developed a GStreamer 1.0 plugin which works fine in Windows/Linux and
> some other systems. Now I want to cover Android. Currently, the plugin is
> not integrated into GStreamer in sense that it is not built with
> GStreamer/Cerbero, but it is built separately using GStreamer official
> binaries (devel) resulting *.so or *.a file.
>
> How can I use the plugin in an Android app? I don't consider direct
> inclusion of the plugin sources into the app, but through prebuilt
> static/shared lib.
>
> I think a way when my plugin will be used as a separate lib (shared or
> static) will not work, due to there will be e.g. two glib instances (one
> from GStreamer (there all libs are static) and one from the plugin), so
> g_malloc()/g_free() will fail (there will be two heaps).
>
> At the moment I'm considering integration of my plugin to
> gstreamer-android.so prebuilt lib (see GStreamer Tutorials for Android) 
> that is generated by GStreamer's ndk-built scripts. How can I do it with?
There are multiple ways how you can do this:
1) a shared plugin .so that is linked against libgstreamer_android.so.
The latter contains all of glib, GStreamer, etc and can be used instead
of those libraries. You can then put the plugin .so into your apkg and
load it at runtime with gst_plugin_load_file() for example.

2) a static plugin .a that is linked into the libgstreamer_android.so
like the others. For that you only have to put it into the same
directory as the other plugin .a and add it to your Android.mk

3) a static plugin directly linked into your application, or just the
element linked into your application and registered from there

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

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

signature.asc (968 bytes) Download Attachment