calling gst_android_init() manually

Sebastian Dröge sebastian at centricular.com
Wed Mar 30 08:35:16 UTC 2016


On Mi, 2016-03-30 at 10:04 +0530, Ananda Sagar M wrote:
> I would like to know how to initialize all the static plugins which
> by default happens through java, jni call gst_android_init() manually
> ??
> I am writing a native ndk application which makes use of
> libgstreamer_android.so, but without having any java layer, how can
> i manually call gst_android_init() ?? 

Check here:
https://cgit.freedesktop.org/gstreamer/cerbero/tree/data/ndk-build/gstreamer_android-1.0.c.in#n417

You can call it like that from your code, you just need to declare the
function with that signature and somehow provide it with a JNIEnv* and
android.context.Context Java object from your activity.

Even if you're developing a native application you will see the need to
use some Java API via JNI every now and then, and here is one of those
cases. You should be able to get the required objects somewhere in your
application via the API.

-- 
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: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20160330/6037cb7b/attachment.sig>


More information about the gstreamer-android mailing list