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:
authorkinddragon <kinddragon@users.sourceforge.net>2010-04-27 02:05:43 +0400
committerkinddragon <kinddragon@users.sourceforge.net>2010-04-27 02:05:43 +0400
commit0fb6236916750de563734411ffe8f7cfc9885ef4 (patch)
tree87e50107d920a102177eddac712849af81e907cb /src/apps/mplayerc
parent21dc852274186f2489708979a78a267bb7fc2534 (diff)
Removed auto generated manifest file from SVN
Added method GetVisibleVideoSize() in interface ISubPicAllocatorPresenter for future work git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1811 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc')
-rw-r--r--src/apps/mplayerc/DX9AllocatorPresenter.cpp19
-rw-r--r--src/apps/mplayerc/VMR9AllocatorPresenter.cpp29
-rw-r--r--src/apps/mplayerc/res/mpc-hc.exe.manifest33
3 files changed, 31 insertions, 50 deletions
diff --git a/src/apps/mplayerc/DX9AllocatorPresenter.cpp b/src/apps/mplayerc/DX9AllocatorPresenter.cpp
index f388fdf83..6e8e32f69 100644
--- a/src/apps/mplayerc/DX9AllocatorPresenter.cpp
+++ b/src/apps/mplayerc/DX9AllocatorPresenter.cpp
@@ -2333,7 +2333,7 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
HRESULT hr;
- CRect rSrcVid(CPoint(0, 0), m_NativeVideoSize);
+ CRect rSrcVid(CPoint(0, 0), GetVisibleVideoSize());
CRect rDstVid(m_VideoRect);
CRect rSrcPri(CPoint(0, 0), m_WindowRect.Size());
@@ -2372,20 +2372,22 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
int src = m_nCurSurface, dst = m_nNbDXSurface;
- D3DSURFACE_DESC desc;
- m_pVideoTexture[src]->GetLevelDesc(0, &desc);
-
#if 1
+ D3DSURFACE_DESC desc;
+ m_pVideoTexture[src]->GetLevelDesc(0, &desc);
+
float fConstData[][4] =
{
{(float)desc.Width, (float)desc.Height, (float)(counter++), (float)diff / CLOCKS_PER_SEC},
{1.0f / desc.Width, 1.0f / desc.Height, 0, 0},
};
#else
+ CSize VideoSize = GetVisibleVideoSize();
+
float fConstData[][4] =
{
- {(float)m_NativeVideoSize.cx, (float)m_NativeVideoSize.cy, (float)(counter++), (float)diff / CLOCKS_PER_SEC},
- {1.0f / m_NativeVideoSize.cx, 1.0f / m_NativeVideoSize.cy, 0, 0},
+ {(float)VideoSize.cx, (float)VideoSize.cy, (float)(counter++), (float)diff / CLOCKS_PER_SEC},
+ {1.0f / VideoSize.cx, 1.0f / VideoSize.cy, 0, 0},
};
#endif
@@ -2662,12 +2664,12 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
}
else
m_WaitForGPUTime = 0;
+
if (fAll)
{
m_PaintTime = (AfxGetMyApp()->GetPerfCounter() - StartPaint);
m_PaintTimeMin = min(m_PaintTimeMin, m_PaintTime);
m_PaintTimeMax = max(m_PaintTimeMax, m_PaintTime);
-
}
bool bWaited = false;
@@ -2686,12 +2688,9 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll)
}
}
-
// Create a device pointer m_pd3dDevice
// Create a query object
-
-
{
CComPtr<IDirect3DQuery9> pEventQuery;
m_pD3DDev->CreateQuery(D3DQUERYTYPE_EVENT, &pEventQuery);
diff --git a/src/apps/mplayerc/VMR9AllocatorPresenter.cpp b/src/apps/mplayerc/VMR9AllocatorPresenter.cpp
index 44f37a357..612f79e8b 100644
--- a/src/apps/mplayerc/VMR9AllocatorPresenter.cpp
+++ b/src/apps/mplayerc/VMR9AllocatorPresenter.cpp
@@ -747,10 +747,19 @@ STDMETHODIMP CVMR9AllocatorPresenter::InitializeDevice(DWORD_PTR dwUserID, VMR9A
m_pSurfaces.SetCount(*lpNumBuffers);
- m_NativeVideoSize = m_AspectRatio = CSize(w, h);
m_bNeedCheckSample = true;
- int arx = lpAllocInfo->szAspectRatio.cx, ary = lpAllocInfo->szAspectRatio.cy;
- if(arx > 0 && ary > 0) m_AspectRatio.SetSize(arx, ary);
+ m_NativeVideoSize = CSize(w, h);
+ CSize VideoSize = GetVisibleVideoSize();
+ int arx = lpAllocInfo->szAspectRatio.cx;
+ int ary = lpAllocInfo->szAspectRatio.cy;
+ if(arx > 0 && ary > 0)
+ {
+ arx = arx / ((float) m_NativeVideoSize.cx / VideoSize.cx);
+ ary = ary / ((float) m_NativeVideoSize.cy / VideoSize.cy);
+ m_AspectRatio.SetSize(arx, ary);
+ }
+ else
+ m_AspectRatio = VideoSize;
if(FAILED(hr = AllocSurfaces()))
return hr;
@@ -943,9 +952,15 @@ STDMETHODIMP CVMR9AllocatorPresenter::PresentImage(DWORD_PTR dwUserID, VMR9Prese
}
}
- CSize VideoSize = m_NativeVideoSize;
- int arx = lpPresInfo->szAspectRatio.cx, ary = lpPresInfo->szAspectRatio.cy;
- if(arx > 0 && ary > 0) VideoSize.cx = VideoSize.cy*arx/ary;
+ CSize VideoSize = GetVisibleVideoSize();
+ int arx = lpPresInfo->szAspectRatio.cx;
+ int ary = lpPresInfo->szAspectRatio.cy;
+ if(arx > 0 && ary > 0)
+ {
+ arx = arx / ((float) m_NativeVideoSize.cx / VideoSize.cx);
+ ary = ary / ((float) m_NativeVideoSize.cy / VideoSize.cy);
+ VideoSize.cx = VideoSize.cy*arx/ary;
+ }
if(VideoSize != GetVideoSize())
{
m_AspectRatio.SetSize(arx, ary);
@@ -1003,7 +1018,7 @@ STDMETHODIMP CVMR9AllocatorPresenter::SetVideoPosition(const LPRECT lpSRCRect, c
}
STDMETHODIMP CVMR9AllocatorPresenter::GetVideoPosition(LPRECT lpSRCRect, LPRECT lpDSTRect)
{
- CopyRect(lpSRCRect, CRect(CPoint(0, 0), m_NativeVideoSize));
+ CopyRect(lpSRCRect, CRect(CPoint(0, 0), GetVisibleVideoSize()));
CopyRect(lpDSTRect, &m_VideoRect);
return S_OK;
}
diff --git a/src/apps/mplayerc/res/mpc-hc.exe.manifest b/src/apps/mplayerc/res/mpc-hc.exe.manifest
deleted file mode 100644
index 3c1be211e..000000000
--- a/src/apps/mplayerc/res/mpc-hc.exe.manifest
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity
- version="1.3.0.0"
- processorArchitecture="*"
- name="Media Player Classic Home Cinema"
- type="win32"
-/>
-<description>Media Player Classic Home Cinema</description>
-<dependency>
- <dependentAssembly>
- <assemblyIdentity
- type="win32"
- name="Microsoft.Windows.Common-Controls"
- version="6.0.0.0"
- processorArchitecture="*"
- publicKeyToken="6595b64144ccf1df"
- language="*"
- />
- </dependentAssembly>
-</dependency>
-<!-- Identify the application security requirements -->
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel
- level="asInvoker"
- uiAccess="false"
- />
- </requestedPrivileges>
- </security>
-</trustInfo>
-</assembly>