summaryrefslogtreecommitdiff
path: root/src/plugins/directshow/player
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-10 10:27:27 +0100
committerLiang Qi <liang.qi@qt.io>2017-03-10 10:51:09 +0100
commite964e89331f2cfef99a3f63172a127b6c02a9727 (patch)
tree4c7d78573d17e523e4278027cee8fa88494366c8 /src/plugins/directshow/player
parentf09d36708fdab70ad51af374a65ddded64525f67 (diff)
parent6f7192a048432e4792330244b74a2a39ccd8d515 (diff)
downloadqtmultimedia-e964e89331f2cfef99a3f63172a127b6c02a9727.tar.gz
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
Diffstat (limited to 'src/plugins/directshow/player')
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.cpp14
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.cpp16
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.cpp11
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.h7
-rw-r--r--src/plugins/directshow/player/player.pri9
5 files changed, 29 insertions, 28 deletions
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.cpp b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
index 6a88d76a9..45d3a958b 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.cpp
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
@@ -57,11 +57,13 @@
#include "directshowmetadatacontrol.h"
#include "directshowplayerservice.h"
-#ifndef QT_NO_WMSDK
+#include <QtMultimedia/private/qtmultimedia-config_p.h>
+
+#if QT_CONFIG(wmsdk)
#include <wmsdk.h>
#endif
-#ifndef QT_NO_SHELLITEM
+#if QT_CONFIG(wshellitem)
#include <ShlObj.h>
#include <propkeydef.h>
#include <private/qsystemlibrary_p.h>
@@ -108,7 +110,7 @@ typedef HRESULT (WINAPI *q_SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, cons
static q_SHCreateItemFromParsingName sHCreateItemFromParsingName = 0;
#endif
-#ifndef QT_NO_WMSDK
+#if QT_CONFIG(wmsdk)
namespace
{
@@ -290,7 +292,7 @@ static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
}
#endif
-#ifndef QT_NO_SHELLITEM
+#if QT_CONFIG(wshellitem)
static QVariant convertValue(const PROPVARIANT& var)
{
QVariant value;
@@ -390,7 +392,7 @@ void DirectShowMetaDataControl::updateMetadata(IFilterGraph2 *graph, IBaseFilter
{
m_metadata.clear();
-#ifndef QT_NO_SHELLITEM
+#if QT_CONFIG(wshellitem)
if (!sHCreateItemFromParsingName) {
QSystemLibrary lib(QStringLiteral("shell32"));
sHCreateItemFromParsingName = (q_SHCreateItemFromParsingName)(lib.resolve("SHCreateItemFromParsingName"));
@@ -513,7 +515,7 @@ void DirectShowMetaDataControl::updateMetadata(IFilterGraph2 *graph, IBaseFilter
goto send_event;
#endif
-#ifndef QT_NO_WMSDK
+#if QT_CONFIG(wmsdk)
IWMHeaderInfo *info = com_cast<IWMHeaderInfo>(source, IID_IWMHeaderInfo);
if (info) {
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp
index 0b88496af..5fbb6ef05 100644
--- a/src/plugins/directshow/player/directshowplayerservice.cpp
+++ b/src/plugins/directshow/player/directshowplayerservice.cpp
@@ -55,22 +55,24 @@
#include "directshowvideorenderercontrol.h"
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
#include "directshowevrvideowindowcontrol.h"
#endif
-#ifndef QT_NO_WMSDK
-#include <wmsdk.h>
-#endif
-
#include "qmediacontent.h"
+#include <QtMultimedia/private/qtmultimedia-config_p.h>
+
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qdir.h>
#include <QtCore/qthread.h>
#include <QtCore/qvarlengtharray.h>
+#if QT_CONFIG(wmsdk)
+# include <wmsdk.h>
+#endif
+
#ifndef Q_CC_MINGW
# include <comdef.h>
#endif
@@ -197,7 +199,7 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name)
if (!m_videoRendererControl && !m_videoWindowControl) {
IBaseFilter *filter;
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
DirectShowEvrVideoWindowControl *evrControl = new DirectShowEvrVideoWindowControl;
if ((filter = evrControl->filter()))
m_videoWindowControl = evrControl;
@@ -980,7 +982,7 @@ void DirectShowPlayerService::doSeek(QMutexLocker *locker)
int DirectShowPlayerService::bufferStatus() const
{
-#ifndef QT_NO_WMSDK
+#if QT_CONFIG(wmsdk)
QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
if (IWMReaderAdvanced2 *reader = com_cast<IWMReaderAdvanced2>(
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
index b86125df9..40f77e899 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
@@ -37,11 +37,12 @@
**
****************************************************************************/
+#include <QtMultimedia/private/qtmultimediaglobal_p.h>
#include "directshowvideorenderercontrol.h"
#include "videosurfacefilter.h"
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
#include "evrcustompresenter.h"
#endif
@@ -52,7 +53,7 @@ DirectShowVideoRendererControl::DirectShowVideoRendererControl(DirectShowEventLo
, m_loop(loop)
, m_surface(0)
, m_filter(0)
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
, m_evrPresenter(0)
#endif
{
@@ -60,7 +61,7 @@ DirectShowVideoRendererControl::DirectShowVideoRendererControl(DirectShowEventLo
DirectShowVideoRendererControl::~DirectShowVideoRendererControl()
{
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
if (m_evrPresenter) {
m_evrPresenter->setSurface(Q_NULLPTR);
m_evrPresenter->Release();
@@ -80,7 +81,7 @@ void DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
if (m_surface == surface)
return;
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
if (m_evrPresenter) {
m_evrPresenter->setSurface(Q_NULLPTR);
m_evrPresenter->Release();
@@ -96,7 +97,7 @@ void DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
m_surface = surface;
if (m_surface) {
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
m_filter = com_new<IBaseFilter>(clsid_EnhancedVideoRenderer);
m_evrPresenter = new EVRCustomPresenter(m_surface);
if (!m_evrPresenter->isValid() || !qt_evr_setCustomPresenter(m_filter, m_evrPresenter)) {
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.h b/src/plugins/directshow/player/directshowvideorenderercontrol.h
index 9d1a23933..36c5b2248 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.h
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.h
@@ -40,12 +40,15 @@
#ifndef DIRECTSHOWVIDEORENDERERCONTROL_H
#define DIRECTSHOWVIDEORENDERERCONTROL_H
+#include <QtMultimedia/private/qtmultimediaglobal_p.h>
#include <dshow.h>
#include "qvideorenderercontrol.h"
+#include <QtMultimedia/private/qtmultimedia-config_p.h>
+
class DirectShowEventLoop;
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
class EVRCustomPresenter;
#endif
@@ -70,7 +73,7 @@ private:
DirectShowEventLoop *m_loop;
QAbstractVideoSurface *m_surface;
IBaseFilter *m_filter;
-#ifdef HAVE_EVR
+#if QT_CONFIG(evr)
EVRCustomPresenter *m_evrPresenter;
#endif
};
diff --git a/src/plugins/directshow/player/player.pri b/src/plugins/directshow/player/player.pri
index 7391ec7f0..59ac5a330 100644
--- a/src/plugins/directshow/player/player.pri
+++ b/src/plugins/directshow/player/player.pri
@@ -5,8 +5,6 @@ LIBS += -lgdi32
qtHaveModule(widgets): QT += widgets
-DEFINES += QMEDIA_DIRECTSHOW_PLAYER
-
HEADERS += \
$$PWD/directshowioreader.h \
$$PWD/directshowiosource.h \
@@ -30,8 +28,6 @@ SOURCES += \
$$PWD/vmr9videowindowcontrol.cpp
qtConfig(evr) {
- DEFINES += HAVE_EVR
-
include($$PWD/../../common/evr.pri)
HEADERS += \
@@ -41,8 +37,5 @@ qtConfig(evr) {
$$PWD/directshowevrvideowindowcontrol.cpp
}
-qtConfig(wshellitem) {
+qtConfig(wshellitem): \
QT += core-private
-} else {
- DEFINES += QT_NO_SHELLITEM
-}