diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index edbf603e30aa3619d361fac5d9cc8352f63aa1d6..f5e3fd96f43df033fe7d5ef2245d99f0d9bad908 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -1,7 +1,6 @@ -TEMPLATE = lib - -TARGET = qgsttools_p -QPRO_PWD = $$PWD +TARGET = QtMultimediaGstTools +MODULE = multimediagsttools +CONFIG += internal_module QT = core-private multimedia-private gui-private @@ -36,7 +35,8 @@ PRIVATE_HEADERS += \ qgstreamervideoprobecontrol_p.h \ qgstreameraudioprobecontrol_p.h \ qgstreamervideowindow_p.h \ - qgstreamervideooverlay_p.h + qgstreamervideooverlay_p.h \ + qgsttools_global_p.h SOURCES += \ qgstreamerbushelper.cpp \ @@ -101,7 +101,4 @@ qtConfig(gstreamer_app) { HEADERS += $$PRIVATE_HEADERS -DESTDIR = $$QT.multimedia.libs -target.path = $$[QT_INSTALL_LIBS] - -INSTALLS += target +load(qt_module) diff --git a/src/multimedia/gsttools_headers/gstvideoconnector_p.h b/src/multimedia/gsttools_headers/gstvideoconnector_p.h index 4fa1456c8de183891919718cb2d40015037bb070..a38ca2e656021a0377a7695b0a6f695543dfd37a 100644 --- a/src/multimedia/gsttools_headers/gstvideoconnector_p.h +++ b/src/multimedia/gsttools_headers/gstvideoconnector_p.h @@ -51,6 +51,8 @@ // We mean it. // +#include <private/qgsttools_global_p.h> + #include <gst/gst.h> G_BEGIN_DECLS @@ -69,7 +71,7 @@ G_BEGIN_DECLS typedef struct _GstVideoConnector GstVideoConnector; typedef struct _GstVideoConnectorClass GstVideoConnectorClass; -struct _GstVideoConnector { +struct Q_GSTTOOLS_EXPORT _GstVideoConnector { GstElement element; GstPad *srcpad; @@ -81,14 +83,14 @@ struct _GstVideoConnector { GstBuffer *latest_buffer; }; -struct _GstVideoConnectorClass { +struct Q_GSTTOOLS_EXPORT _GstVideoConnectorClass { GstElementClass parent_class; /* action signal to resend new segment */ void (*resend_new_segment) (GstElement * element, gboolean emitFailedSignal); }; -GType gst_video_connector_get_type (void); +GType Q_GSTTOOLS_EXPORT gst_video_connector_get_type (void); G_END_DECLS diff --git a/src/multimedia/gsttools_headers/qgstappsrc_p.h b/src/multimedia/gsttools_headers/qgstappsrc_p.h index e509152317e17fb2240ac059c05dc616d5e06d9c..c7e87037d954ad0c25ac08390a481d7d1e1c58c6 100644 --- a/src/multimedia/gsttools_headers/qgstappsrc_p.h +++ b/src/multimedia/gsttools_headers/qgstappsrc_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <QtCore/qobject.h> #include <QtCore/qiodevice.h> @@ -63,7 +64,7 @@ QT_BEGIN_NAMESPACE -class QGstAppSrc : public QObject +class Q_GSTTOOLS_EXPORT QGstAppSrc : public QObject { Q_OBJECT public: diff --git a/src/multimedia/gsttools_headers/qgstbufferpoolinterface_p.h b/src/multimedia/gsttools_headers/qgstbufferpoolinterface_p.h index e03da1ab57a2b00228cfd89baa6a95d41adb9db8..45e573262eb87c53edf13fdbd604ed2c5b788423 100644 --- a/src/multimedia/gsttools_headers/qgstbufferpoolinterface_p.h +++ b/src/multimedia/gsttools_headers/qgstbufferpoolinterface_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qabstractvideobuffer.h> #include <qvideosurfaceformat.h> #include <QtCore/qobject.h> @@ -65,7 +66,7 @@ const QLatin1String QGstBufferPoolPluginKey("bufferpool"); /*! Abstract interface for video buffers allocation. */ -class QGstBufferPoolInterface +class Q_GSTTOOLS_EXPORT QGstBufferPoolInterface { public: virtual ~QGstBufferPoolInterface() {} diff --git a/src/multimedia/gsttools_headers/qgstcodecsinfo_p.h b/src/multimedia/gsttools_headers/qgstcodecsinfo_p.h index af1a4486fbec6c527e095ceb9a3acd0c6f7c4419..33ab3de4bf61b98d8bd2c47fac7db43906b6abb8 100644 --- a/src/multimedia/gsttools_headers/qgstcodecsinfo_p.h +++ b/src/multimedia/gsttools_headers/qgstcodecsinfo_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <QtCore/qmap.h> #include <QtCore/qstringlist.h> @@ -58,7 +59,7 @@ QT_BEGIN_NAMESPACE -class QGstCodecsInfo +class Q_GSTTOOLS_EXPORT QGstCodecsInfo { public: enum ElementType { AudioEncoder, VideoEncoder, Muxer }; diff --git a/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h b/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h index 1a961c6d98c98ba81034958828b0c58f08ca5bf4..0c193fda9a0c5067395b0c003d2c869e1e2da081 100644 --- a/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h +++ b/src/multimedia/gsttools_headers/qgstreameraudioinputselector_p.h @@ -51,12 +51,13 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qaudioinputselectorcontrol.h> #include <QtCore/qstringlist.h> QT_BEGIN_NAMESPACE -class QGstreamerAudioInputSelector : public QAudioInputSelectorControl +class Q_GSTTOOLS_EXPORT QGstreamerAudioInputSelector : public QAudioInputSelectorControl { Q_OBJECT public: diff --git a/src/multimedia/gsttools_headers/qgstreameraudioprobecontrol_p.h b/src/multimedia/gsttools_headers/qgstreameraudioprobecontrol_p.h index bacf8c71d2f8612cf1796543e25c8c7cad2e54a9..4fc5c770446ed793a78447b072ba65ce4987b894 100644 --- a/src/multimedia/gsttools_headers/qgstreameraudioprobecontrol_p.h +++ b/src/multimedia/gsttools_headers/qgstreameraudioprobecontrol_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <gst/gst.h> #include <qmediaaudioprobecontrol.h> #include <QtCore/qmutex.h> @@ -61,7 +62,7 @@ QT_BEGIN_NAMESPACE -class QGstreamerAudioProbeControl +class Q_GSTTOOLS_EXPORT QGstreamerAudioProbeControl : public QMediaAudioProbeControl , public QGstreamerBufferProbe , public QSharedData diff --git a/src/multimedia/gsttools_headers/qgstreamerbufferprobe_p.h b/src/multimedia/gsttools_headers/qgstreamerbufferprobe_p.h index f7ba2bbd924da61ebbadceec746fc9b6516fc82d..35644f93416c85a05dc6ec4090dbe7de66603d3f 100644 --- a/src/multimedia/gsttools_headers/qgstreamerbufferprobe_p.h +++ b/src/multimedia/gsttools_headers/qgstreamerbufferprobe_p.h @@ -51,13 +51,15 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <gst/gst.h> #include <QtCore/qglobal.h> + QT_BEGIN_NAMESPACE -class QGstreamerBufferProbe +class Q_GSTTOOLS_EXPORT QGstreamerBufferProbe { public: enum Flags diff --git a/src/multimedia/gsttools_headers/qgstreamerbushelper_p.h b/src/multimedia/gsttools_headers/qgstreamerbushelper_p.h index 3216c07dabd07ca50f9bec28417d8450d8c088ef..c7d06faf8f8de09427a185ba8b70ce22f2511369 100644 --- a/src/multimedia/gsttools_headers/qgstreamerbushelper_p.h +++ b/src/multimedia/gsttools_headers/qgstreamerbushelper_p.h @@ -51,9 +51,11 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <QObject> #include "qgstreamermessage_p.h" + #include <gst/gst.h> QT_BEGIN_NAMESPACE @@ -78,7 +80,7 @@ Q_DECLARE_INTERFACE(QGstreamerBusMessageFilter, QGstreamerBusMessageFilter_iid) class QGstreamerBusHelperPrivate; -class QGstreamerBusHelper : public QObject +class Q_GSTTOOLS_EXPORT QGstreamerBusHelper : public QObject { Q_OBJECT friend class QGstreamerBusHelperPrivate; diff --git a/src/multimedia/gsttools_headers/qgstreamermessage_p.h b/src/multimedia/gsttools_headers/qgstreamermessage_p.h index 5d832ccfa9d325a71d91dacafedca0d92a396baa..2f9d1745ca00b71882cb2be641a57f50df038ff5 100644 --- a/src/multimedia/gsttools_headers/qgstreamermessage_p.h +++ b/src/multimedia/gsttools_headers/qgstreamermessage_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <QMetaType> #include <gst/gst.h> @@ -60,7 +61,7 @@ QT_BEGIN_NAMESPACE // Required for QDoc workaround class QString; -class QGstreamerMessage +class Q_GSTTOOLS_EXPORT QGstreamerMessage { public: QGstreamerMessage(); diff --git a/src/multimedia/gsttools_headers/qgstreamervideoinputdevicecontrol_p.h b/src/multimedia/gsttools_headers/qgstreamervideoinputdevicecontrol_p.h index e1ac453c7684af118af22c39af8af63534170d86..b660cc7b3b5603faac15437de6d35203e7ad00f3 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideoinputdevicecontrol_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideoinputdevicecontrol_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qvideodeviceselectorcontrol.h> #include <QtCore/qstringlist.h> @@ -59,7 +60,7 @@ QT_BEGIN_NAMESPACE -class QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl +class Q_GSTTOOLS_EXPORT QGstreamerVideoInputDeviceControl : public QVideoDeviceSelectorControl { Q_OBJECT public: diff --git a/src/multimedia/gsttools_headers/qgstreamervideoprobecontrol_p.h b/src/multimedia/gsttools_headers/qgstreamervideoprobecontrol_p.h index b599b0e7878c15ce40ec03a67ca30fd2acad46be..b15b6099c8fb4670b67c88f0d710097e6b48f119 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideoprobecontrol_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideoprobecontrol_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <gst/gst.h> #include <gst/video/video.h> #include <qmediavideoprobecontrol.h> @@ -62,7 +63,7 @@ QT_BEGIN_NAMESPACE -class QGstreamerVideoProbeControl +class Q_GSTTOOLS_EXPORT QGstreamerVideoProbeControl : public QMediaVideoProbeControl , public QGstreamerBufferProbe , public QSharedData diff --git a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h index 1d22e1125c43b4fcabb4d38241cfa84d4cc5fc79..2f0b80d45b126c4eae1b59f53324bdf6d6058e1b 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qvideorenderercontrol.h> #include <private/qvideosurfacegstsink_p.h> #include <qabstractvideosurface.h> @@ -59,7 +60,7 @@ QT_BEGIN_NAMESPACE -class QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface +class Q_GSTTOOLS_EXPORT QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface { Q_OBJECT Q_INTERFACES(QGstreamerVideoRendererInterface) diff --git a/src/multimedia/gsttools_headers/qgstreamervideowidget_p.h b/src/multimedia/gsttools_headers/qgstreamervideowidget_p.h index b2dfece602dad13613c823a7f07fcf84a3500c6b..3e324072565f1d68aea06ffb30f8e518d7f5524a 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideowidget_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideowidget_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qvideowidgetcontrol.h> #include "qgstreamervideorendererinterface_p.h" @@ -59,9 +60,9 @@ QT_BEGIN_NAMESPACE -class QGstreamerVideoWidget; +class Q_GSTTOOLS_EXPORT QGstreamerVideoWidget; -class QGstreamerVideoWidgetControl +class Q_GSTTOOLS_EXPORT QGstreamerVideoWidgetControl : public QVideoWidgetControl , public QGstreamerVideoRendererInterface , public QGstreamerSyncMessageFilter diff --git a/src/multimedia/gsttools_headers/qgstreamervideowindow_p.h b/src/multimedia/gsttools_headers/qgstreamervideowindow_p.h index b489650f950ffc1642e79c4837dc8bc0e979f882..5f893f10e3c42c691cf906f29109a9028b38024c 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideowindow_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideowindow_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qvideowindowcontrol.h> #include "qgstreamervideorendererinterface_p.h" @@ -61,7 +62,7 @@ QT_BEGIN_NAMESPACE class QAbstractVideoSurface; -class QGstreamerVideoWindow : +class Q_GSTTOOLS_EXPORT QGstreamerVideoWindow : public QVideoWindowControl, public QGstreamerVideoRendererInterface, public QGstreamerSyncMessageFilter, diff --git a/src/multimedia/gsttools_headers/qgsttools_global_p.h b/src/multimedia/gsttools_headers/qgsttools_global_p.h new file mode 100644 index 0000000000000000000000000000000000000000..babcd3aaf0f663976dcddb38292430ed897b7ede --- /dev/null +++ b/src/multimedia/gsttools_headers/qgsttools_global_p.h @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** 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/gsttools_headers/qgstutils_p.h b/src/multimedia/gsttools_headers/qgstutils_p.h index 8b7de3661dea317bed04b6af0a662b97d9cd875a..24d3e889d4f2e17954398908c69ed4aa23e4610b 100644 --- a/src/multimedia/gsttools_headers/qgstutils_p.h +++ b/src/multimedia/gsttools_headers/qgstutils_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <QtCore/qmap.h> #include <QtCore/qset.h> #include <QtCore/qvector.h> @@ -85,7 +86,7 @@ class QImage; class QVideoSurfaceFormat; namespace QGstUtils { - struct CameraInfo + struct Q_GSTTOOLS_EXPORT CameraInfo { QString name; QString description; @@ -94,74 +95,74 @@ namespace QGstUtils { QByteArray driver; }; - QMap<QByteArray, QVariant> gstTagListToMap(const GstTagList *list); + Q_GSTTOOLS_EXPORT QMap<QByteArray, QVariant> gstTagListToMap(const GstTagList *list); - QSize capsResolution(const GstCaps *caps); - QSize capsCorrectedResolution(const GstCaps *caps); - QAudioFormat audioFormatForCaps(const GstCaps *caps); + Q_GSTTOOLS_EXPORT QSize capsResolution(const GstCaps *caps); + Q_GSTTOOLS_EXPORT QSize capsCorrectedResolution(const GstCaps *caps); + Q_GSTTOOLS_EXPORT QAudioFormat audioFormatForCaps(const GstCaps *caps); #if GST_CHECK_VERSION(1,0,0) - QAudioFormat audioFormatForSample(GstSample *sample); + Q_GSTTOOLS_EXPORT QAudioFormat audioFormatForSample(GstSample *sample); #else - QAudioFormat audioFormatForBuffer(GstBuffer *buffer); + Q_GSTTOOLS_EXPORT QAudioFormat audioFormatForBuffer(GstBuffer *buffer); #endif - GstCaps *capsForAudioFormat(const QAudioFormat &format); - void initializeGst(); - QMultimedia::SupportEstimate hasSupport(const QString &mimeType, + Q_GSTTOOLS_EXPORT GstCaps *capsForAudioFormat(const QAudioFormat &format); + Q_GSTTOOLS_EXPORT void initializeGst(); + Q_GSTTOOLS_EXPORT QMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList &codecs, const QSet<QString> &supportedMimeTypeSet); - QVector<CameraInfo> enumerateCameras(GstElementFactory *factory = 0); - QList<QByteArray> cameraDevices(GstElementFactory * factory = 0); - QString cameraDescription(const QString &device, GstElementFactory * factory = 0); - QCamera::Position cameraPosition(const QString &device, GstElementFactory * factory = 0); - int cameraOrientation(const QString &device, GstElementFactory * factory = 0); - QByteArray cameraDriver(const QString &device, GstElementFactory * factory = 0); + Q_GSTTOOLS_EXPORT QVector<CameraInfo> enumerateCameras(GstElementFactory *factory = 0); + Q_GSTTOOLS_EXPORT QList<QByteArray> cameraDevices(GstElementFactory * factory = 0); + Q_GSTTOOLS_EXPORT QString cameraDescription(const QString &device, GstElementFactory * factory = 0); + Q_GSTTOOLS_EXPORT QCamera::Position cameraPosition(const QString &device, GstElementFactory * factory = 0); + Q_GSTTOOLS_EXPORT int cameraOrientation(const QString &device, GstElementFactory * factory = 0); + Q_GSTTOOLS_EXPORT QByteArray cameraDriver(const QString &device, GstElementFactory * factory = 0); - QSet<QString> supportedMimeTypes(bool (*isValidFactory)(GstElementFactory *factory)); + Q_GSTTOOLS_EXPORT QSet<QString> supportedMimeTypes(bool (*isValidFactory)(GstElementFactory *factory)); #if GST_CHECK_VERSION(1,0,0) - QImage bufferToImage(GstBuffer *buffer, const GstVideoInfo &info); - QVideoSurfaceFormat formatForCaps( + Q_GSTTOOLS_EXPORT QImage bufferToImage(GstBuffer *buffer, const GstVideoInfo &info); + Q_GSTTOOLS_EXPORT QVideoSurfaceFormat formatForCaps( GstCaps *caps, GstVideoInfo *info = 0, QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle); #else - QImage bufferToImage(GstBuffer *buffer); - QVideoSurfaceFormat formatForCaps( + Q_GSTTOOLS_EXPORT QImage bufferToImage(GstBuffer *buffer); + Q_GSTTOOLS_EXPORT QVideoSurfaceFormat formatForCaps( GstCaps *caps, int *bytesPerLine = 0, QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle); #endif - GstCaps *capsForFormats(const QList<QVideoFrame::PixelFormat> &formats); + Q_GSTTOOLS_EXPORT GstCaps *capsForFormats(const QList<QVideoFrame::PixelFormat> &formats); void setFrameTimeStamps(QVideoFrame *frame, GstBuffer *buffer); - void setMetaData(GstElement *element, const QMap<QByteArray, QVariant> &data); - void setMetaData(GstBin *bin, const QMap<QByteArray, QVariant> &data); + Q_GSTTOOLS_EXPORT void setMetaData(GstElement *element, const QMap<QByteArray, QVariant> &data); + Q_GSTTOOLS_EXPORT void setMetaData(GstBin *bin, const QMap<QByteArray, QVariant> &data); - GstCaps *videoFilterCaps(); + Q_GSTTOOLS_EXPORT GstCaps *videoFilterCaps(); - QSize structureResolution(const GstStructure *s); - QVideoFrame::PixelFormat structurePixelFormat(const GstStructure *s, int *bpp = 0); - QSize structurePixelAspectRatio(const GstStructure *s); - QPair<qreal, qreal> structureFrameRateRange(const GstStructure *s); + Q_GSTTOOLS_EXPORT QSize structureResolution(const GstStructure *s); + Q_GSTTOOLS_EXPORT QVideoFrame::PixelFormat structurePixelFormat(const GstStructure *s, int *bpp = 0); + Q_GSTTOOLS_EXPORT QSize structurePixelAspectRatio(const GstStructure *s); + Q_GSTTOOLS_EXPORT QPair<qreal, qreal> structureFrameRateRange(const GstStructure *s); - QString fileExtensionForMimeType(const QString &mimeType); + Q_GSTTOOLS_EXPORT QString fileExtensionForMimeType(const QString &mimeType); } -void qt_gst_object_ref_sink(gpointer object); -GstCaps *qt_gst_pad_get_current_caps(GstPad *pad); -GstCaps *qt_gst_pad_get_caps(GstPad *pad); -GstStructure *qt_gst_structure_new_empty(const char *name); -gboolean qt_gst_element_query_position(GstElement *element, GstFormat format, gint64 *cur); -gboolean qt_gst_element_query_duration(GstElement *element, GstFormat format, gint64 *cur); -GstCaps *qt_gst_caps_normalize(GstCaps *caps); -const gchar *qt_gst_element_get_factory_name(GstElement *element); -gboolean qt_gst_caps_can_intersect(const GstCaps * caps1, const GstCaps * caps2); -GList *qt_gst_video_sinks(); -void qt_gst_util_double_to_fraction(gdouble src, gint *dest_n, gint *dest_d); - -QDebug operator <<(QDebug debug, GstCaps *caps); +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); QT_END_NAMESPACE diff --git a/src/multimedia/gsttools_headers/qgstvideobuffer_p.h b/src/multimedia/gsttools_headers/qgstvideobuffer_p.h index d2802d9a24c0e04019ed2fcee24959128a6efd2d..c67c57021887036bf42b7d2c54e7913b32123723 100644 --- a/src/multimedia/gsttools_headers/qgstvideobuffer_p.h +++ b/src/multimedia/gsttools_headers/qgstvideobuffer_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qabstractvideobuffer.h> #include <QtCore/qvariant.h> @@ -60,14 +61,14 @@ QT_BEGIN_NAMESPACE #if GST_CHECK_VERSION(1,0,0) -class QGstVideoBuffer : public QAbstractPlanarVideoBuffer +class Q_GSTTOOLS_EXPORT QGstVideoBuffer : public QAbstractPlanarVideoBuffer { public: QGstVideoBuffer(GstBuffer *buffer, const GstVideoInfo &info); QGstVideoBuffer(GstBuffer *buffer, const GstVideoInfo &info, HandleType handleType, const QVariant &handle); #else -class QGstVideoBuffer : public QAbstractVideoBuffer +class Q_GSTTOOLS_EXPORT QGstVideoBuffer : public QAbstractVideoBuffer { public: QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine); diff --git a/src/multimedia/gsttools_headers/qgstvideorendererplugin_p.h b/src/multimedia/gsttools_headers/qgstvideorendererplugin_p.h index 6a0c4c6bd7ef142fc7edebe2763f85db9ca7036c..df36dbe09a35a7f05e3310a0e270f76bef9bcba3 100644 --- a/src/multimedia/gsttools_headers/qgstvideorendererplugin_p.h +++ b/src/multimedia/gsttools_headers/qgstvideorendererplugin_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qgsttools_global_p.h> #include <qabstractvideobuffer.h> #include <qvideosurfaceformat.h> #include <QtCore/qobject.h> @@ -64,7 +65,7 @@ class QAbstractVideoSurface; const QLatin1String QGstVideoRendererPluginKey("gstvideorenderer"); -class QGstVideoRenderer +class Q_GSTTOOLS_EXPORT QGstVideoRenderer { public: virtual ~QGstVideoRenderer() {} @@ -81,7 +82,7 @@ public: /* Abstract interface for video buffers allocation. */ -class QGstVideoRendererInterface +class Q_GSTTOOLS_EXPORT QGstVideoRendererInterface { public: virtual ~QGstVideoRendererInterface() {} @@ -92,7 +93,7 @@ public: #define QGstVideoRendererInterface_iid "org.qt-project.qt.gstvideorenderer/5.4" Q_DECLARE_INTERFACE(QGstVideoRendererInterface, QGstVideoRendererInterface_iid) -class QGstVideoRendererPlugin : public QObject, public QGstVideoRendererInterface +class Q_GSTTOOLS_EXPORT QGstVideoRendererPlugin : public QObject, public QGstVideoRendererInterface { Q_OBJECT Q_INTERFACES(QGstVideoRendererInterface) diff --git a/src/plugins/gstreamer/common.pri b/src/plugins/gstreamer/common.pri index cbe87be4f9ee0333534b0527b5027c4a265d9c60..d0c5c7bddbf6a7dae2e20b67ae086c05e521411d 100644 --- a/src/plugins/gstreamer/common.pri +++ b/src/plugins/gstreamer/common.pri @@ -1,12 +1,10 @@ -QT += core-private multimedia-private network +QT += core-private multimedia-private multimediagsttools-private network qtHaveModule(widgets) { QT += widgets multimediawidgets-private DEFINES += HAVE_WIDGETS } -LIBS += -lqgsttools_p - QMAKE_USE += gstreamer qtConfig(resourcepolicy): \ diff --git a/sync.profile b/sync.profile index 16c2b00eca2a5c02e772359657870b72d3f34d72..2ac22b5bdbfac39472c2b19385600acbe5cac153 100644 --- a/sync.profile +++ b/sync.profile @@ -2,6 +2,7 @@ "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