GStreamer Android.mk to CMakeList.txt

safouane maaloul maaloulsafouane at gmail.com
Wed Apr 14 09:05:22 UTC 2021


The code attached is the Android.mk file from the Official GStreamer
Website, which is built by NDKBuild. I need to build my android application
by CMake and I am having difficulty in translating GStreamer build file
from Android.mk to CMakeList.txt. I know this is not a coding service
platform, but this is the last step for my project and I really need your
help.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE    := tutorial-3
LOCAL_SRC_FILES := tutorial-3.c dummy.cpp
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog -landroidinclude $(BUILD_SHARED_LIBRARY)
ifndef GSTREAMER_ROOT_ANDROID$(error GSTREAMER_ROOT_ANDROID is not
defined!)endif
ifeq ($(TARGET_ARCH_ABI),armeabi)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/armelse ifeq
($(TARGET_ARCH_ABI),armeabi-v7a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/armv7else ifeq
($(TARGET_ARCH_ABI),arm64-v8a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/arm64else ifeq
($(TARGET_ARCH_ABI),x86)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/x86else ifeq
($(TARGET_ARCH_ABI),x86_64)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/x86_64else$(error
Target arch ABI not supported: $(TARGET_ARCH_ABI))endif

GSTREAMER_NDK_BUILD_PATH  :=
$(GSTREAMER_ROOT)/share/gst-android/ndk-build/include
$(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE)
$(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS)
$(GSTREAMER_PLUGINS_CODECS_RESTRICTED) $(GSTREAMER_PLUGINS_PLAYBACK)
$(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET)
GSTREAMER_EXTRA_DEPS      := gstreamer-video-1.0 gobject-2.0
GSTREAMER_EXTRA_LIBS      := -liconvinclude
$(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk


Best regards

Safouane
-- 
*SAFOUANE MAALOUL*

*maaloulsafouane at gmail.com <maaloulsafouane at gmail.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-android/attachments/20210414/964dd628/attachment.htm>


More information about the gstreamer-android mailing list