gst_element_factory_make fails with ANDROID

Sebastian Dröge sebastian at centricular.com
Mon Nov 25 04:47:32 PST 2013


On Mo, 2013-11-25 at 03:27 -0800, yxxone wrote:
> my mk file is:
> LOCAL_PATH := $(call my-dir)
> 
> include $(CLEAR_VARS)
> 
> LOCAL_MODULE    := test
> LOCAL_SRC_FILES := test.c
> LOCAL_SHARED_LIBRARIES := gstreamer_android
> LOCAL_LDLIBS := -llog
> 
> include $(BUILD_SHARED_LIBRARY)
> 
> GSTREAMER_SDK_ROOT        := $(GSTREAMER_SDK_ROOT_ANDROID)
> GSTREAMER_NDK_BUILD_PATH  :=
> $(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/
> GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CODECS) coreelements rtp
> udp
> G_IO_MODULES              := gnutls
> GSTREAMER_EXTRA_DEPS      := gstreamer-interfaces-0.10 gstreamer-video-0.10
>  
> include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer.mk 
> 
> I had tried to add qtdemux to  "GSTREAMER_PLUGINS" which end up with
> ndk-build error  "cannot find -lgstqtdemux".  so I remove qtdemux .
> 
> I initial my Gstreamer with  code "gst_init(NULL, NULL);"

Yeah, there's your problem then. As on Android and iOS all plugins are
static plugins, you need to initialize every plugin yourself after
gst_init().

The initialization helpers from gstreamer_android.c and the
corresponding Java class make this for you already for all the plugins
that you add in your Android.mk. Take a look at the tutorials here:
http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/android-tutorial-5

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131125/5f98068b/attachment.pgp>


More information about the gstreamer-devel mailing list