diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-01-05 17:35:28 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-22 07:00:25 +0000 |
commit | b898e5038b29a236578dc7cd1588bdbc0d40eac1 (patch) | |
tree | f9a14db08f05bc1f0a272814e52754c8507872cb | |
parent | 565636cf6ad18e4415fa9adeb8c99a0c93d3b1ff (diff) |
Move the gsttools into Qt Multimedia
Let's not have a separate helper lib for those. The longer
term goal is to get rid of platform specific plugins anyway.
Change-Id: I24c9e984c696a4ecfc4693413ad51264f6926afe
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | examples/multimedia/video/android/gstreamer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | examples/multimedia/video/android/gstreamer/gstreamer.pro | 3 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/gsttools/CMakeLists.txt | 98 | ||||
-rw-r--r-- | src/gsttools/gsttools.pro | 85 | ||||
-rw-r--r-- | src/gsttools/qgsttools_global_p.h | 70 | ||||
-rw-r--r-- | src/multimedia/CMakeLists.txt | 59 | ||||
-rw-r--r-- | src/multimedia/gstreamer/gstreamer.pri | 64 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstappsrc.cpp (renamed from src/gsttools/qgstappsrc.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstappsrc_p.h (renamed from src/gsttools/qgstappsrc_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstcodecsinfo.cpp (renamed from src/gsttools/qgstcodecsinfo.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstcodecsinfo_p.h (renamed from src/gsttools/qgstcodecsinfo_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreameraudioinputselector.cpp (renamed from src/gsttools/qgstreameraudioinputselector.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreameraudioinputselector_p.h (renamed from src/gsttools/qgstreameraudioinputselector_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreameraudioprobecontrol.cpp (renamed from src/gsttools/qgstreameraudioprobecontrol.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreameraudioprobecontrol_p.h (renamed from src/gsttools/qgstreameraudioprobecontrol_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerbufferprobe.cpp (renamed from src/gsttools/qgstreamerbufferprobe.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerbufferprobe_p.h (renamed from src/gsttools/qgstreamerbufferprobe_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerbushelper.cpp (renamed from src/gsttools/qgstreamerbushelper.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerbushelper_p.h (renamed from src/gsttools/qgstreamerbushelper_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamermessage.cpp (renamed from src/gsttools/qgstreamermessage.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamermessage_p.h (renamed from src/gsttools/qgstreamermessage_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerplayercontrol.cpp (renamed from src/gsttools/qgstreamerplayercontrol.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerplayercontrol_p.h (renamed from src/gsttools/qgstreamerplayercontrol_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerplayersession.cpp (renamed from src/gsttools/qgstreamerplayersession.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamerplayersession_p.h (renamed from src/gsttools/qgstreamerplayersession_p.h) | 2 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol.cpp (renamed from src/gsttools/qgstreamervideoinputdevicecontrol.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol_p.h (renamed from src/gsttools/qgstreamervideoinputdevicecontrol_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideooverlay.cpp (renamed from src/gsttools/qgstreamervideooverlay.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideooverlay_p.h (renamed from src/gsttools/qgstreamervideooverlay_p.h) | 2 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideoprobecontrol.cpp (renamed from src/gsttools/qgstreamervideoprobecontrol.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideoprobecontrol_p.h (renamed from src/gsttools/qgstreamervideoprobecontrol_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideorenderer.cpp (renamed from src/gsttools/qgstreamervideorenderer.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideorenderer_p.h (renamed from src/gsttools/qgstreamervideorenderer_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideorendererinterface.cpp (renamed from src/gsttools/qgstreamervideorendererinterface.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideorendererinterface_p.h (renamed from src/gsttools/qgstreamervideorendererinterface_p.h) | 5 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideowindow.cpp (renamed from src/gsttools/qgstreamervideowindow.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstreamervideowindow_p.h (renamed from src/gsttools/qgstreamervideowindow_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstutils.cpp (renamed from src/gsttools/qgstutils.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstutils_p.h (renamed from src/gsttools/qgstutils_p.h) | 92 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideobuffer.cpp (renamed from src/gsttools/qgstvideobuffer.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideobuffer_p.h (renamed from src/gsttools/qgstvideobuffer_p.h) | 4 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideorendererplugin.cpp (renamed from src/gsttools/qgstvideorendererplugin.cpp) | 8 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideorendererplugin_p.h (renamed from src/gsttools/qgstvideorendererplugin_p.h) | 18 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideorenderersink.cpp (renamed from src/gsttools/qgstvideorenderersink.cpp) | 0 | ||||
-rw-r--r-- | src/multimedia/gstreamer/qgstvideorenderersink_p.h (renamed from src/gsttools/qgstvideorenderersink_p.h) | 2 | ||||
-rw-r--r-- | src/multimedia/multimedia.pro | 1 | ||||
-rw-r--r-- | src/multimediawidgets/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/multimediawidgets/gstreamer/gstreamer.pri | 4 | ||||
-rw-r--r-- | src/multimediawidgets/gstreamer/qgstreamervideowidget.cpp (renamed from src/gsttools/qgstreamervideowidget.cpp) | 2 | ||||
-rw-r--r-- | src/multimediawidgets/gstreamer/qgstreamervideowidget_p.h (renamed from src/gsttools/qgstreamervideowidget_p.h) | 8 | ||||
-rw-r--r-- | src/multimediawidgets/multimediawidgets.pro | 1 | ||||
-rw-r--r-- | src/plugins/gstreamer/audiodecoder/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/gstreamer/camerabin/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabin.pro | 2 | ||||
-rw-r--r-- | src/plugins/gstreamer/common.pri | 2 | ||||
-rw-r--r-- | src/plugins/gstreamer/mediacapture/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/gstreamer/mediaplayer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/videonode/imx6/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/plugins/videonode/imx6/imx6.pro | 2 | ||||
-rw-r--r-- | src/src.pro | 13 | ||||
-rw-r--r-- | sync.profile | 1 |
62 files changed, 246 insertions, 370 deletions
diff --git a/examples/multimedia/video/android/gstreamer/CMakeLists.txt b/examples/multimedia/video/android/gstreamer/CMakeLists.txt index 6ba5b683c..c7b10ca11 100644 --- a/examples/multimedia/video/android/gstreamer/CMakeLists.txt +++ b/examples/multimedia/video/android/gstreamer/CMakeLists.txt @@ -42,6 +42,7 @@ target_link_libraries(gstreamer PUBLIC Qt::Gui Qt::Multimedia Qt::MultimediaWidgets + Qt::MultimediaWidgetsPrivate Qt::Quick avcodec avfilter @@ -78,7 +79,6 @@ target_link_libraries(gstreamer PUBLIC gstwavparse gstx264 mpg123 - multimediagsttoolsPrivate ogg soup-2.4 swresample diff --git a/examples/multimedia/video/android/gstreamer/gstreamer.pro b/examples/multimedia/video/android/gstreamer/gstreamer.pro index edc040adc..0ae344678 100644 --- a/examples/multimedia/video/android/gstreamer/gstreamer.pro +++ b/examples/multimedia/video/android/gstreamer/gstreamer.pro @@ -1,4 +1,4 @@ -QT += quick multimedia multimediawidgets +QT += quick multimedia multimediawidgets-private CONFIG += c++11 SOURCES += main.cpp @@ -13,7 +13,6 @@ isEmpty(GSTREAMER_ROOT_ANDROID): error("GSTREAMER_ROOT_ANDROID is empty") 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 -QT+=multimediagsttools-private LIBS += -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \ -lgstcoreelements -lgstplayback -lgstvideotestsrc -lgstaudioconvert -lgstvideoconvert -lgstautodetect -lgsttypefindfunctions \ #PLUGINS codecs diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4ac2d98d1..f6761cf84 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,9 +12,5 @@ if(TARGET Qt::Widgets) add_subdirectory(multimediawidgets) endif() -if(QT_FEATURE_gstreamer) - add_subdirectory(gsttools) -endif() - add_subdirectory(plugins) #special case end diff --git a/src/gsttools/CMakeLists.txt b/src/gsttools/CMakeLists.txt deleted file mode 100644 index 0620a4318..000000000 --- a/src/gsttools/CMakeLists.txt +++ /dev/null @@ -1,98 +0,0 @@ -# Generated from gsttools.pro. - -##################################################################### -## MultimediaGstTools Module: -##################################################################### - -qt_add_module(MultimediaGstTools - INTERNAL_MODULE - SOURCES - qgstcodecsinfo.cpp qgstcodecsinfo_p.h - qgstreameraudioinputselector.cpp qgstreameraudioinputselector_p.h - qgstreameraudioprobecontrol.cpp qgstreameraudioprobecontrol_p.h - qgstreamerbufferprobe.cpp qgstreamerbufferprobe_p.h - qgstreamerbushelper.cpp qgstreamerbushelper_p.h - qgstreamermessage.cpp qgstreamermessage_p.h - qgstreamerplayercontrol.cpp qgstreamerplayercontrol_p.h - qgstreamerplayersession.cpp qgstreamerplayersession_p.h - qgstreamervideoinputdevicecontrol.cpp qgstreamervideoinputdevicecontrol_p.h - qgstreamervideooverlay.cpp qgstreamervideooverlay_p.h - qgstreamervideoprobecontrol.cpp qgstreamervideoprobecontrol_p.h - qgstreamervideorenderer.cpp qgstreamervideorenderer_p.h - qgstreamervideorendererinterface.cpp qgstreamervideorendererinterface_p.h - qgstreamervideowindow.cpp qgstreamervideowindow_p.h - qgsttools_global_p.h - qgstutils.cpp qgstutils_p.h - qgstvideobuffer.cpp qgstvideobuffer_p.h - qgstvideorendererplugin.cpp qgstvideorendererplugin_p.h - qgstvideorenderersink.cpp qgstvideorenderersink_p.h - DEFINES - GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 - PUBLIC_LIBRARIES - Qt::CorePrivate - Qt::GuiPrivate - Qt::MultimediaPrivate - gstreamer -) - -#### Keys ignored in scope 1:.:.:gsttools.pro:<TRUE>: -# MODULE = "multimediagsttools" - -## Scopes: -##################################################################### - -qt_extend_target(MultimediaGstTools CONDITION NOT static - DEFINES - QT_MAKEDLL -) - -qt_extend_target(MultimediaGstTools CONDITION QT_FEATURE_alsa - PUBLIC_LIBRARIES - alsa -) - -qt_extend_target(MultimediaGstTools CONDITION TARGET Qt::Widgets - SOURCES - qgstreamervideowidget.cpp qgstreamervideowidget_p.h # special case - PUBLIC_LIBRARIES - Qt::MultimediaWidgets -) - -#### Keys ignored in scope 4:.:.:gsttools.pro:TARGET Qt::Widgets: -# PRIVATE_HEADERS = "qgstreamervideowidget_p.h" - -qt_extend_target(MultimediaGstTools CONDITION QT_FEATURE_gstreamer_gl - PUBLIC_LIBRARIES - gstreamer_gl -) - -qt_extend_target(MultimediaGstTools CONDITION QT_FEATURE_gstreamer_app - SOURCES - qgstappsrc.cpp qgstappsrc_p.h # special case - PUBLIC_LIBRARIES - gstreamer_app -) - -#### Keys ignored in scope 6:.:.:gsttools.pro:QT_FEATURE_gstreamer_app: -# PRIVATE_HEADERS = "qgstappsrc_p.h" - -qt_extend_target(MultimediaGstTools CONDITION ANDROID - LIBRARIES - # Remove: L$ENV{GSTREAMER_ROOT_ANDROID}/armv7/lib - # Remove: Wl,--no-whole-archive - # Remove: Wl,--whole-archive - WrapIconv::WrapIconv - ffi - glib-2.0 - gmodule-2.0 - gobject-2.0 - gstapp-1.0 - gstaudio-1.0 - gstbase-1.0 - gstpbutils-1.0 - gstreamer-1.0 - gsttag-1.0 - gstvideo-1.0 - intl - orc-0.4 -) diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro deleted file mode 100644 index 5271c396f..000000000 --- a/src/gsttools/gsttools.pro +++ /dev/null @@ -1,85 +0,0 @@ -TARGET = QtMultimediaGstTools -MODULE = multimediagsttools -CONFIG += internal_module - -QT = core-private multimedia-private gui-private - -!static:DEFINES += QT_MAKEDLL -DEFINES += GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 - -qtConfig(alsa): \ - QMAKE_USE += alsa - -QMAKE_USE += gstreamer - -PRIVATE_HEADERS += \ - qgstreamerbushelper_p.h \ - qgstreamermessage_p.h \ - qgstutils_p.h \ - qgstvideobuffer_p.h \ - qgstreamerbufferprobe_p.h \ - qgstreamervideorendererinterface_p.h \ - qgstreameraudioinputselector_p.h \ - qgstreamervideorenderer_p.h \ - qgstreamervideoinputdevicecontrol_p.h \ - qgstcodecsinfo_p.h \ - qgstreamervideoprobecontrol_p.h \ - qgstreameraudioprobecontrol_p.h \ - qgstreamervideowindow_p.h \ - qgstreamervideooverlay_p.h \ - qgsttools_global_p.h \ - qgstreamerplayersession_p.h \ - qgstreamerplayercontrol_p.h \ - qgstvideorendererplugin_p.h \ - qgstvideorenderersink_p.h - -SOURCES += \ - qgstreamerbushelper.cpp \ - qgstreamermessage.cpp \ - qgstutils.cpp \ - qgstvideobuffer.cpp \ - qgstreamerbufferprobe.cpp \ - qgstreamervideorendererinterface.cpp \ - qgstreameraudioinputselector.cpp \ - qgstreamervideorenderer.cpp \ - qgstreamervideoinputdevicecontrol.cpp \ - qgstcodecsinfo.cpp \ - qgstreamervideoprobecontrol.cpp \ - qgstreameraudioprobecontrol.cpp \ - qgstreamervideowindow.cpp \ - qgstreamervideooverlay.cpp \ - qgstreamerplayersession.cpp \ - qgstreamerplayercontrol.cpp \ - qgstvideorendererplugin.cpp \ - qgstvideorenderersink.cpp - -qtHaveModule(widgets) { - QT += multimediawidgets - - PRIVATE_HEADERS += \ - qgstreamervideowidget_p.h - - SOURCES += \ - qgstreamervideowidget.cpp -} - -qtConfig(gstreamer_gl): QMAKE_USE += gstreamer_gl - -qtConfig(gstreamer_app) { - QMAKE_USE += gstreamer_app - PRIVATE_HEADERS += qgstappsrc_p.h - SOURCES += qgstappsrc.cpp -} - -android { - LIBS_PRIVATE += \ - -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib \ - -Wl,--whole-archive \ - -lgstapp-1.0 -lgstreamer-1.0 -lgstaudio-1.0 -lgsttag-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 \ - -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lffi -lintl -liconv -lorc-0.4 \ - -Wl,--no-whole-archive -} - -HEADERS += $$PRIVATE_HEADERS - -load(qt_module) diff --git a/src/gsttools/qgsttools_global_p.h b/src/gsttools/qgsttools_global_p.h deleted file mode 100644 index babcd3aaf..000000000 --- a/src/gsttools/qgsttools_global_p.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QGSTTOOLS_GLOBAL_H -#define QGSTTOOLS_GLOBAL_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# if defined(QT_BUILD_MULTIMEDIAGSTTOOLS_LIB) -# define Q_GSTTOOLS_EXPORT Q_DECL_EXPORT -# else -# define Q_GSTTOOLS_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_GSTTOOLS_EXPORT -#endif - -QT_END_NAMESPACE - -#endif // QGSTTOOLS_GLOBAL_H diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt index 114ac3b6e..a912453b1 100644 --- a/src/multimedia/CMakeLists.txt +++ b/src/multimedia/CMakeLists.txt @@ -243,3 +243,62 @@ qt_extend_target(Multimedia CONDITION QT_FEATURE_alsa qt_add_docs(Multimedia doc/qtmultimedia.qdocconf ) + +qt_extend_target(Multimedia CONDITION QT_FEATURE_gstreamer + SOURCES + gstreamer/qgstcodecsinfo.cpp qgstcodecsinfo_p.h + gstreamer/qgstreameraudioinputselector.cpp gstreamer/qgstreameraudioinputselector_p.h + gstreamer/qgstreameraudioprobecontrol.cpp gstreamer/qgstreameraudioprobecontrol_p.h + gstreamer/qgstreamerbufferprobe.cpp gstreamer/qgstreamerbufferprobe_p.h + gstreamer/qgstreamerbushelper.cpp gstreamer/qgstreamerbushelper_p.h + gstreamer/qgstreamermessage.cpp gstreamer/qgstreamermessage_p.h + gstreamer/qgstreamerplayercontrol.cpp gstreamer/qgstreamerplayercontrol_p.h + gstreamer/qgstreamerplayersession.cpp gstreamer/qgstreamerplayersession_p.h + gstreamer/qgstreamervideoinputdevicecontrol.cpp gstreamer/qgstreamervideoinputdevicecontrol_p.h + gstreamer/qgstreamervideooverlay.cpp gstreamer/qgstreamervideooverlay_p.h + gstreamer/qgstreamervideoprobecontrol.cpp gstreamer/qgstreamervideoprobecontrol_p.h + gstreamer/qgstreamervideorenderer.cpp gstreamer/qgstreamervideorenderer_p.h + gstreamer/qgstreamervideorendererinterface.cpp gstreamer/qgstreamervideorendererinterface_p.h + gstreamer/qgstreamervideowindow.cpp gstreamer/qgstreamervideowindow_p.h + gstreamer/qgstutils.cpp gstreamer/qgstutils_p.h + gstreamer/qgstvideobuffer.cpp gstreamer/qgstvideobuffer_p.h + gstreamer/qgstvideorendererplugin.cpp gstreamer/qgstvideorendererplugin_p.h + gstreamer/qgstvideorenderersink.cpp gstreamer/qgstvideorenderersink_p.h + DEFINES + GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 + PUBLIC_LIBRARIES + gstreamer +) + +qt_extend_target(Multimedia CONDITION QT_FEATURE_gstreamer_gl + PUBLIC_LIBRARIES + gstreamer_gl +) + +qt_extend_target(Multimedia CONDITION QT_FEATURE_gstreamer_app + SOURCES + gstreamer/qgstappsrc.cpp gstreamer/qgstappsrc_p.h # special case + PUBLIC_LIBRARIES + gstreamer_app +) + +qt_extend_target(Multimedia CONDITION QT_FEATURE_gstreamer AND ANDROID + LIBRARIES + # Remove: L$ENV{GSTREAMER_ROOT_ANDROID}/armv7/lib + # Remove: Wl,--no-whole-archive + # Remove: Wl,--whole-archive + WrapIconv::WrapIconv + ffi + glib-2.0 + gmodule-2.0 + gobject-2.0 + gstapp-1.0 + gstaudio-1.0 + gstbase-1.0 + gstpbutils-1.0 + gstreamer-1.0 + gsttag-1.0 + gstvideo-1.0 + intl + orc-0.4 +) diff --git a/src/multimedia/gstreamer/gstreamer.pri b/src/multimedia/gstreamer/gstreamer.pri new file mode 100644 index 000000000..5a9ec0d67 --- /dev/null +++ b/src/multimedia/gstreamer/gstreamer.pri @@ -0,0 +1,64 @@ +DEFINES += GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 + +qtConfig(alsa): \ + QMAKE_USE += alsa + +QMAKE_USE += gstreamer + +HEADERS += \ + gstreamer/qgstreamerbushelper_p.h \ + gstreamer/qgstreamermessage_p.h \ + gstreamer/qgstutils_p.h \ + gstreamer/qgstvideobuffer_p.h \ + gstreamer/qgstreamerbufferprobe_p.h \ + gstreamer/qgstreamervideorendererinterface_p.h \ + gstreamer/qgstreameraudioinputselector_p.h \ + gstreamer/qgstreamervideorenderer_p.h \ + gstreamer/qgstreamervideoinputdevicecontrol_p.h \ + gstreamer/qgstcodecsinfo_p.h \ + gstreamer/qgstreamervideoprobecontrol_p.h \ + gstreamer/qgstreameraudioprobecontrol_p.h \ + gstreamer/qgstreamervideowindow_p.h \ + gstreamer/qgstreamervideooverlay_p.h \ + gstreamer/qgstreamerplayersession_p.h \ + gstreamer/qgstreamerplayercontrol_p.h \ + gstreamer/qgstvideorendererplugin_p.h \ + gstreamer/qgstvideorenderersink_p.h + +SOURCES += \ + gstreamer/qgstreamerbushelper.cpp \ + gstreamer/qgstreamermessage.cpp \ + gstreamer/qgstutils.cpp \ + gstreamer/qgstvideobuffer.cpp \ + gstreamer/qgstreamerbufferprobe.cpp \ + gstreamer/qgstreamervideorendererinterface.cpp \ + gstreamer/qgstreameraudioinputselector.cpp \ + gstreamer/qgstreamervideorenderer.cpp \ + gstreamer/qgstreamervideoinputdevicecontrol.cpp \ + gstreamer/qgstcodecsinfo.cpp \ + gstreamer/qgstreamervideoprobecontrol.cpp \ + gstreamer/qgstreameraudioprobecontrol.cpp \ + gstreamer/qgstreamervideowindow.cpp \ + gstreamer/qgstreamervideooverlay.cpp \ + gstreamer/qgstreamerplayersession.cpp \ + gstreamer/qgstreamerplayercontrol.cpp \ + gstreamer/qgstvideorendererplugin.cpp \ + gstreamer/qgstvideorenderersink.cpp + +qtConfig(gstreamer_gl): QMAKE_USE += gstreamer_gl + +qtConfig(gstreamer_app) { + QMAKE_USE += gstreamer_app + PRIVATE_HEADERS += gstreamer/qgstappsrc_p.h + SOURCES += gstreamer/qgstappsrc.cpp +} + +android { + LIBS_PRIVATE += \ + -L$$(GSTREAMER_ROOT_ANDROID)/armv7/lib \ + -Wl,--whole-archive \ + -lgstapp-1.0 -lgstreamer-1.0 -lgstaudio-1.0 -lgsttag-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstpbutils-1.0 \ + -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lffi -lintl -liconv -lorc-0.4 \ + -Wl,--no-whole-archive +} + diff --git a/src/gsttools/qgstappsrc.cpp b/src/multimedia/gstreamer/qgstappsrc.cpp index e8ec63bb9..e8ec63bb9 100644 --- a/src/gsttools/qgstappsrc.cpp +++ b/src/multimedia/gstreamer/qgstappsrc.cpp diff --git a/src/gsttools/qgstappsrc_p.h b/src/multimedia/gstreamer/qgstappsrc_p.h index c1c8cdabe..9c443c0c4 100644 --- a/src/gsttools/qgstappsrc_p.h +++ b/src/multimedia/gstreamer/qgstappsrc_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <QtCore/qobject.h> #include <QtCore/qiodevice.h> @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstAppSrc : public QObject +class Q_MULTIMEDIA_EXPORT QGstAppSrc : public QObject { Q_OBJECT public: diff --git a/src/gsttools/qgstcodecsinfo.cpp b/src/multimedia/gstreamer/qgstcodecsinfo.cpp index bbf78124d..bbf78124d 100644 --- a/src/gsttools/qgstcodecsinfo.cpp +++ b/src/multimedia/gstreamer/qgstcodecsinfo.cpp diff --git a/src/gsttools/qgstcodecsinfo_p.h b/src/multimedia/gstreamer/qgstcodecsinfo_p.h index d7aadef21..7f4415e69 100644 --- a/src/gsttools/qgstcodecsinfo_p.h +++ b/src/multimedia/gstreamer/qgstcodecsinfo_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <QtCore/qmap.h> #include <QtCore/qstringlist.h> #include <QSet> @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstCodecsInfo +class Q_MULTIMEDIA_EXPORT QGstCodecsInfo { public: enum ElementType { AudioEncoder, VideoEncoder, Muxer }; diff --git a/src/gsttools/qgstreameraudioinputselector.cpp b/src/multimedia/gstreamer/qgstreameraudioinputselector.cpp index dede1f661..dede1f661 100644 --- a/src/gsttools/qgstreameraudioinputselector.cpp +++ b/src/multimedia/gstreamer/qgstreameraudioinputselector.cpp diff --git a/src/gsttools/qgstreameraudioinputselector_p.h b/src/multimedia/gstreamer/qgstreameraudioinputselector_p.h index 8f839237e..3b258ba3a 100644 --- a/src/gsttools/qgstreameraudioinputselector_p.h +++ b/src/multimedia/gstreamer/qgstreameraudioinputselector_p.h @@ -51,13 +51,13 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qaudioinputselectorcontrol.h> #include <QtCore/qstringlist.h> QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerAudioInputSelector : public QAudioInputSelectorControl +class Q_MULTIMEDIA_EXPORT QGstreamerAudioInputSelector : public QAudioInputSelectorControl { Q_OBJECT public: diff --git a/src/gsttools/qgstreameraudioprobecontrol.cpp b/src/multimedia/gstreamer/qgstreameraudioprobecontrol.cpp index 8b0415bde..8b0415bde 100644 --- a/src/gsttools/qgstreameraudioprobecontrol.cpp +++ b/src/multimedia/gstreamer/qgstreameraudioprobecontrol.cpp diff --git a/src/gsttools/qgstreameraudioprobecontrol_p.h b/src/multimedia/gstreamer/qgstreameraudioprobecontrol_p.h index 4fc5c7704..b641929cd 100644 --- a/src/gsttools/qgstreameraudioprobecontrol_p.h +++ b/src/multimedia/gstreamer/qgstreameraudioprobecontrol_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <gst/gst.h> #include <qmediaaudioprobecontrol.h> #include <QtCore/qmutex.h> @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerAudioProbeControl +class Q_MULTIMEDIA_EXPORT QGstreamerAudioProbeControl : public QMediaAudioProbeControl , public QGstreamerBufferProbe , public QSharedData diff --git a/src/gsttools/qgstreamerbufferprobe.cpp b/src/multimedia/gstreamer/qgstreamerbufferprobe.cpp index 230807466..230807466 100644 --- a/src/gsttools/qgstreamerbufferprobe.cpp +++ b/src/multimedia/gstreamer/qgstreamerbufferprobe.cpp diff --git a/src/gsttools/qgstreamerbufferprobe_p.h b/src/multimedia/gstreamer/qgstreamerbufferprobe_p.h index 46067325c..5d66f7320 100644 --- a/src/gsttools/qgstreamerbufferprobe_p.h +++ b/src/multimedia/gstreamer/qgstreamerbufferprobe_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <gst/gst.h> #include <QtCore/qglobal.h> @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerBufferProbe +class Q_MULTIMEDIA_EXPORT QGstreamerBufferProbe { public: enum Flags diff --git a/src/gsttools/qgstreamerbushelper.cpp b/src/multimedia/gstreamer/qgstreamerbushelper.cpp index 2eb038dfa..2eb038dfa 100644 --- a/src/gsttools/qgstreamerbushelper.cpp +++ b/src/multimedia/gstreamer/qgstreamerbushelper.cpp diff --git a/src/gsttools/qgstreamerbushelper_p.h b/src/multimedia/gstreamer/qgstreamerbushelper_p.h index e784f6e41..01d3ed826 100644 --- a/src/gsttools/qgstreamerbushelper_p.h +++ b/src/multimedia/gstreamer/qgstreamerbushelper_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <QObject> #include "qgstreamermessage_p.h" @@ -80,7 +80,7 @@ Q_DECLARE_INTERFACE(QGstreamerBusMessageFilter, QGstreamerBusMessageFilter_iid) class QGstreamerBusHelperPrivate; -class Q_GSTTOOLS_EXPORT QGstreamerBusHelper : public QObject +class Q_MULTIMEDIA_EXPORT QGstreamerBusHelper : public QObject { Q_OBJECT friend class QGstreamerBusHelperPrivate; diff --git a/src/gsttools/qgstreamermessage.cpp b/src/multimedia/gstreamer/qgstreamermessage.cpp index 7191565e1..7191565e1 100644 --- a/src/gsttools/qgstreamermessage.cpp +++ b/src/multimedia/gstreamer/qgstreamermessage.cpp diff --git a/src/gsttools/qgstreamermessage_p.h b/src/multimedia/gstreamer/qgstreamermessage_p.h index baeecc360..d552731d2 100644 --- a/src/gsttools/qgstreamermessage_p.h +++ b/src/multimedia/gstreamer/qgstreamermessage_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <QMetaType> #include <gst/gst.h> @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE // Required for QDoc workaround class QString; -class Q_GSTTOOLS_EXPORT QGstreamerMessage +class Q_MULTIMEDIA_EXPORT QGstreamerMessage { public: QGstreamerMessage() = default; diff --git a/src/gsttools/qgstreamerplayercontrol.cpp b/src/multimedia/gstreamer/qgstreamerplayercontrol.cpp index 8ad2e0e93..8ad2e0e93 100644 --- a/src/gsttools/qgstreamerplayercontrol.cpp +++ b/src/multimedia/gstreamer/qgstreamerplayercontrol.cpp diff --git a/src/gsttools/qgstreamerplayercontrol_p.h b/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h index c4cc2b876..875d0153b 100644 --- a/src/gsttools/qgstreamerplayercontrol_p.h +++ b/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h @@ -53,12 +53,12 @@ #include <QtCore/qstack.h> #include <qmediaplayercontrol.h> -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> QT_BEGIN_NAMESPACE class QGstreamerPlayerSession; -class Q_GSTTOOLS_EXPORT QGstreamerPlayerControl : public QMediaPlayerControl +class Q_MULTIMEDIA_EXPORT QGstreamerPlayerControl : public QMediaPlayerControl { Q_OBJECT diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/multimedia/gstreamer/qgstreamerplayersession.cpp index 2729097b5..2729097b5 100644 --- a/src/gsttools/qgstreamerplayersession.cpp +++ b/src/multimedia/gstreamer/qgstreamerplayersession.cpp diff --git a/src/gsttools/qgstreamerplayersession_p.h b/src/multimedia/gstreamer/qgstreamerplayersession_p.h index 6ce773d7a..f7d09ed3d 100644 --- a/src/gsttools/qgstreamerplayersession_p.h +++ b/src/multimedia/gstreamer/qgstreamerplayersession_p.h @@ -82,7 +82,7 @@ typedef enum { GST_AUTOPLUG_SELECT_SKIP } GstAutoplugSelectResult; -class Q_GSTTOOLS_EXPORT QGstreamerPlayerSession +class Q_MULTIMEDIA_EXPORT QGstreamerPlayerSession : public QObject , public QGstreamerBusMessageFilter { diff --git a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp b/src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol.cpp index 088b97101..088b97101 100644 --- a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp +++ b/src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol.cpp diff --git a/src/gsttools/qgstreamervideoinputdevicecontrol_p.h b/src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol_p.h index c8080a724..632b6dbb4 100644 --- a/src/gsttools/qgstreamervideoinputdevicecontrol_p.h +++ b/src/multimedia/gstreamer/qgstreamervideoinputdevicecontrol_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qvideodeviceselectorcontrol.h> #include <QtCore/qstringlist.h> @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl +class Q_MULTIMEDIA_EXPORT QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl { Q_OBJECT public: diff --git a/src/gsttools/qgstreamervideooverlay.cpp b/src/multimedia/gstreamer/qgstreamervideooverlay.cpp index df3229736..df3229736 100644 --- a/src/gsttools/qgstreamervideooverlay.cpp +++ b/src/multimedia/gstreamer/qgstreamervideooverlay.cpp diff --git a/src/gsttools/qgstreamervideooverlay_p.h b/src/multimedia/gstreamer/qgstreamervideooverlay_p.h index f2ca8a23b..883da8a4d 100644 --- a/src/gsttools/qgstreamervideooverlay_p.h +++ b/src/multimedia/gstreamer/qgstreamervideooverlay_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class QGstreamerSinkProperties; -class QGstreamerVideoOverlay +class Q_MULTIMEDIA_EXPORT QGstreamerVideoOverlay : public QObject , public QGstreamerSyncMessageFilter , public QGstreamerBusMessageFilter diff --git a/src/gsttools/qgstreamervideoprobecontrol.cpp b/src/multimedia/gstreamer/qgstreamervideoprobecontrol.cpp index 3d587eb2c..3d587eb2c 100644 --- a/src/gsttools/qgstreamervideoprobecontrol.cpp +++ b/src/multimedia/gstreamer/qgstreamervideoprobecontrol.cpp diff --git a/src/gsttools/qgstreamervideoprobecontrol_p.h b/src/multimedia/gstreamer/qgstreamervideoprobecontrol_p.h index 2876f3124..0c4b734b2 100644 --- a/src/gsttools/qgstreamervideoprobecontrol_p.h +++ b/src/multimedia/gstreamer/qgstreamervideoprobecontrol_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <gst/gst.h> #include <gst/video/video.h> #include <qmediavideoprobecontrol.h> @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerVideoProbeControl +class Q_MULTIMEDIA_EXPORT QGstreamerVideoProbeControl : public QMediaVideoProbeControl , public QGstreamerBufferProbe , public QSharedData diff --git a/src/gsttools/qgstreamervideorenderer.cpp b/src/multimedia/gstreamer/qgstreamervideorenderer.cpp index c6ca935a4..c6ca935a4 100644 --- a/src/gsttools/qgstreamervideorenderer.cpp +++ b/src/multimedia/gstreamer/qgstreamervideorenderer.cpp diff --git a/src/gsttools/qgstreamervideorenderer_p.h b/src/multimedia/gstreamer/qgstreamervideorenderer_p.h index df8c58da2..10d2c8e2e 100644 --- a/src/gsttools/qgstreamervideorenderer_p.h +++ b/src/multimedia/gstreamer/qgstreamervideorenderer_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <private/qgstvideorenderersink_p.h> #include <qvideorenderercontrol.h> #include <qabstractvideosurface.h> @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface +class Q_MULTIMEDIA_EXPORT QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface { Q_OBJECT Q_INTERFACES(QGstreamerVideoRendererInterface) diff --git a/src/gsttools/qgstreamervideorendererinterface.cpp b/src/multimedia/gstreamer/qgstreamervideorendererinterface.cpp index ae7de06f1..ae7de06f1 100644 --- a/src/gsttools/qgstreamervideorendererinterface.cpp +++ b/src/multimedia/gstreamer/qgstreamervideorendererinterface.cpp diff --git a/src/gsttools/qgstreamervideorendererinterface_p.h b/src/multimedia/gstreamer/qgstreamervideorendererinterface_p.h index 231c843db..af163c1b5 100644 --- a/src/gsttools/qgstreamervideorendererinterface_p.h +++ b/src/multimedia/gstreamer/qgstreamervideorendererinterface_p.h @@ -51,13 +51,14 @@ // We mean it. // +#include <private/qtmultimediaglobal_p.h> +#include <QtCore/qobject.h> #include <gst/gst.h> -#include <QtCore/qobject.h> QT_BEGIN_NAMESPACE -class QGstreamerVideoRendererInterface +class Q_MULTIMEDIA_EXPORT QGstreamerVideoRendererInterface { public: virtual ~QGstreamerVideoRendererInterface(); diff --git a/src/gsttools/qgstreamervideowindow.cpp b/src/multimedia/gstreamer/qgstreamervideowindow.cpp index e7e3c5044..e7e3c5044 100644 --- a/src/gsttools/qgstreamervideowindow.cpp +++ b/src/multimedia/gstreamer/qgstreamervideowindow.cpp diff --git a/src/gsttools/qgstreamervideowindow_p.h b/src/multimedia/gstreamer/qgstreamervideowindow_p.h index a0ed8599b..cae656347 100644 --- a/src/gsttools/qgstreamervideowindow_p.h +++ b/src/multimedia/gstreamer/qgstreamervideowindow_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qvideowindowcontrol.h> #include "qgstreamervideorendererinterface_p.h" @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE class QAbstractVideoSurface; -class Q_GSTTOOLS_EXPORT QGstreamerVideoWindow : +class Q_MULTIMEDIA_EXPORT QGstreamerVideoWindow : public QVideoWindowControl, public QGstreamerVideoRendererInterface, public QGstreamerSyncMessageFilter, diff --git a/src/gsttools/qgstutils.cpp b/src/multimedia/gstreamer/qgstutils.cpp index 8891aad87..8891aad87 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/multimedia/gstreamer/qgstutils.cpp diff --git a/src/gsttools/qgstutils_p.h b/src/multimedia/gstreamer/qgstutils_p.h index 6911f6427..853064707 100644 --- a/src/gsttools/qgstutils_p.h +++ b/src/multimedia/gstreamer/qgstutils_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <QtCore/qlist.h> #include <QtCore/qmap.h> #include <QtCore/qset.h> @@ -78,7 +78,7 @@ class QImage; class QVideoSurfaceFormat; namespace QGstUtils { - struct Q_GSTTOOLS_EXPORT CameraInfo + struct Q_MULTIMEDIA_EXPORT CameraInfo { QString name; QString description; @@ -87,70 +87,70 @@ namespace QGstUtils { QByteArray driver; }; - Q_GSTTOOLS_EXPORT QMap<QByteArray, QVariant> gstTagListToMap(const GstTagList *list); + Q_MULTIMEDIA_EXPORT QMap<QByteArray, QVariant> gstTagListToMap(const GstTagList *list); - Q_GSTTOOLS_EXPORT QSize capsResolution(const GstCaps *caps); - Q_GSTTOOLS_EXPORT QSize capsCorrectedResolution(const GstCaps *caps); - Q_GSTTOOLS_EXPORT QAudioFormat audioFormatForCaps(const GstCaps *caps); - Q_GSTTOOLS_EXPORT QAudioFormat audioFormatForSample(GstSample *sample); - Q_GSTTOOLS_EXPORT GstCaps *capsForAudioFormat(const QAudioFormat &format); - Q_GSTTOOLS_EXPORT void initializeGst(); - Q_GSTTOOLS_EXPORT QMultimedia::SupportEstimate hasSupport(const QString &mimeType, + Q_MULTIMEDIA_EXPORT QSize capsResolution(const GstCaps *caps); + Q_MULTIMEDIA_EXPORT QSize capsCorrectedResolution(const GstCaps *caps); + Q_MULTIMEDIA_EXPORT QAudioFormat audioFormatForCaps(const GstCaps *caps); + Q_MULTIMEDIA_EXPORT QAudioFormat audioFormatForSample(GstSample *sample); + Q_MULTIMEDIA_EXPORT GstCaps *capsForAudioFormat(const QAudioFormat &format); + Q_MULTIMEDIA_EXPORT void initializeGst(); + Q_MULTIMEDIA_EXPORT QMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList &codecs, const QSet<QString> &supportedMimeTypeSet); - Q_GSTTOOLS_EXPORT QList<CameraInfo> enumerateCameras(); - Q_GSTTOOLS_EXPORT QList<QByteArray> cameraDevices(); - Q_GSTTOOLS_EXPORT QString cameraDescription(const QString &device); - Q_GSTTOOLS_EXPORT QCamera::Position cameraPosition(const QString &device); - Q_GSTTOOLS_EXPORT int cameraOrientation(const QString &device); - Q_GSTTOOLS_EXPORT QByteArray cameraDriver(const QString &device); + Q_MULTIMEDIA_EXPORT QList<CameraInfo> enumerateCameras(); + Q_MULTIMEDIA_EXPORT QList<QByteArray> cameraDevices(); + Q_MULTIMEDIA_EXPORT QString cameraDescription(const QString &device); + Q_MULTIMEDIA_EXPORT QCamera::Position cameraPosition(const QString &device); + Q_MULTIMEDIA_EXPORT int cameraOrientation(const QString &device); + Q_MULTIMEDIA_EXPORT QByteArray cameraDriver(const QString &device); - Q_GSTTOOLS_EXPORT const QSet<GstDevice *> &audioSources(); - Q_GSTTOOLS_EXPORT const QSet<GstDevice *> &audioSinks(); + Q_MULTIMEDIA_EXPORT const QSet<GstDevice *> &audioSources(); + Q_MULTIMEDIA_EXPORT const QSet<GstDevice *> &audioSinks(); - Q_GSTTOOLS_EXPORT QSet<QString> supportedMimeTypes(bool (*isValidFactory)(GstElementFactory *factory)); + Q_MULTIMEDIA_EXPORT QSet<QString> supportedMimeTypes(bool (*isValidFactory)(GstElementFactory *factory)); - Q_GSTTOOLS_EXPORT QImage bufferToImage(GstBuffer *buffer, const GstVideoInfo &info); - Q_GSTTOOLS_EXPORT QVideoSurfaceFormat formatForCaps( + Q_MULTIMEDIA_EXPORT QImage bufferToImage(GstBuffer *buffer, const GstVideoInfo &info); + Q_MULTIMEDIA_EXPORT QVideoSurfaceFormat formatForCaps( GstCaps *caps, GstVideoInfo *info = 0, QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle); - Q_GSTTOOLS_EXPORT GstCaps *capsForFormats(const QList<QVideoFrame::PixelFormat> &formats); + Q_MULTIMEDIA_EXPORT GstCaps *capsForFormats(const QList<QVideoFrame::PixelFormat> &formats); void setFrameTimeStamps(QVideoFrame *frame, GstBuffer *buffer); - Q_GSTTOOLS_EXPORT void setMetaData(GstElement *element, const QMap<QByteArray, QVariant> &data); - Q_GSTTOOLS_EXPORT void setMetaData(GstBin *bin, const QMap<QByteArray, QVariant> &data); + Q_MULTIMEDIA_EXPORT void setMetaData(GstElement *element, const QMap<QByteArray, QVariant> &data); + Q_MULTIMEDIA_EXPORT void setMetaData(GstBin *bin, const QMap<QByteArray, QVariant> &data); - Q_GSTTOOLS_EXPORT GstCaps *videoFilterCaps(); + Q_MULTIMEDIA_EXPORT GstCaps *videoFilterCaps(); - Q_GSTTOOLS_EXPORT QSize structureResolution(const GstStructure *s); - Q_GSTTOOLS_EXPORT QVideoFrame::PixelFormat structurePixelFormat(const GstStructure *s); - Q_GSTTOOLS_EXPORT QSize structurePixelAspectRatio(const GstStructure *s); - Q_GSTTOOLS_EXPORT QPair<qreal, qreal> structureFrameRateRange(const GstStructure *s); + Q_MULTIMEDIA_EXPORT QSize structureResolution(const GstStructure *s); + Q_MULTIMEDIA_EXPORT QVideoFrame::PixelFormat structurePixelFormat(const GstStructure *s); + Q_MULTIMEDIA_EXPORT QSize structurePixelAspectRatio(const GstStructure *s); + Q_MULTIMEDIA_EXPORT QPair<qreal, qreal> structureFrameRateRange(const GstStructure *s); - Q_GSTTOOLS_EXPORT QString fileExtensionForMimeType(const QString &mimeType); + Q_MULTIMEDIA_EXPORT QString fileExtensionForMimeType(const QString &mimeType); - Q_GSTTOOLS_EXPORT QVariant fromGStreamerOrientation(const QVariant &value); - Q_GSTTOOLS_EXPORT QVariant toGStreamerOrientation(const QVariant &value); + Q_MULTIMEDIA_EXPORT QVariant fromGStreamerOrientation(const QVariant &value); + Q_MULTIMEDIA_EXPORT QVariant toGStreamerOrientation(const QVariant &value); - Q_GSTTOOLS_EXPORT bool useOpenGL(); + Q_MULTIMEDIA_EXPORT bool useOpenGL(); } -Q_GSTTOOLS_EXPORT void qt_gst_object_ref_sink(gpointer object); -Q_GSTTOOLS_EXPORT GstCaps *qt_gst_pad_get_current_caps(GstPad *pad); -Q_GSTTOOLS_EXPORT GstCaps *qt_gst_pad_get_caps(GstPad *pad); -Q_GSTTOOLS_EXPORT GstStructure *qt_gst_structure_new_empty(const char *name); -Q_GSTTOOLS_EXPORT gboolean qt_gst_element_query_position(GstElement *element, GstFormat format, gint64 *cur); -Q_GSTTOOLS_EXPORT gboolean qt_gst_element_query_duration(GstElement *element, GstFormat format, gint64 *cur); -Q_GSTTOOLS_EXPORT GstCaps *qt_gst_caps_normalize(GstCaps *caps); -Q_GSTTOOLS_EXPORT const gchar *qt_gst_element_get_factory_name(GstElement *element); -Q_GSTTOOLS_EXPORT gboolean qt_gst_caps_can_intersect(const GstCaps * caps1, const GstCaps * caps2); -Q_GSTTOOLS_EXPORT GList *qt_gst_video_sinks(); -Q_GSTTOOLS_EXPORT void qt_gst_util_double_to_fraction(gdouble src, gint *dest_n, gint *dest_d); - -Q_GSTTOOLS_EXPORT QDebug operator <<(QDebug debug, GstCaps *caps); +Q_MULTIMEDIA_EXPORT void qt_gst_object_ref_sink(gpointer object); +Q_MULTIMEDIA_EXPORT GstCaps *qt_gst_pad_get_current_caps(GstPad *pad); +Q_MULTIMEDIA_EXPORT GstCaps *qt_gst_pad_get_caps(GstPad *pad); +Q_MULTIMEDIA_EXPORT GstStructure *qt_gst_structure_new_empty(const char *name); +Q_MULTIMEDIA_EXPORT gboolean qt_gst_element_query_position(GstElement *element, GstFormat format, gint64 *cur); +Q_MULTIMEDIA_EXPORT gboolean qt_gst_element_query_duration(GstElement *element, GstFormat format, gint64 *cur); +Q_MULTIMEDIA_EXPORT GstCaps *qt_gst_caps_normalize(GstCaps *caps); +Q_MULTIMEDIA_EXPORT const gchar *qt_gst_element_get_factory_name(GstElement *element); +Q_MULTIMEDIA_EXPORT gboolean qt_gst_caps_can_intersect(const GstCaps * caps1, const GstCaps * caps2); +Q_MULTIMEDIA_EXPORT GList *qt_gst_video_sinks(); +Q_MULTIMEDIA_EXPORT void qt_gst_util_double_to_fraction(gdouble src, gint *dest_n, gint *dest_d); + +Q_MULTIMEDIA_EXPORT QDebug operator <<(QDebug debug, GstCaps *caps); QT_END_NAMESPACE diff --git a/src/gsttools/qgstvideobuffer.cpp b/src/multimedia/gstreamer/qgstvideobuffer.cpp index 58738ffa0..58738ffa0 100644 --- a/src/gsttools/qgstvideobuffer.cpp +++ b/src/multimedia/gstreamer/qgstvideobuffer.cpp diff --git a/src/gsttools/qgstvideobuffer_p.h b/src/multimedia/gstreamer/qgstvideobuffer_p.h index 4dc45a370..11a217f51 100644 --- a/src/gsttools/qgstvideobuffer_p.h +++ b/src/multimedia/gstreamer/qgstvideobuffer_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qabstractvideobuffer.h> #include <QtCore/qvariant.h> @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstVideoBuffer : public QAbstractVideoBuffer +class Q_MULTIMEDIA_EXPORT QGstVideoBuffer : public QAbstractVideoBuffer { public: QGstVideoBuffer(GstBuffer *buffer, const GstVideoInfo &info); diff --git a/src/gsttools/qgstvideorendererplugin.cpp b/src/multimedia/gstreamer/qgstvideorendererplugin.cpp index 22028ac0e..1b63cbfa8 100644 --- a/src/gsttools/qgstvideorendererplugin.cpp +++ b/src/multimedia/gstreamer/qgstvideorendererplugin.cpp @@ -46,6 +46,14 @@ QGstVideoRendererPlugin::QGstVideoRendererPlugin(QObject *parent) : { } +QGstVideoRenderer::~QGstVideoRenderer() {} + +QGstVideoRendererInterface::~QGstVideoRendererInterface() {} + +QGstVideoRendererPlugin::~QGstVideoRendererPlugin() {} + QT_END_NAMESPACE #include "moc_qgstvideorendererplugin_p.cpp" + + diff --git a/src/gsttools/qgstvideorendererplugin_p.h b/src/multimedia/gstreamer/qgstvideorendererplugin_p.h index 3635fea35..d6f13062e 100644 --- a/src/gsttools/qgstvideorendererplugin_p.h +++ b/src/multimedia/gstreamer/qgstvideorendererplugin_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qabstractvideobuffer.h> #include <qvideosurfaceformat.h> #include <QtCore/qobject.h> @@ -63,10 +63,14 @@ QT_BEGIN_NAMESPACE class QAbstractVideoSurface; -class Q_GSTTOOLS_EXPORT QGstVideoRenderer +#ifndef Q_MULTIMEDIA_EXPORT +#error XXX +#endif + +class Q_MULTIMEDIA_EXPORT QGstVideoRenderer { public: - virtual ~QGstVideoRenderer() {} + virtual ~QGstVideoRenderer(); virtual GstCaps *getCaps(QAbstractVideoSurface *surface) = 0; virtual bool start(QAbstractVideoSurface *surface, GstCaps *caps) = 0; @@ -80,10 +84,10 @@ public: /* Abstract interface for video buffers allocation. */ -class Q_GSTTOOLS_EXPORT QGstVideoRendererInterface +class Q_MULTIMEDIA_EXPORT QGstVideoRendererInterface { public: - virtual ~QGstVideoRendererInterface() {} + virtual ~QGstVideoRendererInterface(); virtual QGstVideoRenderer *createRenderer() = 0; }; @@ -91,13 +95,13 @@ public: #define QGstVideoRendererInterface_iid "org.qt-project.qt.gstvideorenderer/5.4" Q_DECLARE_INTERFACE(QGstVideoRendererInterface, QGstVideoRendererInterface_iid) -class Q_GSTTOOLS_EXPORT QGstVideoRendererPlugin : public QObject, public QGstVideoRendererInterface +class Q_MULTIMEDIA_EXPORT QGstVideoRendererPlugin : public QObject, public QGstVideoRendererInterface { Q_OBJECT Q_INTERFACES(QGstVideoRendererInterface) public: explicit QGstVideoRendererPlugin(QObject *parent = 0); - virtual ~QGstVideoRendererPlugin() {} + virtual ~QGstVideoRendererPlugin(); QGstVideoRenderer *createRenderer() override = 0; diff --git a/src/gsttools/qgstvideorenderersink.cpp b/src/multimedia/gstreamer/qgstvideorenderersink.cpp index 0f930cf02..0f930cf02 100644 --- a/src/gsttools/qgstvideorenderersink.cpp +++ b/src/multimedia/gstreamer/qgstvideorenderersink.cpp diff --git a/src/gsttools/qgstvideorenderersink_p.h b/src/multimedia/gstreamer/qgstvideorenderersink_p.h index 81bcb5c02..0b05bbe83 100644 --- a/src/gsttools/qgstvideorenderersink_p.h +++ b/src/multimedia/gstreamer/qgstvideorenderersink_p.h @@ -151,7 +151,7 @@ private: bool m_flush = false; }; -class Q_GSTTOOLS_EXPORT QGstVideoRendererSink +class Q_MULTIMEDIA_EXPORT QGstVideoRendererSink { public: GstVideoSink parent; diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro index e0874c4aa..7ddcbcc61 100644 --- a/src/multimedia/multimedia.pro +++ b/src/multimedia/multimedia.pro @@ -74,6 +74,7 @@ MODULE_WINRT_CAPABILITIES_DEVICE += \ webcam qtConfig(gstreamer) { + include(gstreamer/gstreamer.pri) ANDROID_LIB_DEPENDENCIES += \ plugins/mediaservice/libgstcamerabin.so \ plugins/mediaservice/libgstmediacapture.so \ diff --git a/src/multimediawidgets/CMakeLists.txt b/src/multimediawidgets/CMakeLists.txt index 313027ebc..7b159d659 100644 --- a/src/multimediawidgets/CMakeLists.txt +++ b/src/multimediawidgets/CMakeLists.txt @@ -38,6 +38,11 @@ qt_extend_target(MultimediaWidgets CONDITION QT_FEATURE_graphicsview qgraphicsvideoitem.cpp qgraphicsvideoitem.h # special case ) +qt_extend_target(MultimediaWidgets CONDITION QT_FEATURE_gstreamer + SOURCES + gstreamer/qgstreamervideowidget.cpp gstreamer/qgstreamervideowidget_p.h +) + #### Keys ignored in scope 3:.:.:multimediawidgets.pro:QT_FEATURE_graphicsview: # PUBLIC_HEADERS = "qgraphicsvideoitem.h" diff --git a/src/multimediawidgets/gstreamer/gstreamer.pri b/src/multimediawidgets/gstreamer/gstreamer.pri new file mode 100644 index 000000000..dc332c249 --- /dev/null +++ b/src/multimediawidgets/gstreamer/gstreamer.pri @@ -0,0 +1,4 @@ +QMAKE_USE_PRIVATE += gstreamer + +SOURCES += gstreamer/qgstreamervideowidget.cpp +HEADERS += gstreamer/qgstreamervideowidget_p.h diff --git a/src/gsttools/qgstreamervideowidget.cpp b/src/multimediawidgets/gstreamer/qgstreamervideowidget.cpp index 4137aff32..e1c8fe47c 100644 --- a/src/gsttools/qgstreamervideowidget.cpp +++ b/src/multimediawidgets/gstreamer/qgstreamervideowidget.cpp @@ -38,7 +38,7 @@ ****************************************************************************/ #include "qgstreamervideowidget_p.h" -#include "qgstutils_p.h" +#include "private/qgstutils_p.h" #include <QtCore/qcoreevent.h> #include <QtCore/qdebug.h> diff --git a/src/gsttools/qgstreamervideowidget_p.h b/src/multimediawidgets/gstreamer/qgstreamervideowidget_p.h index 6eec6ae52..38985ebd0 100644 --- a/src/gsttools/qgstreamervideowidget_p.h +++ b/src/multimediawidgets/gstreamer/qgstreamervideowidget_p.h @@ -51,18 +51,18 @@ // We mean it. // -#include <private/qgsttools_global_p.h> +#include <private/qtmultimediaglobal_p.h> #include <qvideowidgetcontrol.h> -#include "qgstreamervideorendererinterface_p.h" +#include <private/qgstreamervideorendererinterface_p.h> #include <private/qgstreamerbushelper_p.h> #include <private/qgstreamervideooverlay_p.h> QT_BEGIN_NAMESPACE -class Q_GSTTOOLS_EXPORT QGstreamerVideoWidget; +class Q_MULTIMEDIA_EXPORT QGstreamerVideoWidget; -class Q_GSTTOOLS_EXPORT QGstreamerVideoWidgetControl +class Q_MULTIMEDIA_EXPORT QGstreamerVideoWidgetControl : public QVideoWidgetControl , public QGstreamerVideoRendererInterface , public QGstreamerSyncMessageFilter diff --git a/src/multimediawidgets/multimediawidgets.pro b/src/multimediawidgets/multimediawidgets.pro index fcc908d14..b8204ef07 100644 --- a/src/multimediawidgets/multimediawidgets.pro +++ b/src/multimediawidgets/multimediawidgets.pro @@ -26,6 +26,7 @@ qtConfig(graphicsview) { PUBLIC_HEADERS += qgraphicsvideoitem.h } +qtConfig(gstreamer):include(gstreamer/gstreamer.pri) HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS diff --git a/src/plugins/gstreamer/audiodecoder/CMakeLists.txt b/src/plugins/gstreamer/audiodecoder/CMakeLists.txt index 7aba3e375..019cd5a48 100644 --- a/src/plugins/gstreamer/audiodecoder/CMakeLists.txt +++ b/src/plugins/gstreamer/audiodecoder/CMakeLists.txt @@ -20,7 +20,7 @@ qt_internal_add_plugin(QGstreamerAudioDecoderServicePlugin Qt::MultimediaPrivate Qt::Network gstreamer - multimediagsttoolsPrivate + Qt::MultimediaPrivate ) #### Keys ignored in scope 1:.:.:audiodecoder.pro:<TRUE>: diff --git a/src/plugins/gstreamer/camerabin/CMakeLists.txt b/src/plugins/gstreamer/camerabin/CMakeLists.txt index 9584979b3..2ef2f7572 100644 --- a/src/plugins/gstreamer/camerabin/CMakeLists.txt +++ b/src/plugins/gstreamer/camerabin/CMakeLists.txt @@ -34,7 +34,7 @@ qt_internal_add_plugin(CameraBinServicePlugin Qt::MultimediaPrivate Qt::Network gstreamer - multimediagsttoolsPrivate + Qt::MultimediaPrivate ) #### Keys ignored in scope 1:.:.:camerabin.pro:<TRUE>: diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro index 728608074..0623dbc2b 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.pro +++ b/src/plugins/gstreamer/camerabin/camerabin.pro @@ -51,6 +51,8 @@ qtConfig(gstreamer_photography) { DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API } +qtConfig(gstreamer_gl): QMAKE_USE += gstreamer_gl + qtConfig(linux_v4l) { HEADERS += \ $$PWD/camerabinv4limageprocessing.h diff --git a/src/plugins/gstreamer/common.pri b/src/plugins/gstreamer/common.pri index c81a65c05..8e5c381ae 100644 --- a/src/plugins/gstreamer/common.pri +++ b/src/plugins/gstreamer/common.pri @@ -1,4 +1,4 @@ -QT += core-private multimedia-private multimediagsttools-private network +QT += core-private multimedia-private network qtHaveModule(widgets) { QT += widgets multimediawidgets-private diff --git a/src/plugins/gstreamer/mediacapture/CMakeLists.txt b/src/plugins/gstreamer/mediacapture/CMakeLists.txt index a52c2f7b9..763d9a3c9 100644 --- a/src/plugins/gstreamer/mediacapture/CMakeLists.txt +++ b/src/plugins/gstreamer/mediacapture/CMakeLists.txt @@ -28,7 +28,7 @@ qt_internal_add_plugin(QGstreamerCaptureServicePlugin Qt::MultimediaPrivate Qt::Network gstreamer - multimediagsttoolsPrivate + Qt::MultimediaPrivate ) ## Scopes: diff --git a/src/plugins/gstreamer/mediaplayer/CMakeLists.txt b/src/plugins/gstreamer/mediaplayer/CMakeLists.txt index 7b3d8ade2..5bbb26bb9 100644 --- a/src/plugins/gstreamer/mediaplayer/CMakeLists.txt +++ b/src/plugins/gstreamer/mediaplayer/CMakeLists.txt @@ -21,7 +21,7 @@ qt_internal_add_plugin(QGstreamerPlayerServicePlugin Qt::MultimediaPrivate Qt::Network gstreamer - multimediagsttoolsPrivate + Qt::MultimediaPrivate ) #### Keys ignored in scope 1:.:.:mediaplayer.pro:<TRUE>: diff --git a/src/plugins/videonode/imx6/CMakeLists.txt b/src/plugins/videonode/imx6/CMakeLists.txt index 7f61a45fc..412795e9c 100644 --- a/src/plugins/videonode/imx6/CMakeLists.txt +++ b/src/plugins/videonode/imx6/CMakeLists.txt @@ -18,7 +18,6 @@ qt_internal_add_plugin(QSGVivanteVideoNodeFactory Qt::MultimediaPrivate Qt::MultimediaQuickPrivate gstreamer - multimediagsttoolsPrivate ) # Resources: diff --git a/src/plugins/videonode/imx6/imx6.pro b/src/plugins/videonode/imx6/imx6.pro index 4b2a2e720..42769a8fe 100644 --- a/src/plugins/videonode/imx6/imx6.pro +++ b/src/plugins/videonode/imx6/imx6.pro @@ -1,6 +1,6 @@ TARGET = imx6vivantevideonode -QT += multimedia-private qtmultimediaquicktools-private multimediagsttools-private +QT += multimedia-private qtmultimediaquicktools-private QMAKE_USE += gstreamer diff --git a/src/src.pro b/src/src.pro index 1dc1015c6..c1ed05164 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,9 +6,6 @@ include($$OUT_PWD/multimedia/qtmultimedia-config.pri) QT_FOR_CONFIG += multimedia-private # Everything else depends on multimedia -src_qgsttools.subdir = gsttools -src_qgsttools.depends = multimedia - src_qtmmwidgets.subdir = multimediawidgets src_qtmmwidgets.depends = multimedia @@ -37,16 +34,6 @@ qtHaveModule(widgets) { # If widgets is around, plugins depends on widgets too (imports does not) src_plugins.depends += src_qtmmwidgets - - # same with qgsttools - src_qgsttools.depends += src_qtmmwidgets -} - -qtConfig(gstreamer) { - SUBDIRS += src_qgsttools - - # If gstreamer is present, then plugins should depend on it - src_plugins.depends += src_qgsttools } SUBDIRS += src_plugins diff --git a/sync.profile b/sync.profile index 2ac22b5bd..16c2b00ec 100644 --- a/sync.profile +++ b/sync.profile @@ -2,7 +2,6 @@ "QtMultimedia" => "$basedir/src/multimedia", "QtMultimediaWidgets" => "$basedir/src/multimediawidgets", "QtMultimediaQuick" => "$basedir/src/qtmultimediaquicktools", - "QtMultimediaGstTools" => "$basedir/src/gsttools", ); %moduleheaders = ( # restrict the module headers to those found in relative path |