MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / GetSourcePosition

Method GetSourcePosition

Source/VideoRenderer.cpp:853–881  ·  view source on GitHub ↗

IBasicVideo

Source from the content-addressed store, hash-verified

851
852// IBasicVideo
853STDMETHODIMP CMpcVideoRenderer::GetSourcePosition(long *pLeft, long *pTop, long *pWidth, long *pHeight)
854{
855 CheckPointer(pLeft,E_POINTER);
856 CheckPointer(pTop,E_POINTER);
857 CheckPointer(pWidth,E_POINTER);
858 CheckPointer(pHeight,E_POINTER);
859
860 CRect rect;
861 long lAspectX;
862 long lAspectY;
863 {
864 CAutoLock cVideoLock(&m_InterfaceLock);
865
866 m_VideoProcessor->GetSourceRect(rect);
867 m_VideoProcessor->GetAspectRatio(lAspectX, lAspectY);
868 }
869
870 *pLeft = rect.left;
871 *pTop = rect.top;
872 *pWidth = rect.Width();
873 *pHeight = rect.Height();
874
875 if (lAspectX && lAspectY) {
876 // Apply aspect ratio (as in VMR9 and madVR) so that DVD-Video menu buttons are activated correctly with the mouse.
877 *pWidth = *pHeight * lAspectX / lAspectY;
878 }
879
880 return S_OK;
881}
882
883STDMETHODIMP CMpcVideoRenderer::SetDestinationPosition(long Left, long Top, long Width, long Height)
884{

Callers

nothing calls this directly

Calls 2

GetSourceRectMethod · 0.80
GetAspectRatioMethod · 0.80

Tested by

no test coverage detected