diff options
Diffstat (limited to 'src/plugins/gstreamer/mediaplayer')
4 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp index 3e7286e51..54b31627e 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp @@ -379,7 +379,7 @@ void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice * request = content.canonicalRequest(); } -#if !defined(HAVE_GST_APPSRC) +#if !QT_CONFIG(gstreamer_app) m_session->loadFromUri(request); #else if (m_stream) { @@ -397,7 +397,7 @@ void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice * m_session->loadFromUri(request); #endif -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) if (!request.url().isEmpty() || userStreamValid) { #else if (!request.url().isEmpty()) { diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp index d7798b1b7..db266a10e 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp @@ -37,6 +37,7 @@ ** ****************************************************************************/ +#include <QtMultimedia/private/qtmultimediaglobal_p.h> #include <QtCore/qstring.h> #include <QtCore/qdebug.h> #include <QtCore/QDir> @@ -70,7 +71,7 @@ QMediaServiceProviderHint::Features QGstreamerPlayerServicePlugin::supportedFeat { if (service == Q_MEDIASERVICE_MEDIAPLAYER) return -#ifdef HAVE_GST_APPSRC +#if QT_CONFIG(gstreamer_app) QMediaServiceProviderHint::StreamPlayback | #endif QMediaServiceProviderHint::VideoSurface; diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp index f71332f35..cf2ec6262 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp @@ -126,7 +126,7 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) m_bus(0), m_videoOutput(0), m_renderer(0), -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) m_appSrc(0), #endif m_videoProbe(0), @@ -237,7 +237,7 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) g_signal_connect(G_OBJECT(m_playbin), "audio-changed", G_CALLBACK(handleStreamsChange), this); g_signal_connect(G_OBJECT(m_playbin), "text-changed", G_CALLBACK(handleStreamsChange), this); -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) g_signal_connect(G_OBJECT(m_playbin), "deep-notify::source", G_CALLBACK(configureAppSrcElement), this); #endif } @@ -267,7 +267,7 @@ GstElement *QGstreamerPlayerSession::playbin() const return m_playbin; } -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) void QGstreamerPlayerSession::configureAppSrcElement(GObject* object, GObject *orig, GParamSpec *pspec, QGstreamerPlayerSession* self) { Q_UNUSED(object); @@ -288,7 +288,7 @@ void QGstreamerPlayerSession::configureAppSrcElement(GObject* object, GObject *o void QGstreamerPlayerSession::loadFromStream(const QNetworkRequest &request, QIODevice *appSrcStream) { -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) #ifdef DEBUG_PLAYBIN qDebug() << Q_FUNC_INFO; #endif @@ -325,7 +325,7 @@ void QGstreamerPlayerSession::loadFromUri(const QNetworkRequest &request) m_duration = -1; m_lastPosition = 0; -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) if (m_appSrc) { m_appSrc->deleteLater(); m_appSrc = 0; diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h index 14ef6070f..7f46e8f41 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h @@ -40,6 +40,7 @@ #ifndef QGSTREAMERPLAYERSESSION_H #define QGSTREAMERPLAYERSESSION_H +#include <QtMultimedia/private/qtmultimediaglobal_p.h> #include <QObject> #include <QtCore/qmutex.h> #include <QtNetwork/qnetworkrequest.h> @@ -49,7 +50,7 @@ #include <qmediastreamscontrol.h> #include <qaudioformat.h> -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) #include <private/qgstappsrc_p.h> #endif @@ -116,7 +117,7 @@ public: bool processBusMessage(const QGstreamerMessage &message) override; -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) QGstAppSrc *appsrc() const { return m_appSrc; } static void configureAppSrcElement(GObject*, GObject*, GParamSpec*,QGstreamerPlayerSession* _this); #endif @@ -216,7 +217,7 @@ private: QObject *m_videoOutput; QGstreamerVideoRendererInterface *m_renderer; -#if defined(HAVE_GST_APPSRC) +#if QT_CONFIG(gstreamer_app) QGstAppSrc *m_appSrc; #endif |