diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-21 10:44:47 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@qt.io> | 2017-02-27 10:30:55 +0000 |
commit | 95de9e6154d75688e81a3b79007dfe6c56d3b65b (patch) | |
tree | a9effd19086e8b29651414fd657d963e8de47cba /src/plugins/wmf | |
parent | 8d0e08e96ffd8cd78fbb4a01f250dfb46117c636 (diff) |
Use QT_CONFIG macro to check for features
And remove many custom defines.
Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/plugins/wmf')
-rw-r--r-- | src/plugins/wmf/player/player.pri | 2 | ||||
-rw-r--r-- | src/plugins/wmf/wmfserviceplugin.cpp | 6 | ||||
-rw-r--r-- | src/plugins/wmf/wmfserviceplugin.h | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/wmf/player/player.pri b/src/plugins/wmf/player/player.pri index 38ccb82a6..af2f7458b 100644 --- a/src/plugins/wmf/player/player.pri +++ b/src/plugins/wmf/player/player.pri @@ -3,8 +3,6 @@ INCLUDEPATH += $$PWD LIBS += -lgdi32 -luser32 QMAKE_USE += wmf -DEFINES += QMEDIA_MEDIAFOUNDATION_PLAYER - HEADERS += \ $$PWD/mfplayerservice.h \ $$PWD/mfplayersession.h \ diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp index e19154aee..1eeb22428 100644 --- a/src/plugins/wmf/wmfserviceplugin.cpp +++ b/src/plugins/wmf/wmfserviceplugin.cpp @@ -42,7 +42,7 @@ #include <QtCore/QFile> #include "wmfserviceplugin.h" -#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER +#if QT_CONFIG(wmf_player) #include "mfplayerservice.h" #endif #include "mfdecoderservice.h" @@ -74,7 +74,7 @@ void releaseRefCount() QMediaService* WMFServicePlugin::create(QString const& key) { -#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER +#if QT_CONFIG(wmf_player) if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)) { addRefCount(); return new MFPlayerService; @@ -97,7 +97,7 @@ void WMFServicePlugin::release(QMediaService *service) QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures( const QByteArray &service) const { -#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER +#if QT_CONFIG(wmf_player) if (service == Q_MEDIASERVICE_MEDIAPLAYER) return QMediaServiceProviderHint::StreamPlayback; else diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h index 39b7b86d9..826ca1d26 100644 --- a/src/plugins/wmf/wmfserviceplugin.h +++ b/src/plugins/wmf/wmfserviceplugin.h @@ -40,6 +40,7 @@ #ifndef WMFSERVICEPLUGIN_H #define WMFSERVICEPLUGIN_H +#include <QtMultimedia/private/qtmultimediaglobal_p.h> #include "qmediaserviceproviderplugin.h" QT_USE_NAMESPACE @@ -54,7 +55,7 @@ class WMFServicePlugin Q_INTERFACES(QMediaServiceSupportedDevicesInterface) Q_INTERFACES(QMediaServiceDefaultDeviceInterface) Q_INTERFACES(QMediaServiceFeaturesInterface) -#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER +#if QT_CONFIG(wmf_player) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "wmf.json") #else Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "wmf_audiodecode.json") |