summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2016-10-07 15:34:53 +0300
committerYoann Lopes <yoann.lopes@qt.io>2016-11-02 13:41:47 +0000
commit9df63fd62e1932a7d650f8d99c2b92947a05a9f4 (patch)
tree1072a72f04b3412940c685c34a5197ec1c110d1f /src
parent4e5eb169891fb52abe5683cb2d50f3ef280f1695 (diff)
WMF: make it possible to build only the audio decode service
The WMF plugin can now be built without the media player service. That enables the audio decode service even when DirectShow is used as media player backend. The default configuration on Windows is now: Camera, MediaPlayer -> DirectShow AudioDecode -> WMF Change-Id: Ic6f3c85ed849e0c603719cfb03794e6abd2d52fa Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/directshow/directshow.pro2
-rw-r--r--src/plugins/wmf/player/mfactivate.cpp (renamed from src/plugins/wmf/mfactivate.cpp)0
-rw-r--r--src/plugins/wmf/player/mfactivate.h (renamed from src/plugins/wmf/mfactivate.h)0
-rw-r--r--src/plugins/wmf/player/mftvideo.cpp (renamed from src/plugins/wmf/mftvideo.cpp)0
-rw-r--r--src/plugins/wmf/player/mftvideo.h (renamed from src/plugins/wmf/mftvideo.h)0
-rw-r--r--src/plugins/wmf/player/player.pri10
-rw-r--r--src/plugins/wmf/player/samplegrabber.cpp (renamed from src/plugins/wmf/samplegrabber.cpp)0
-rw-r--r--src/plugins/wmf/player/samplegrabber.h (renamed from src/plugins/wmf/samplegrabber.h)0
-rw-r--r--src/plugins/wmf/sourceresolver.cpp3
-rw-r--r--src/plugins/wmf/wmf.pro15
-rw-r--r--src/plugins/wmf/wmf_audiodecode.json4
-rw-r--r--src/plugins/wmf/wmfserviceplugin.cpp2
-rw-r--r--src/plugins/wmf/wmfserviceplugin.h4
13 files changed, 26 insertions, 14 deletions
diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 117b02ad..182f232c 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -12,7 +12,7 @@ SOURCES += dsserviceplugin.cpp
mingw: DEFINES += NO_DSHOW_STRSAFE
-!config_wmf: include(player/player.pri)
+!config_wmf|!contains(QT_CONFIG, wmf-backend): include(player/player.pri)
!wince: include(camera/camera.pri)
OTHER_FILES += \
diff --git a/src/plugins/wmf/mfactivate.cpp b/src/plugins/wmf/player/mfactivate.cpp
index e014cb48..e014cb48 100644
--- a/src/plugins/wmf/mfactivate.cpp
+++ b/src/plugins/wmf/player/mfactivate.cpp
diff --git a/src/plugins/wmf/mfactivate.h b/src/plugins/wmf/player/mfactivate.h
index 8b8e51b5..8b8e51b5 100644
--- a/src/plugins/wmf/mfactivate.h
+++ b/src/plugins/wmf/player/mfactivate.h
diff --git a/src/plugins/wmf/mftvideo.cpp b/src/plugins/wmf/player/mftvideo.cpp
index 1b3c5bbc..1b3c5bbc 100644
--- a/src/plugins/wmf/mftvideo.cpp
+++ b/src/plugins/wmf/player/mftvideo.cpp
diff --git a/src/plugins/wmf/mftvideo.h b/src/plugins/wmf/player/mftvideo.h
index c37c8f70..c37c8f70 100644
--- a/src/plugins/wmf/mftvideo.h
+++ b/src/plugins/wmf/player/mftvideo.h
diff --git a/src/plugins/wmf/player/player.pri b/src/plugins/wmf/player/player.pri
index c24370ee..a10e2df6 100644
--- a/src/plugins/wmf/player/player.pri
+++ b/src/plugins/wmf/player/player.pri
@@ -13,7 +13,10 @@ HEADERS += \
$$PWD/mfmetadatacontrol.h \
$$PWD/mfaudioprobecontrol.h \
$$PWD/mfvideoprobecontrol.h \
- $$PWD/mfevrvideowindowcontrol.h
+ $$PWD/mfevrvideowindowcontrol.h \
+ $$PWD/samplegrabber.h \
+ $$PWD/mftvideo.h \
+ $$PWD/mfactivate.h
SOURCES += \
$$PWD/mfplayerservice.cpp \
@@ -24,6 +27,9 @@ SOURCES += \
$$PWD/mfmetadatacontrol.cpp \
$$PWD/mfaudioprobecontrol.cpp \
$$PWD/mfvideoprobecontrol.cpp \
- $$PWD/mfevrvideowindowcontrol.cpp
+ $$PWD/mfevrvideowindowcontrol.cpp \
+ $$PWD/samplegrabber.cpp \
+ $$PWD/mftvideo.cpp \
+ $$PWD/mfactivate.cpp
include($$PWD/../../common/evr.pri)
diff --git a/src/plugins/wmf/samplegrabber.cpp b/src/plugins/wmf/player/samplegrabber.cpp
index 35f03889..35f03889 100644
--- a/src/plugins/wmf/samplegrabber.cpp
+++ b/src/plugins/wmf/player/samplegrabber.cpp
diff --git a/src/plugins/wmf/samplegrabber.h b/src/plugins/wmf/player/samplegrabber.h
index 26bb3214..26bb3214 100644
--- a/src/plugins/wmf/samplegrabber.h
+++ b/src/plugins/wmf/player/samplegrabber.h
diff --git a/src/plugins/wmf/sourceresolver.cpp b/src/plugins/wmf/sourceresolver.cpp
index 7bd5152d..8ede3ef4 100644
--- a/src/plugins/wmf/sourceresolver.cpp
+++ b/src/plugins/wmf/sourceresolver.cpp
@@ -31,12 +31,13 @@
**
****************************************************************************/
-#include "mfplayersession.h"
#include "mfstream.h"
#include "sourceresolver.h"
#include <Mferror.h>
#include <nserror.h>
#include <QtCore/qfile.h>
+#include <QtCore/qdebug.h>
+#include <QtMultimedia/qmediaplayer.h>
/*
SourceResolver is separated from MFPlayerSession to handle the work of resolving a media source
diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro
index e83c5159..c75efe28 100644
--- a/src/plugins/wmf/wmf.pro
+++ b/src/plugins/wmf/wmf.pro
@@ -10,24 +10,19 @@ INCLUDEPATH += .
HEADERS += \
wmfserviceplugin.h \
mfstream.h \
- sourceresolver.h \
- samplegrabber.h \
- mftvideo.h \
- mfactivate.h
+ sourceresolver.h
SOURCES += \
wmfserviceplugin.cpp \
mfstream.cpp \
- sourceresolver.cpp \
- samplegrabber.cpp \
- mftvideo.cpp \
- mfactivate.cpp
+ sourceresolver.cpp
-include (player/player.pri)
+contains(QT_CONFIG, wmf-backend): include (player/player.pri)
include (decoder/decoder.pri)
OTHER_FILES += \
- wmf.json
+ wmf.json \
+ wmf_audiodecode.json
PLUGIN_TYPE = mediaservice
PLUGIN_CLASS_NAME = WMFServicePlugin
diff --git a/src/plugins/wmf/wmf_audiodecode.json b/src/plugins/wmf/wmf_audiodecode.json
new file mode 100644
index 00000000..2a65dd75
--- /dev/null
+++ b/src/plugins/wmf/wmf_audiodecode.json
@@ -0,0 +1,4 @@
+{
+ "Keys": ["windowsmediafoundation"],
+ "Services": ["org.qt-project.qt.audiodecode"]
+}
diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp
index da7fedd9..385b45a3 100644
--- a/src/plugins/wmf/wmfserviceplugin.cpp
+++ b/src/plugins/wmf/wmfserviceplugin.cpp
@@ -91,9 +91,11 @@ void WMFServicePlugin::release(QMediaService *service)
QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures(
const QByteArray &service) const
{
+#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER
if (service == Q_MEDIASERVICE_MEDIAPLAYER)
return QMediaServiceProviderHint::StreamPlayback;
else
+#endif
return QMediaServiceProviderHint::Features();
}
diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h
index 64f93398..c65953c6 100644
--- a/src/plugins/wmf/wmfserviceplugin.h
+++ b/src/plugins/wmf/wmfserviceplugin.h
@@ -48,7 +48,11 @@ class WMFServicePlugin
Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
Q_INTERFACES(QMediaServiceDefaultDeviceInterface)
Q_INTERFACES(QMediaServiceFeaturesInterface)
+#ifdef QMEDIA_MEDIAFOUNDATION_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")
+#endif
public:
QMediaService* create(QString const& key);
void release(QMediaService *service);