Enable gstreamer plugin for Qt multimedia module

The dirty patch is needed because pkg-config has been disabled by the
qtbase build currently.

Tested using example's video player playing webm and ogg video and audio
files. Working in XServer SDL
This commit is contained in:
Simeon Huang 2021-05-16 15:47:23 +01:00 committed by Yaksh Bariya
parent 5783b43bc2
commit aef2a1de3f
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 50 additions and 7 deletions

View File

@ -3,20 +3,22 @@ TERMUX_PKG_DESCRIPTION="Qt 5 Multimedia Library"
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
TERMUX_PKG_VERSION=5.12.10
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.12/${TERMUX_PKG_VERSION}/submodules/qtmultimedia-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=cc98f19eb54b581f4a270855c4dc07ae9272e775ae7c5729c885e6c5e197a03c
# qt5-qtdeclarative is not needed because quick widget requires OpenGL
# gstreamer is not supported because it requires glib and Qt OpenGL support
TERMUX_PKG_DEPENDS="qt5-qtbase, pulseaudio, openal-soft"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools, fdupes"
TERMUX_PKG_DEPENDS="qt5-qtbase, pulseaudio, openal-soft, gstreamer, gst-plugins-base, gst-plugins-bad"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_configure () {
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
# GST_VERSION=1.0 if/when OpenGL is supported
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross" \
GST_VERSION=1.0 \
INCLUDEPATH+="${TERMUX_PREFIX}/include/gstreamer-1.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/include/glib-2.0/" \
INCLUDEPATH+="${TERMUX_PREFIX}/lib/glib-2.0/include"
}
termux_step_make_install() {

View File

@ -6,7 +6,7 @@
"sources": [
- { "type": "pkgConfig", "args": "gstreamer-app-1.0" }
+ { "type": "pkgConfig", "args": "gstreamer-app-1.0" },
+ { "libs": "-lgstapp-1.0" }
+ { "libs": "-lgstapp-1.0 -lgstbase-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0" }
]
},
"gstreamer_photography_0_10": {
@ -20,3 +20,15 @@
]
},
"wmf": {
--- src/src/multimedia/configure.json 2021-05-16 13:53:50.128205372 +0000
+++ src.mod/src/multimedia/configure.json 2021-05-16 13:41:51.186432131 +0000
@@ -53,7 +53,8 @@
"test": "gstreamer",
"sources": [
{ "type": "pkgConfig",
- "args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" }
+ "args": "gstreamer-1.0 gstreamer-base-1.0 gstreamer-audio-1.0 gstreamer-video-1.0 gstreamer-pbutils-1.0" },
+ { "libs": "-lgstpbutils-1.0 -lgstaudio-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgsttag-1.0 -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0" }
]
},
"gstreamer_app_0_10": {

View File

@ -0,0 +1,29 @@
--- src/config.tests/gstreamer/gstreamer.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer/gstreamer.pro 2021-05-16 13:59:14.419703082 +0000
@@ -1,2 +1,5 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
--- src/config.tests/gstreamer_photography/gstreamer_photography.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_photography/gstreamer_photography.pro 2021-05-16 13:59:57.407079643 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
--- src/config.tests/gstreamer_appsrc/gstreamer_appsrc.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_appsrc/gstreamer_appsrc.pro 2021-05-16 14:03:35.948676966 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"
--- src/config.tests/gstreamer_encodingprofiles/gstreamer_encodingprofiles.pro 2020-10-15 06:53:20.000000000 +0000
+++ src.mod/config.tests/gstreamer_encodingprofiles/gstreamer_encodingprofiles.pro 2021-05-16 14:02:47.817110561 +0000
@@ -1 +1,4 @@
SOURCES += main.cpp
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/gstreamer-1.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/include/glib-2.0/"
+INCLUDEPATH += "/data/data/com.termux/files/usr/lib/glib-2.0/include"