From 033bc3e0c5c2fc81fae157bea84469676575941b Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Thu, 16 May 2019 14:35:16 +0200 Subject: GStreamer: Add support of Android Since for Android GStreamer is distributed in archives, and should be staticlly linked, so by default it is not built and should be explicitly enabled within configuring by -gstreamer option. (currently it is auto and enabled if gstreamer exists) ("libs" of the gstreamer library in configure.json is empty to prevent any libs to be added while building any code that uses gstreamer library) Some base gst archives are fully included to Qt5MultimediaGstTools. Users would need to just use: QT += multimediagsttools-private Before building, GSTREAMER_ROOT_ANDROID env var should be set to point to gst binaries. Also all necessary plugins must be registered in user's code by GST_PLUGIN_STATIC_DECLARE/GST_PLUGIN_STATIC_REGISTER macros after QGstUtils::initializeGst(). and e.g. project file might contain: INCLUDEPATH += $$(GSTREAMER_ROOT_ANDROID)/armv7/include/ \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 \ $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include LIBS += -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ \ -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \ __here_list_of_plugins__ See video/android/gstreamer example Change-Id: Ie4e586fa8489f1bd23622763f5578abed1729272 Task-number: QTBUG-72125 Reviewed-by: Andy Shaw Reviewed-by: Ville Voutilainen --- src/multimedia/multimedia.pro | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/multimedia/multimedia.pro') diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro index 2bc22e51d..6efee8040 100644 --- a/src/multimedia/multimedia.pro +++ b/src/multimedia/multimedia.pro @@ -85,6 +85,14 @@ MODULE_WINRT_CAPABILITIES_DEVICE += \ microphone \ webcam +qtConfig(gstreamer) { + ANDROID_LIB_DEPENDENCIES += \ + plugins/mediaservice/libgstcamerabin.so \ + plugins/mediaservice/libgstmediacapture.so \ + plugins/mediaservice/libgstmediaplayer.so \ + plugins/mediaservice/libgstaudiodecoder.so +} + win32: LIBS_PRIVATE += -luuid HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS -- cgit v1.2.3