Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-08-11 13:50:30 +0300
committerUnderground78 <underground78@users.sourceforge.net>2015-09-24 22:57:36 +0300
commit41c6940cc34572922f412fc6b7d795bb8092cd0f (patch)
tree2053c613ce0f58edcd7fc2c16fc9a771353856b5
parentfd03847055171aa4d6d58f515c5a143fe77fd3a9 (diff)
Set the Video Window for EVR before connecting input pins
This allows the video decoder to init DXVA2 decoding on the appropriate screen, instead of having to re-init after starting the graph. It also ensures the video decoding features of the adapter the window is currently on are exposed, and not those of the default screen. Resolves #150.
-rw-r--r--src/mpc-hc/FGFilter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mpc-hc/FGFilter.cpp b/src/mpc-hc/FGFilter.cpp
index 3b92ab5fc..c52373a13 100644
--- a/src/mpc-hc/FGFilter.cpp
+++ b/src/mpc-hc/FGFilter.cpp
@@ -479,6 +479,13 @@ HRESULT CFGFilterVideoRenderer::Create(IBaseFilter** ppBF, CInterfaceList<IUnkno
if (m_clsid == CLSID_EnhancedVideoRenderer) {
CComQIPtr<IEVRFilterConfig> pConfig = pBF;
pConfig->SetNumberOfStreams(3);
+
+ if (CComQIPtr<IMFGetService> pMFGS = pBF) {
+ CComPtr<IMFVideoDisplayControl> pMFVDC;
+ if (SUCCEEDED(pMFGS->GetService(MR_VIDEO_RENDER_SERVICE, __uuidof(IMFVideoDisplayControl), (void **)&pMFVDC))) {
+ pMFVDC->SetVideoWindow(m_hWnd);
+ }
+ }
}
BeginEnumPins(pBF, pEP, pPin) {