summaryrefslogtreecommitdiffstats
path: root/src/plugins/wmf/player/mfplayersession.cpp
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-09-10 18:25:37 +0200
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-11-05 11:34:55 +0000
commit95bd9d58d8d37ddec8d37f5b35128689c0aa55a8 (patch)
treeecf8820d012953caee0f516e349757c8362a95b2 /src/plugins/wmf/player/mfplayersession.cpp
parentb2e9ae8856f5297289ab5e1f48bda12ef2201b97 (diff)
DirectShow: use the EVR in the window control.
Reuse existing code from the WMF plugin, which already uses the EVR. This enables HW-accelerated video decoding when using QMediaPlayer with a QVideoWidget. Task-number: QTBUG-45593 Change-Id: I757e4d53cd2c648aee6ba33a4851a8c6adc62843 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/wmf/player/mfplayersession.cpp')
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index 283853def..e4c498b76 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -43,9 +43,7 @@
#include <QtCore/qbuffer.h>
#include "mfplayercontrol.h"
-#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
-#include "evr9videowindowcontrol.h"
-#endif
+#include "mfevrvideowindowcontrol.h"
#include "mfvideorenderercontrol.h"
#include "mfaudioendpointcontrol.h"
@@ -140,10 +138,8 @@ void MFPlayerSession::close()
if (m_playerService->videoRendererControl()) {
m_playerService->videoRendererControl()->releaseActivate();
-#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (m_playerService->videoWindowControl()) {
m_playerService->videoWindowControl()->releaseActivate();
-#endif
}
if (m_session)
@@ -404,10 +400,8 @@ IMFTopologyNode* MFPlayerSession::addOutputNode(IMFStreamDescriptor *streamDesc,
mediaType = Video;
if (m_playerService->videoRendererControl()) {
activate = m_playerService->videoRendererControl()->createActivate();
-#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (m_playerService->videoWindowControl()) {
activate = m_playerService->videoWindowControl()->createActivate();
-#endif
} else {
qWarning() << "no videoWindowControl or videoRendererControl, unable to add output node for video data";
}
@@ -1580,13 +1574,11 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
}
updatePendingCommands(CmdStart);
-#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
// playback started, we can now set again the procAmpValues if they have been
// changed previously (these are lost when loading a new media)
if (m_playerService->videoWindowControl()) {
- m_playerService->videoWindowControl()->setProcAmpValues();
+ m_playerService->videoWindowControl()->applyImageControls();
}
-#endif
break;
case MESessionStopped:
if (m_status != QMediaPlayer::EndOfMedia) {