summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2016-01-27 17:07:52 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2016-03-15 15:35:49 +0000
commit399ec97f101f8bc4917139bf658bb08fd5316811 (patch)
tree2aa764deaf6058a1e1734a1d626a3b61bc19ca99 /src
parentb0440668353f7b238e33142a060941d5c104b5d3 (diff)
Windows EVR: show frames when pausing from stopped state.
The QAbstractVideoSurface was started only when calling play(), causing frames received before (e.g. when pausing from stopped state) to not be rendered. The surface is now started as soon as a media type is agreed between the EVR and the upstream element. Conversely, the surface is stopped whenever the media type is cleared. Change-Id: Ia96a07dbd277adce67de5a9cfbf9acc0d33b6497 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/common/evr/evrcustompresenter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp
index 3afd2342f..49623e891 100644
--- a/src/plugins/common/evr/evrcustompresenter.cpp
+++ b/src/plugins/common/evr/evrcustompresenter.cpp
@@ -842,8 +842,6 @@ HRESULT EVRCustomPresenter::OnClockStart(MFTIME, LONGLONG clockStartOffset)
return hr;
}
- startSurface();
-
// Now try to get new output samples from the mixer.
processOutputLoop();
@@ -891,8 +889,6 @@ HRESULT EVRCustomPresenter::OnClockStop(MFTIME)
cancelFrameStep();
}
- stopSurface();
-
return S_OK;
}
@@ -1400,6 +1396,7 @@ HRESULT EVRCustomPresenter::setMediaType(IMFMediaType *mediaType)
// Clearing the media type is allowed in any state (including shutdown).
if (!mediaType) {
+ stopSurface();
qt_evr_safe_release(&m_mediaType);
releaseResources();
return S_OK;
@@ -1460,6 +1457,8 @@ HRESULT EVRCustomPresenter::setMediaType(IMFMediaType *mediaType)
m_mediaType = mediaType;
m_mediaType->AddRef();
+ startSurface();
+
done:
if (FAILED(hr))
releaseResources();