using libgstreamer_android.so as a dependent shared library

Sepehr Laal sepehr.laal at heliosinteractive.com
Tue Oct 20 15:37:52 PDT 2015


I have written a shared library which wraps the common functionality of
GStreamer in a compact and convenient C++ class. I never had a problem
using GST via my proxy shared library until I wanted to use it on Android.

The problem is that when I compile my shared library for Android, it
hardcodes the path to libgstreamer_android.so in it
(C:\gstreamer\libgstreamer_android.so) and when I transfer it to my device,
it tries to load it off of that absolute path which linker left in my
binary.

Is there a workaround for this problem? I do not have any Java codes at all
and my shared library is loaded dynamically by another application which
has plugin-authoring support via shared libraries and I am trying to expose
GStreamer to it.

I am using GST 1.6 64 Bit on Windows and latest NDK to date. My Android.mk
file is as follows:

------------------------------------------------------------------

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := ngw
LOCAL_SRC_FILES := ../../source/NanoGstWrapper.cpp \
../../scripts/NanoGstWrapperGlue.cpp
LOCAL_C_INCLUDES := ../../include \
../../scripts
LOCAL_LDLIBS := -lGLESv2
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_ARM_MODE := arm

include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)

GSTREAMER_SDK_ROOT         := $(GSTREAMER_ROOT)
GSTREAMER_NDK_BUILD_PATH   :=
$(GSTREAMER_SDK_ROOT)/share/gst-android/ndk-build/

include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk

GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) \
$(GSTREAMER_PLUGINS_CODECS) \
$(GSTREAMER_PLUGINS_PLAYBACK)
GSTREAMER_EXTRA_DEPS       := gstreamer-app-1.0

include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk

------------------------------------------------------------------

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20151020/4d7efc04/attachment.html>


More information about the gstreamer-android mailing list