summaryrefslogtreecommitdiffstats
path: root/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-03-26 03:06:37 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-03-26 03:36:36 (GMT)
commitef312b121470ec662ff6c861d02f880026e786b0 (patch)
tree0e646a6806e1c8ffe7ba6409bace98b55bd91646 /src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
parentd19ad17aed345433ab34cf165ccd7c7ddf917c19 (diff)
downloadQt-ef312b121470ec662ff6c861d02f880026e786b0.zip
Qt-ef312b121470ec662ff6c861d02f880026e786b0.tar.gz
Qt-ef312b121470ec662ff6c861d02f880026e786b0.tar.bz2
Support expanding aspect ratio in direct show video window control.
Task-number: QTBUG-9118 Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp')
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
index d54d188..a5f143f 100644
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
+++ b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
@@ -191,6 +191,8 @@ void DirectShowPlayerService::load(const QMediaContent &media, QIODevice *stream
m_atEnd = false;
m_metaDataControl->updateGraph(0, 0);
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(VideoOutputChange)));
+
if (m_resources.isEmpty() && !stream) {
m_pendingTasks = 0;
m_graphStatus = NoMedia;
@@ -464,6 +466,8 @@ void DirectShowPlayerService::doRender(QMutexLocker *locker)
QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
}
+ QCoreApplication::postEvent(this, new QEvent(QEvent::Type(VideoOutputChange)));
+
m_executedTasks |= Render;
}
}
@@ -1144,6 +1148,9 @@ void DirectShowPlayerService::customEvent(QEvent *event)
QMutexLocker locker(&m_mutex);
m_playerControl->updatePosition(m_position);
+ } else if (event->type() == QEvent::Type(VideoOutputChange)) {
+ if (m_videoWindowControl)
+ m_videoWindowControl->updateNativeSize();
} else {
QMediaService::customEvent(event);
}