diff options
author | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-05-16 14:35:16 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-10-18 12:56:41 +0200 |
commit | 033bc3e0c5c2fc81fae157bea84469676575941b (patch) | |
tree | a057d39d5a1a6d9beca1f34ae505242545ccafcd /src/multimedia | |
parent | 0a7482b97a9247f728730c1a2cf222f8a24a88c4 (diff) |
GStreamer: Add support of Androidv5.14.0-beta2
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 <andy.shaw@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/configure.json | 6 | ||||
-rw-r--r-- | src/multimedia/doc/src/platform-notes-gstreamer-on-android.qdoc | 59 | ||||
-rw-r--r-- | src/multimedia/multimedia.pro | 8 |
3 files changed, 71 insertions, 2 deletions
diff --git a/src/multimedia/configure.json b/src/multimedia/configure.json index 65d9aee80..0e9cfc9f7 100644 --- a/src/multimedia/configure.json +++ b/src/multimedia/configure.json @@ -55,7 +55,8 @@ { "type": "pkgConfig", "args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" }, { "libs": "-lgstreamer-1.0 -lgstbase-1.0 -lgstaudio-1.0 -lgstvideo-1.0 -lgstpbutils-1.0 -lglib-2.0 -lgobject-2.0", - "condition": "config.win32 || config.macos" } + "condition": "config.win32 || config.macos" }, + { "libs": "", "condition": "config.android && input.gstreamer != ''" } ] }, "gstreamer_app_0_10": { @@ -74,7 +75,8 @@ "use": "gstreamer_1_0", "sources": [ { "type": "pkgConfig", "args": "gstreamer-app-1.0" }, - { "libs": "-lgstapp-1.0", "condition": "config.win32 || config.macos" } + { "libs": "-lgstapp-1.0", "condition": "config.win32 || config.macos" }, + { "libs": "", "condition": "config.android && input.gstreamer != ''" } ] }, "gstreamer_photography_0_10": { diff --git a/src/multimedia/doc/src/platform-notes-gstreamer-on-android.qdoc b/src/multimedia/doc/src/platform-notes-gstreamer-on-android.qdoc new file mode 100644 index 000000000..51836d99a --- /dev/null +++ b/src/multimedia/doc/src/platform-notes-gstreamer-on-android.qdoc @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2019 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\page platform-notes-gstreamer-on-android.html +\title Qt Multimedia GStreamer on Android +\brief Platform notes for GStreamer on Android +\since 5.14 + +This page covers the availability of GStreamer on Android. + +\section1 Limitations + +Since GStreamer is licensed under LGPL and distributed in archives (and should be statically linked), +Qt Multimedia does not provide support of GStreamer on Android by default. + +Therefore GStreamer support must be explicitly enabled by configuring Qt with the \c -gstreamer option. + +\section1 Setup + +The GStreamer project provides prebuilt binaries which you can download and unzip into any location of your choice. + +The environment variable \c GSTREAMER_ROOT_ANDROID should be set to the location where you unzipped the downloaded package. + +\section1 Application + +Qt Multimedia does not contain any plugins and all needed plugins must be included +and registered in applications manually by \c GST_PLUGIN_STATIC_DECLARE and \c GST_PLUGIN_STATIC_REGISTER +after \c gst_init(). + +Please refer to the official manual on how to statically link plugins to an application. + +https://gstreamer.freedesktop.org/documentation/gstreamer/gstplugin.html?gi-language=c#GST_PLUGIN_STATIC_REGISTER + +*/ 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 |