summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-04-28 13:57:20 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-05-29 14:05:09 +0000
commitc94342497120dd8eb640afbeb770c01b0d717634 (patch)
tree8cf750cc6294298a9f9d44921be98ee27a8d1036 /src/plugins
parent43c2ef3f61c6837a1c640832a170470a00b0efa1 (diff)
downloadqtmultimedia-c94342497120dd8eb640afbeb770c01b0d717634.tar.gz
GStreamer: Remove dependency to gstreamer_imxcommon
gstreamer_imxcommon is not official plugin. Added extracting of physical memory instead. Available since gst 1.14. Pick-to: 5.15 Fixes: QTBUG-83663 Change-Id: I4c2823f1a965c1fc5a5ab9e50ab8325884f8f6e1 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/videonode/imx6/imx6.pro8
-rw-r--r--src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp13
2 files changed, 8 insertions, 13 deletions
diff --git a/src/plugins/videonode/imx6/imx6.pro b/src/plugins/videonode/imx6/imx6.pro
index 43e17e725..0e9ed8b73 100644
--- a/src/plugins/videonode/imx6/imx6.pro
+++ b/src/plugins/videonode/imx6/imx6.pro
@@ -1,12 +1,8 @@
TARGET = imx6vivantevideonode
-QT += multimedia-private qtmultimediaquicktools-private
+QT += multimedia-private qtmultimediaquicktools-private multimediagsttools-private
-qtConfig(gstreamer_imxcommon) {
- QT += multimediagsttools-private
- QMAKE_USE += gstreamer_imxcommon
- DEFINES += GST_USE_UNSTABLE_API
-}
+QMAKE_USE += gstreamer
HEADERS += \
qsgvivantevideonode.h \
diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
index e1468fe34..d6b98cacd 100644
--- a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
+++ b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
@@ -50,10 +50,8 @@
#include <unistd.h>
#include <QtMultimedia/private/qtmultimediaglobal_p.h>
-#if QT_CONFIG(gstreamer_imxcommon)
#include "private/qgstvideobuffer_p.h"
-#include <gst/allocators/imx/phys_mem_meta.h>
-#endif
+#include <gst/allocators/gstphysmemory.h>
//#define QT_VIVANTE_VIDEO_DEBUG
@@ -229,11 +227,12 @@ GLuint QSGVivanteVideoMaterial::vivanteMapping(QVideoFrame vF)
#endif
GLuint physical = ~0U;
-#if QT_CONFIG(gstreamer_imxcommon)
+#if GST_CHECK_VERSION(1,14,0)
auto buffer = reinterpret_cast<QGstVideoBuffer *>(vF.buffer());
- GstImxPhysMemMeta *meta = GST_IMX_PHYS_MEM_META_GET(buffer->buffer());
- if (meta && meta->phys_addr)
- physical = meta->phys_addr;
+ auto mem = gst_buffer_peek_memory(buffer->buffer(), 0);
+ auto phys_addr = gst_is_phys_memory(mem) ? gst_phys_memory_get_phys_addr(mem) : 0;
+ if (phys_addr)
+ physical = phys_addr;
#endif
glBindTexture(GL_TEXTURE_2D, tmpTexId);
glTexDirectVIVMap_LOCAL(GL_TEXTURE_2D,