diff options
author | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-07 22:30:57 +0400 |
---|---|---|
committer | kinddragon <kinddragon@users.sourceforge.net> | 2010-05-07 22:30:57 +0400 |
commit | c9fdac8d20ffe1e82c9707ee1cc6e4478c0b1e33 (patch) | |
tree | ab6b3ff652d5e421f5bde42c16c2bea275fe90b6 | |
parent | 1948d33f7ce8f23bf7ce24048b1a8fa9b57eb7cc (diff) |
Video renderer's moved to static library
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/branches/videorenderslib@1859 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r-- | mpc-hc.sln | 16 | ||||
-rw-r--r-- | src/SubPic/subpic.vcproj | 6 | ||||
-rw-r--r-- | src/VideoRenderers/AllocatorCommon.cpp (renamed from src/apps/mplayerc/AllocatorCommon.cpp) | 12 | ||||
-rw-r--r-- | src/VideoRenderers/AllocatorCommon.h (renamed from src/apps/mplayerc/AllocatorCommon.h) | 4 | ||||
-rw-r--r-- | src/VideoRenderers/AllocatorCommon7.cpp (renamed from src/apps/mplayerc/AllocatorCommon7.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/AllocatorCommon7.h (renamed from src/apps/mplayerc/AllocatorCommon7.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/D3DFont.cpp (renamed from src/apps/mplayerc/D3DFont.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/D3DFont.h (renamed from src/apps/mplayerc/D3DFont.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/DX7AllocatorPresenter.cpp (renamed from src/apps/mplayerc/DX7AllocatorPresenter.cpp) | 12 | ||||
-rw-r--r-- | src/VideoRenderers/DX7AllocatorPresenter.h (renamed from src/apps/mplayerc/DX7AllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/DX9AllocatorPresenter.cpp (renamed from src/apps/mplayerc/DX9AllocatorPresenter.cpp) | 112 | ||||
-rw-r--r-- | src/VideoRenderers/DX9AllocatorPresenter.h (renamed from src/apps/mplayerc/DX9AllocatorPresenter.h) | 7 | ||||
-rw-r--r-- | src/VideoRenderers/DXRAllocatorPresenter.cpp (renamed from src/apps/mplayerc/DXRAllocatorPresenter.cpp) | 12 | ||||
-rw-r--r-- | src/VideoRenderers/DXRAllocatorPresenter.h (renamed from src/apps/mplayerc/DXRAllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/EVRAllocatorPresenter.cpp (renamed from src/apps/mplayerc/EVRAllocatorPresenter.cpp) | 32 | ||||
-rw-r--r-- | src/VideoRenderers/EVRAllocatorPresenter.h (renamed from src/apps/mplayerc/EVRAllocatorPresenter.h) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/IPinHook.cpp (renamed from src/apps/mplayerc/IPinHook.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/IPinHook.h (renamed from src/apps/mplayerc/IPinHook.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/IQTVideoSurface.h (renamed from src/apps/mplayerc/IQTVideoSurface.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/MacrovisionKicker.cpp (renamed from src/apps/mplayerc/MacrovisionKicker.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/MacrovisionKicker.h (renamed from src/apps/mplayerc/MacrovisionKicker.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/PixelShaderCompiler.cpp (renamed from src/apps/mplayerc/PixelShaderCompiler.cpp) | 5 | ||||
-rw-r--r-- | src/VideoRenderers/PixelShaderCompiler.h (renamed from src/apps/mplayerc/PixelShaderCompiler.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/QT7AllocatorPresenter.cpp (renamed from src/apps/mplayerc/QT7AllocatorPresenter.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/QT7AllocatorPresenter.h (renamed from src/apps/mplayerc/QT7AllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/QT9AllocatorPresenter.cpp (renamed from src/apps/mplayerc/QT9AllocatorPresenter.cpp) | 8 | ||||
-rw-r--r-- | src/VideoRenderers/QT9AllocatorPresenter.h (renamed from src/apps/mplayerc/QT9AllocatorPresenter.h) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/RM7AllocatorPresenter.cpp (renamed from src/apps/mplayerc/RM7AllocatorPresenter.cpp) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/RM7AllocatorPresenter.h (renamed from src/apps/mplayerc/RM7AllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/RM9AllocatorPresenter.cpp (renamed from src/apps/mplayerc/RM9AllocatorPresenter.cpp) | 8 | ||||
-rw-r--r-- | src/VideoRenderers/RM9AllocatorPresenter.h (renamed from src/apps/mplayerc/RM9AllocatorPresenter.h) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/RenderersSettings.cpp | 108 | ||||
-rw-r--r-- | src/VideoRenderers/RenderersSettings.h | 198 | ||||
-rw-r--r-- | src/VideoRenderers/SyncAllocatorPresenter.h (renamed from src/apps/mplayerc/SyncAllocatorPresenter.h) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/SyncRenderer.cpp (renamed from src/apps/mplayerc/SyncRenderer.cpp) | 97 | ||||
-rw-r--r-- | src/VideoRenderers/SyncRenderer.h (renamed from src/apps/mplayerc/SyncRenderer.h) | 9 | ||||
-rw-r--r-- | src/VideoRenderers/VMR7AllocatorPresenter.cpp (renamed from src/apps/mplayerc/VMR7AllocatorPresenter.cpp) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/VMR7AllocatorPresenter.h (renamed from src/apps/mplayerc/VMR7AllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/VMR9AllocatorPresenter.cpp (renamed from src/apps/mplayerc/VMR9AllocatorPresenter.cpp) | 14 | ||||
-rw-r--r-- | src/VideoRenderers/VMR9AllocatorPresenter.h (renamed from src/apps/mplayerc/VMR9AllocatorPresenter.h) | 2 | ||||
-rw-r--r-- | src/VideoRenderers/VideoRenderers.vcproj | 536 | ||||
-rw-r--r-- | src/VideoRenderers/madVRAllocatorPresenter.cpp (renamed from src/apps/mplayerc/madVRAllocatorPresenter.cpp) | 12 | ||||
-rw-r--r-- | src/VideoRenderers/madVRAllocatorPresenter.h (renamed from src/apps/mplayerc/madVRAllocatorPresenter.h) | 0 | ||||
-rw-r--r-- | src/VideoRenderers/stdafx.cpp | 27 | ||||
-rw-r--r-- | src/VideoRenderers/stdafx.h | 92 | ||||
-rw-r--r-- | src/apps/mplayerc/AuthDlg.h | 1 | ||||
-rw-r--r-- | src/apps/mplayerc/FGFilter.cpp | 16 | ||||
-rw-r--r-- | src/apps/mplayerc/FGManager.cpp | 12 | ||||
-rw-r--r-- | src/apps/mplayerc/FGManagerBDA.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/FakeFilterMapper2.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/MainFrm.cpp | 289 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageFormats.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageFullscreen.cpp | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageOutput.cpp | 40 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageSubtitles.cpp | 24 | ||||
-rw-r--r-- | src/apps/mplayerc/PPageSync.cpp | 51 | ||||
-rw-r--r-- | src/apps/mplayerc/QuicktimeGraph.cpp | 6 | ||||
-rw-r--r-- | src/apps/mplayerc/QuicktimeGraph.h | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/RealMediaGraph.cpp | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/RealMediaGraph.h | 4 | ||||
-rw-r--r-- | src/apps/mplayerc/ShaderEditorDlg.cpp | 2 | ||||
-rw-r--r-- | src/apps/mplayerc/WebServer.cpp | 1 | ||||
-rw-r--r-- | src/apps/mplayerc/libpng.h | 1 | ||||
-rw-r--r-- | src/apps/mplayerc/mplayerc.cpp | 270 | ||||
-rw-r--r-- | src/apps/mplayerc/mplayerc.h | 149 | ||||
-rw-r--r-- | src/apps/mplayerc/mplayerc.vcproj | 433 | ||||
-rw-r--r-- | src/apps/mplayerc/stdafx.h | 2 |
67 files changed, 1648 insertions, 1010 deletions
diff --git a/mpc-hc.sln b/mpc-hc.sln index d6fd5957e..f556e8f47 100644 --- a/mpc-hc.sln +++ b/mpc-hc.sln @@ -336,7 +336,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpc-hc", "src\apps\mplayerc {37768B3F-89BC-4C16-B2A8-767C5DA84C3F} = {37768B3F-89BC-4C16-B2A8-767C5DA84C3F}
{12BE3440-A1F3-4C48-A229-30CB619EA276} = {12BE3440-A1F3-4C48-A229-30CB619EA276}
{273B3149-3192-4B75-A791-470320B90812} = {273B3149-3192-4B75-A791-470320B90812}
- {D514EA4D-EAFB-47A9-A437-A582CA571251} = {D514EA4D-EAFB-47A9-A437-A582CA571251}
{61E6EB4D-2F1A-443B-94B0-E8200B26E99F} = {61E6EB4D-2F1A-443B-94B0-E8200B26E99F}
{A7134255-DFF3-42F7-9BC2-FAC6E71CFFAE} = {A7134255-DFF3-42F7-9BC2-FAC6E71CFFAE}
{5E56335F-0FB1-4EEA-B240-D8DC5E0608E4} = {5E56335F-0FB1-4EEA-B240-D8DC5E0608E4}
@@ -347,6 +346,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpc-hc", "src\apps\mplayerc {4421516D-10A6-41C1-ADF3-099573BBB0C6} = {4421516D-10A6-41C1-ADF3-099573BBB0C6}
{30D48874-899F-41C6-9B26-A40C96C91102} = {30D48874-899F-41C6-9B26-A40C96C91102}
{339A4575-E25B-45D6-94A1-D835891740B8} = {339A4575-E25B-45D6-94A1-D835891740B8}
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C} = {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}
{65361C7C-83D6-42E4-870C-4DC85AE641FE} = {65361C7C-83D6-42E4-870C-4DC85AE641FE}
{D8DB3E7E-D50E-4EC3-A9B9-DAD18F5FE466} = {D8DB3E7E-D50E-4EC3-A9B9-DAD18F5FE466}
{AE399B7E-2B2C-4A96-9016-C5C74B0A2FA0} = {AE399B7E-2B2C-4A96-9016-C5C74B0A2FA0}
@@ -416,6 +416,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SyncClock", "src\filters\mi {273B3149-3192-4B75-A791-470320B90812} = {273B3149-3192-4B75-A791-470320B90812}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VideoRenderers", "src\VideoRenderers\VideoRenderers.vcproj", "{FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D514EA4D-EAFB-47A9-A437-A582CA571251} = {D514EA4D-EAFB-47A9-A437-A582CA571251}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Unicode|Win32 = Debug Unicode|Win32
@@ -940,6 +945,14 @@ Global {0B63409D-674D-47F8-A84E-87DBB7783189}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
{0B63409D-674D-47F8-A84E-87DBB7783189}.Release Unicode|x64.ActiveCfg = Release Unicode lib|x64
{0B63409D-674D-47F8-A84E-87DBB7783189}.Release Unicode|x64.Build.0 = Release Unicode lib|x64
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}.Release Unicode|x64.Build.0 = Release Unicode|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1014,6 +1027,7 @@ Global {1A2DFD1A-3C6C-44D1-909D-294AF646B575} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{FC70988B-1AE5-4381-866D-4F405E28AC42} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{D514EA4D-EAFB-47A9-A437-A582CA571251} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
+ {FB565A7A-50DC-4A0D-852D-5E7F74DAB82C} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{03208025-D5C2-426A-B0FA-251D4338F30C} = {2913B7E4-7A8B-43D5-A60B-345A0782816A}
{476B97B4-F079-4A44-AF89-52CA30C35E28} = {2913B7E4-7A8B-43D5-A60B-345A0782816A}
{4CC7AE86-3E0A-430A-BFF4-BF00204CAFB0} = {2913B7E4-7A8B-43D5-A60B-345A0782816A}
diff --git a/src/SubPic/subpic.vcproj b/src/SubPic/subpic.vcproj index 860c46d2b..7da5b7cd2 100644 --- a/src/SubPic/subpic.vcproj +++ b/src/SubPic/subpic.vcproj @@ -25,6 +25,7 @@ InheritedPropertySheets="..\common.vsprops;..\debug.vsprops"
UseOfMFC="1"
CharacterSet="1"
+ WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -85,6 +86,7 @@ InheritedPropertySheets="..\common.vsprops;..\debug.vsprops"
UseOfMFC="1"
CharacterSet="1"
+ WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -145,7 +147,7 @@ InheritedPropertySheets="..\common.vsprops;..\release.vsprops"
UseOfMFC="1"
CharacterSet="1"
- WholeProgramOptimization="0"
+ WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -210,7 +212,7 @@ InheritedPropertySheets="..\common.vsprops;..\release.vsprops"
UseOfMFC="1"
CharacterSet="1"
- WholeProgramOptimization="0"
+ WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
diff --git a/src/apps/mplayerc/AllocatorCommon.cpp b/src/VideoRenderers/AllocatorCommon.cpp index 154271c66..53667e2ad 100644 --- a/src/apps/mplayerc/AllocatorCommon.cpp +++ b/src/VideoRenderers/AllocatorCommon.cpp @@ -39,7 +39,7 @@ bool IsVMR9InGraph(IFilterGraph* pFG) //
-HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP)
+HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP)
{
CheckPointer(ppAP, E_POINTER);
@@ -49,9 +49,9 @@ HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppA HRESULT hr = E_FAIL;
CString Error;
- if(clsid == CLSID_VMR9AllocatorPresenter && !(*ppAP = DNew CVMR9AllocatorPresenter(hWnd, hr, Error))
- || clsid == CLSID_RM9AllocatorPresenter && !(*ppAP = DNew CRM9AllocatorPresenter(hWnd, hr, Error))
- || clsid == CLSID_QT9AllocatorPresenter && !(*ppAP = DNew CQT9AllocatorPresenter(hWnd, hr, Error))
+ if(clsid == CLSID_VMR9AllocatorPresenter && !(*ppAP = DNew CVMR9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
+ || clsid == CLSID_RM9AllocatorPresenter && !(*ppAP = DNew CRM9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
+ || clsid == CLSID_QT9AllocatorPresenter && !(*ppAP = DNew CQT9AllocatorPresenter(hWnd, bFullscreen, hr, Error))
|| clsid == CLSID_DXRAllocatorPresenter && !(*ppAP = DNew CDXRAllocatorPresenter(hWnd, hr, Error))
|| clsid == CLSID_madVRAllocatorPresenter && !(*ppAP = DNew CmadVRAllocatorPresenter(hWnd, hr, Error)))
return E_OUTOFMEMORY;
@@ -78,13 +78,13 @@ HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppA return hr;
}
-HRESULT CreateEVR(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP)
+HRESULT CreateEVR(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP)
{
HRESULT hr = E_FAIL;
if (clsid == CLSID_EVRAllocatorPresenter)
{
CString Error;
- *ppAP = DNew DSObjects::CEVRAllocatorPresenter(hWnd, hr, Error);
+ *ppAP = DNew DSObjects::CEVRAllocatorPresenter(hWnd, bFullscreen, hr, Error);
(*ppAP)->AddRef();
if(FAILED(hr))
diff --git a/src/apps/mplayerc/AllocatorCommon.h b/src/VideoRenderers/AllocatorCommon.h index 88ea58548..7f2d8c663 100644 --- a/src/apps/mplayerc/AllocatorCommon.h +++ b/src/VideoRenderers/AllocatorCommon.h @@ -60,8 +60,8 @@ extern bool IsVMR9InGraph(IFilterGraph* pFG); extern CString GetWindowsErrorMessage(HRESULT _Error, HMODULE _Module);
extern const wchar_t *GetD3DFormatStr(D3DFORMAT Format);
-extern HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP);
-extern HRESULT CreateEVR(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP);
+extern HRESULT CreateAP9(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP);
+extern HRESULT CreateEVR(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP);
// Support ffdshow queuing.
// This interface is used to check version of Media Player Classic.
diff --git a/src/apps/mplayerc/AllocatorCommon7.cpp b/src/VideoRenderers/AllocatorCommon7.cpp index fb9d1eeb7..fb9d1eeb7 100644 --- a/src/apps/mplayerc/AllocatorCommon7.cpp +++ b/src/VideoRenderers/AllocatorCommon7.cpp diff --git a/src/apps/mplayerc/AllocatorCommon7.h b/src/VideoRenderers/AllocatorCommon7.h index 38120c13a..38120c13a 100644 --- a/src/apps/mplayerc/AllocatorCommon7.h +++ b/src/VideoRenderers/AllocatorCommon7.h diff --git a/src/apps/mplayerc/D3DFont.cpp b/src/VideoRenderers/D3DFont.cpp index 5bc1b8414..5bc1b8414 100644 --- a/src/apps/mplayerc/D3DFont.cpp +++ b/src/VideoRenderers/D3DFont.cpp diff --git a/src/apps/mplayerc/D3DFont.h b/src/VideoRenderers/D3DFont.h index 34d603a80..34d603a80 100644 --- a/src/apps/mplayerc/D3DFont.h +++ b/src/VideoRenderers/D3DFont.h diff --git a/src/apps/mplayerc/DX7AllocatorPresenter.cpp b/src/VideoRenderers/DX7AllocatorPresenter.cpp index 89332aa73..8f2dd6178 100644 --- a/src/apps/mplayerc/DX7AllocatorPresenter.cpp +++ b/src/VideoRenderers/DX7AllocatorPresenter.cpp @@ -22,7 +22,7 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
#include "DX7AllocatorPresenter.h"
#include "../../SubPic/DX7SubPic.h"
@@ -191,7 +191,7 @@ HRESULT CDX7AllocatorPresenter::CreateDevice() if(m_pSubPicQueue) m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -232,14 +232,14 @@ HRESULT CDX7AllocatorPresenter::CreateDevice() }
else
{
- m_pAllocator = DNew CDX7SubPicAllocator(m_pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX7SubPicAllocator(m_pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator || FAILED(hr))
return E_FAIL;
}
hr = S_OK;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
return E_FAIL;
@@ -253,7 +253,7 @@ HRESULT CDX7AllocatorPresenter::AllocSurfaces() {
CAutoLock cAutoLock(this);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_pVideoTexture = NULL;
m_pVideoSurface = NULL;
diff --git a/src/apps/mplayerc/DX7AllocatorPresenter.h b/src/VideoRenderers/DX7AllocatorPresenter.h index da59c1ef8..da59c1ef8 100644 --- a/src/apps/mplayerc/DX7AllocatorPresenter.h +++ b/src/VideoRenderers/DX7AllocatorPresenter.h diff --git a/src/apps/mplayerc/DX9AllocatorPresenter.cpp b/src/VideoRenderers/DX9AllocatorPresenter.cpp index a3ac6dea5..9e118757e 100644 --- a/src/apps/mplayerc/DX9AllocatorPresenter.cpp +++ b/src/VideoRenderers/DX9AllocatorPresenter.cpp @@ -22,12 +22,14 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
#include "DX9AllocatorPresenter.h"
#include <initguid.h>
+#include <utility>
+#include "../apps/mplayerc/resource.h"
#include "../../SubPic/DX9SubPic.h"
#include "IPinHook.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
CCritSec g_ffdshowReceive;
bool queue_ffdshow_support = false;
@@ -202,9 +204,12 @@ static HRESULT DrawRect(IDirect3DDevice9* pD3DDev, MYD3DVERTEX<0> v[4]) return E_FAIL;
}
+using namespace DSObjects;
+using namespace std;
+
// CDX9AllocatorPresenter
-CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsEVR, CString &_Error)
+CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, bool bIsEVR, CString &_Error)
: ISubPicAllocatorPresenterImpl(hWnd, hr, &_Error)
, m_ScreenSize(0, 0)
, m_RefreshRate(0)
@@ -231,9 +236,8 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsE , m_pDirectDraw(NULL)
, m_hVSyncThread(NULL)
, m_hEvtQuit(NULL)
+ , m_bIsFullscreen(bFullscreen)
{
- m_bIsFullscreen = (AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
-
HINSTANCE hDll;
if(FAILED(hr))
@@ -246,7 +250,7 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsE m_pD3DXCreateLine = NULL;
m_pD3DXCreateFont = NULL;
m_pD3DXCreateSprite = NULL;
- hDll = AfxGetMyApp()->GetD3X9Dll();
+ hDll = GetRenderersData()->GetD3X9Dll();
if(hDll)
{
(FARPROC&)m_pD3DXLoadSurfaceFromMemory = GetProcAddress(hDll, "D3DXLoadSurfaceFromMemory");
@@ -306,7 +310,7 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsE m_DetectedScanlineTime = 0;
m_DetectedScanlineTimePrim = 0;
m_DetectedRefreshRate = 0;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if (s.m_RenderSettings.iVMRDisableDesktopComposition)
{
@@ -605,8 +609,8 @@ void CDX9AllocatorPresenter::VSyncThread() timeGetDevCaps(&tc, sizeof(TIMECAPS));
dwResolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
dwUser = timeBeginPeriod(dwResolution);
- CMPlayerCApp *pApp = (CMPlayerCApp*)AfxGetApp();
- AppSettings& s = AfxGetAppSettings();
+ CRenderersData *pApp = GetRenderersData();
+ CRenderersSettings& s = GetRenderersSettings();
while (!bQuit)
{
@@ -809,9 +813,9 @@ void CDX9AllocatorPresenter::StopWorkerThreads() bool CDX9AllocatorPresenter::SettingsNeedResetDevice()
{
- AppSettings& s = AfxGetAppSettings();
- CMPlayerCApp::Settings::CRendererSettingsEVR & New = AfxGetAppSettings().m_RenderSettings;
- CMPlayerCApp::Settings::CRendererSettingsEVR & Current = m_LastRendererSettings;
+ CRenderersSettings& s = GetRenderersSettings();
+ CRenderersSettings::CRendererSettingsEVR & New = GetRenderersSettings().m_RenderSettings;
+ CRenderersSettings::CRendererSettingsEVR & Current = m_LastRendererSettings;
bool bRet = false;
@@ -857,7 +861,7 @@ bool CDX9AllocatorPresenter::SettingsNeedResetDevice() HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error)
{
StopWorkerThreads();
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_VBlankEndWait = 0;
m_VBlankMin = 300000;
m_VBlankMinCalc = 300000;
@@ -1092,7 +1096,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error) pp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}
-// if(m_fVMRSyncFix = AfxGetMyApp()->m_s.fVMRSyncFix)
+// if(m_fVMRSyncFix = GetRenderersData()->m_s.fVMRSyncFix)
// pp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
if (m_pD3DEx)
@@ -1150,7 +1154,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error) if(m_pSubPicQueue) m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -1191,7 +1195,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error) }
else
{
- m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator)
{
_Error += L"CDX9SubPicAllocator failed\n";
@@ -1201,8 +1205,8 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString &_Error) }
hr = S_OK;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
{
@@ -1257,7 +1261,7 @@ HRESULT CDX9AllocatorPresenter::AllocSurfaces(D3DFORMAT Format) CAutoLock cAutoLock(this);
CAutoLock cRenderLock(&m_RenderLock);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
for(int i = 0; i < m_nNbDXSurface+2; i++)
{
@@ -1327,7 +1331,7 @@ UINT CDX9AllocatorPresenter::GetAdapter(IDirect3D9* pD3D, bool CreateDevice) if(m_hWnd == NULL || pD3D == NULL)
return D3DADAPTER_DEFAULT;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if(CreateDevice && (pD3D->GetAdapterCount()>1) && (s.D3D9RenderDevice != _T("")))
{
TCHAR strGUID[50];
@@ -1495,25 +1499,25 @@ HRESULT CDX9AllocatorPresenter::InitResizers(float bicubicA, bool bNeedScreenSiz ASSERT (0);
return hr;
}
- /*
- if (i == 2 || i == 3)
- {
- const wchar_t *pStr = DissAssembly.GetString();
- TRACE("DisAsm: %s\n", pEntries[i]);
- const wchar_t *pStrStart = pStr;
- while (*pStr)
- {
- while (*pStr && *pStr != '\n')
- ++pStr;
- if (*pStr == '\n')
- ++pStr;
- if (*pStr == '\r')
- ++pStr;
- CString Test(pStrStart, pStr - pStrStart);
- TRACE("%ws", Test.GetString());
- pStrStart = pStr;
- }
- }
+ /*
+ if (i == 2 || i == 3)
+ {
+ const wchar_t *pStr = DissAssembly.GetString();
+ TRACE("DisAsm: %s\n", pEntries[i]);
+ const wchar_t *pStrStart = pStr;
+ while (*pStr)
+ {
+ while (*pStr && *pStr != '\n')
+ ++pStr;
+ if (*pStr == '\n')
+ ++pStr;
+ if (*pStr == '\r')
+ ++pStr;
+ CString Test(pStrStart, pStr - pStrStart);
+ TRACE("%ws", Test.GetString());
+ pStrStart = pStr;
+ }
+ }
*/
}
@@ -1965,7 +1969,7 @@ bool CDX9AllocatorPresenter::GetVBlank(int &_ScanLine, int &_bInVBlank, bool _bM {
LONGLONG llPerf;
if (_bMeasureTime)
- llPerf = AfxGetMyApp()->GetPerfCounter();
+ llPerf = GetRenderersData()->GetPerfCounter();
int ScanLine = 0;
_ScanLine = 0;
@@ -2006,7 +2010,7 @@ bool CDX9AllocatorPresenter::GetVBlank(int &_ScanLine, int &_bInVBlank, bool _bM if (_bMeasureTime)
{
- LONGLONG Time = AfxGetMyApp()->GetPerfCounter() - llPerf;
+ LONGLONG Time = GetRenderersData()->GetPerfCounter() - llPerf;
m_RasterStatusWaitTimeMaxCalc = max(m_RasterStatusWaitTimeMaxCalc, Time);
}
@@ -2022,7 +2026,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int &_RasterStart, int _RasterSi int InVBlank = 0;
LONGLONG llPerf;
if (_bMeasure)
- llPerf = AfxGetMyApp()->GetPerfCounter();
+ llPerf = GetRenderersData()->GetPerfCounter();
GetVBlank(ScanLine, InVBlank, _bMeasure);
if (_bMeasure)
m_VBlankStartWait = ScanLine;
@@ -2151,7 +2155,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int &_RasterStart, int _RasterSi if (!_bTakenLock && _bMeasure)
{
_bTakenLock = true;
- llPerfLock = AfxGetMyApp()->GetPerfCounter();
+ llPerfLock = GetRenderersData()->GetPerfCounter();
LockD3DDevice();
}
}
@@ -2175,11 +2179,11 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int &_RasterStart, int _RasterSi if (_bMeasure)
{
m_VBlankEndWait = ScanLine;
- m_VBlankWaitTime = AfxGetMyApp()->GetPerfCounter() - llPerf;
+ m_VBlankWaitTime = GetRenderersData()->GetPerfCounter() - llPerf;
if (_bTakenLock)
{
- m_VBlankLockTime = AfxGetMyApp()->GetPerfCounter() - llPerfLock;
+ m_VBlankLockTime = GetRenderersData()->GetPerfCounter() - llPerfLock;
}
else
m_VBlankLockTime = 0;
@@ -2194,7 +2198,7 @@ bool CDX9AllocatorPresenter::WaitForVBlankRange(int &_RasterStart, int _RasterSi int CDX9AllocatorPresenter::GetVBlackPos()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
BOOL bCompositionEnabled = m_bCompositionEnabled;
int WaitRange = max(m_ScreenSize.cy / 40, 5);
@@ -2221,7 +2225,7 @@ int CDX9AllocatorPresenter::GetVBlackPos() bool CDX9AllocatorPresenter::WaitForVBlank(bool &_Waited, bool &_bTakenLock)
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if (!s.m_RenderSettings.iVMR9VSync)
{
_Waited = true;
@@ -2290,7 +2294,7 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll) return false;
}
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
// TRACE("Thread: %d\n", (LONG)((CRITICAL_SECTION &)m_RenderLock).OwningThread);
@@ -2305,7 +2309,7 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll) }
#endif
- CMPlayerCApp * pApp = AfxGetMyApp();
+ CRenderersData * pApp = GetRenderersData();
LONGLONG StartPaint = pApp->GetPerfCounter();
CAutoLock cRenderLock(&m_RenderLock);
@@ -2661,7 +2665,7 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::Paint(bool fAll) if (fAll)
{
- m_PaintTime = (AfxGetMyApp()->GetPerfCounter() - StartPaint);
+ m_PaintTime = (GetRenderersData()->GetPerfCounter() - StartPaint);
m_PaintTimeMin = min(m_PaintTimeMin, m_PaintTime);
m_PaintTimeMax = max(m_PaintTimeMax, m_PaintTime);
}
@@ -2919,8 +2923,8 @@ void CDX9AllocatorPresenter::DrawText(const RECT &rc, const CString &strText, in void CDX9AllocatorPresenter::DrawStats()
{
- AppSettings& s = AfxGetAppSettings();
- CMPlayerCApp * pApp = AfxGetMyApp();
+ CRenderersSettings& s = GetRenderersSettings();
+ CRenderersData * pApp = GetRenderersData();
int bDetailedStats = 2;
switch (pApp->m_fDisplayStats)
{
@@ -2969,7 +2973,7 @@ void CDX9AllocatorPresenter::DrawStats() else
strText += "VMR9 ";
- if (s.fD3DFullscreen)
+ if (m_bIsFullscreen)
strText += "FS ";
if (s.m_RenderSettings.iVMR9FullscreenGUISupport)
strText += "FSGui ";
@@ -3163,7 +3167,7 @@ void CDX9AllocatorPresenter::DrawStats() OffsetRect (&rc, 0, TextHeight);
}
- strText.Format(L"DirectX SDK : %d", AfxGetMyApp()->GetDXSdkRelease());
+ strText.Format(L"DirectX SDK : %d", GetRenderersData()->GetDXSdkRelease());
DrawText(rc, strText, 1);
OffsetRect (&rc, 0, TextHeight);
diff --git a/src/apps/mplayerc/DX9AllocatorPresenter.h b/src/VideoRenderers/DX9AllocatorPresenter.h index b982c4062..ffff6fecd 100644 --- a/src/apps/mplayerc/DX9AllocatorPresenter.h +++ b/src/VideoRenderers/DX9AllocatorPresenter.h @@ -24,7 +24,8 @@ #pragma once
#include "AllocatorCommon.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
+#include <d3d9.h>
#define VMRBITMAP_UPDATE 0x80000000
#define MAX_PICTURE_SLOTS (60+2) // Last 2 for pixels shader!
@@ -59,7 +60,7 @@ protected: bool m_bNeedCheckSample;
DWORD m_MainThreadId;
- CMPlayerCApp::Settings::CRendererSettingsEVR m_LastRendererSettings;
+ CRenderersSettings::CRendererSettingsEVR m_LastRendererSettings;
HRESULT (__stdcall * m_pDwmIsCompositionEnabled)(__out BOOL* pfEnabled);
HRESULT (__stdcall * m_pDwmEnableComposition)(UINT uCompositionAction);
@@ -335,7 +336,7 @@ protected: CString m_D3D9Device;
public:
- CDX9AllocatorPresenter(HWND hWnd, HRESULT& hr, bool bIsEVR, CString &_Error);
+ CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, bool bIsEVR, CString &_Error);
~CDX9AllocatorPresenter();
// ISubPicAllocatorPresenter
diff --git a/src/apps/mplayerc/DXRAllocatorPresenter.cpp b/src/VideoRenderers/DXRAllocatorPresenter.cpp index 7d1f6258d..3b603ab3f 100644 --- a/src/apps/mplayerc/DXRAllocatorPresenter.cpp +++ b/src/VideoRenderers/DXRAllocatorPresenter.cpp @@ -21,10 +21,10 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
#include "DXRAllocatorPresenter.h"
#include <moreuuids.h>
-#include "MainFrm.h"
+//#include "MainFrm.h"
using namespace DSObjects;
@@ -88,7 +88,7 @@ HRESULT CDXRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev) CheckPointer(pD3DDev, E_POINTER);
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -129,15 +129,15 @@ HRESULT CDXRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev) }
else
{
- m_pAllocator = DNew CDX9SubPicAllocator(pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX9SubPicAllocator(pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator)
return E_FAIL;
}
HRESULT hr = S_OK;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
return E_FAIL;
diff --git a/src/apps/mplayerc/DXRAllocatorPresenter.h b/src/VideoRenderers/DXRAllocatorPresenter.h index fef02e56c..fef02e56c 100644 --- a/src/apps/mplayerc/DXRAllocatorPresenter.h +++ b/src/VideoRenderers/DXRAllocatorPresenter.h diff --git a/src/apps/mplayerc/EVRAllocatorPresenter.cpp b/src/VideoRenderers/EVRAllocatorPresenter.cpp index 2606150a6..8e27ef941 100644 --- a/src/apps/mplayerc/EVRAllocatorPresenter.cpp +++ b/src/VideoRenderers/EVRAllocatorPresenter.cpp @@ -22,12 +22,12 @@ #include "stdafx.h"
-#include "mplayerc.h"
+//#include "mplayerc.h"
#include "EVRAllocatorPresenter.h"
#include <Mferror.h>
#include "IPinHook.h"
#include "MacrovisionKicker.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
#if (0) // Set to 1 to activate EVR traces
#define TRACE_EVR TRACE
@@ -253,6 +253,8 @@ public: };
}
+using namespace DSObjects;
+
HRESULT STDMETHODCALLTYPE COuterEVR::GetState( DWORD dwMilliSecsTimeout, __out FILTER_STATE *State)
{
HRESULT ReturnValue;
@@ -298,11 +300,11 @@ COuterEVR::~COuterEVR() {
}
-CEVRAllocatorPresenter::CEVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error)
- : CDX9AllocatorPresenter(hWnd, hr, true, _Error)
+CEVRAllocatorPresenter::CEVRAllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error)
+ : CDX9AllocatorPresenter(hWnd, bFullscreen, hr, true, _Error)
{
HMODULE hLib;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_nResetToken = 0;
m_hThread = INVALID_HANDLE_VALUE;
@@ -945,7 +947,7 @@ HRESULT CEVRAllocatorPresenter::CreateProposedOutputType(IMFMediaType* pMixerTyp m_pMediaType->SetUINT32 (MF_MT_PAN_SCAN_ENABLED, 0);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
#if 1
if (s.m_RenderSettings.iEVROutputRange == 1)
@@ -1220,9 +1222,9 @@ bool CEVRAllocatorPresenter::GetImageFromMixer() pSample->GetUINT32 (GUID_SURFACE_INDEX, &dwSurface);
{
- llClockBefore = AfxGetMyApp()->GetPerfCounter();
+ llClockBefore = GetRenderersData()->GetPerfCounter();
hr = m_pMixer->ProcessOutput (0 , 1, &Buffer, &dwStatus);
- llClockAfter = AfxGetMyApp()->GetPerfCounter();
+ llClockAfter = GetRenderersData()->GetPerfCounter();
}
if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT)
@@ -1242,7 +1244,7 @@ bool CEVRAllocatorPresenter::GetImageFromMixer() REFERENCE_TIME nsDuration;
pSample->GetSampleDuration (&nsDuration);
- if (AfxGetMyApp()->m_fTearingTest)
+ if (GetRenderersData()->m_fTearingTest)
{
RECT rcTearing;
@@ -2018,12 +2020,12 @@ void CEVRAllocatorPresenter::RenderThread() timeGetDevCaps(&tc, sizeof(TIMECAPS));
dwResolution = min(max(tc.wPeriodMin, 0), tc.wPeriodMax);
dwUser = timeBeginPeriod(dwResolution);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
int NextSleepTime = 1;
while (!bQuit)
{
- LONGLONG llPerf = AfxGetMyApp()->GetPerfCounter();
+ LONGLONG llPerf = GetRenderersData()->GetPerfCounter();
if (!s.m_RenderSettings.iVMR9VSyncAccurate && NextSleepTime == 0)
NextSleepTime = 1;
dwObject = WaitForMultipleObjects (countof(hEvts), hEvts, FALSE, max(NextSleepTime < 0 ? 1 : NextSleepTime, 0));
@@ -2033,7 +2035,7 @@ void CEVRAllocatorPresenter::RenderThread() else if (m_bEvtQuit)
dwObject = WAIT_OBJECT_0;*/
// if (NextSleepTime)
-// TRACE_EVR("EVR: Sleep: %7.3f\n", double(AfxGetMyApp()->GetPerfCounter()-llPerf) / 10000.0);
+// TRACE_EVR("EVR: Sleep: %7.3f\n", double(GetRenderersData()->GetPerfCounter()-llPerf) / 10000.0);
if (NextSleepTime > 1)
NextSleepTime = 0;
else if (NextSleepTime == 0)
@@ -2070,7 +2072,7 @@ void CEVRAllocatorPresenter::RenderThread() // if (WaitForMultipleObjects (countof(hEvtsBuff), hEvtsBuff, FALSE, INFINITE) == WAIT_OBJECT_0+2)
{
CComPtr<IMFSample> pMFSample;
- LONGLONG llPerf = AfxGetMyApp()->GetPerfCounter();
+ LONGLONG llPerf = GetRenderersData()->GetPerfCounter();
int nSamplesLeft = 0;
if (SUCCEEDED (GetScheduledSample(&pMFSample, nSamplesLeft)))
{
@@ -2112,7 +2114,7 @@ void CEVRAllocatorPresenter::RenderThread() }
else if ((m_nRenderState == Started))
{
- LONGLONG CurrentCounter = AfxGetMyApp()->GetPerfCounter();
+ LONGLONG CurrentCounter = GetRenderersData()->GetPerfCounter();
// Calculate wake up timer
if (!m_bSignaledStarvation)
{
@@ -2475,7 +2477,7 @@ void CEVRAllocatorPresenter::MoveToScheduledList(IMFSample* pSample, bool _bSort CAutoLock lock(&m_SampleQueueLock);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
double ForceFPS = 0.0;
// double ForceFPS = 59.94;
// double ForceFPS = 23.976;
diff --git a/src/apps/mplayerc/EVRAllocatorPresenter.h b/src/VideoRenderers/EVRAllocatorPresenter.h index 1f0ee48ea..9939c6f0e 100644 --- a/src/apps/mplayerc/EVRAllocatorPresenter.h +++ b/src/VideoRenderers/EVRAllocatorPresenter.h @@ -63,7 +63,7 @@ class CEVRAllocatorPresenter : */
{
public:
- CEVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error);
+ CEVRAllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
~CEVRAllocatorPresenter(void);
DECLARE_IUNKNOWN;
diff --git a/src/apps/mplayerc/IPinHook.cpp b/src/VideoRenderers/IPinHook.cpp index 266f75fbe..266f75fbe 100644 --- a/src/apps/mplayerc/IPinHook.cpp +++ b/src/VideoRenderers/IPinHook.cpp diff --git a/src/apps/mplayerc/IPinHook.h b/src/VideoRenderers/IPinHook.h index 325ea7f9d..325ea7f9d 100644 --- a/src/apps/mplayerc/IPinHook.h +++ b/src/VideoRenderers/IPinHook.h diff --git a/src/apps/mplayerc/IQTVideoSurface.h b/src/VideoRenderers/IQTVideoSurface.h index 2f55ca95e..2f55ca95e 100644 --- a/src/apps/mplayerc/IQTVideoSurface.h +++ b/src/VideoRenderers/IQTVideoSurface.h diff --git a/src/apps/mplayerc/MacrovisionKicker.cpp b/src/VideoRenderers/MacrovisionKicker.cpp index 7933fbc18..7933fbc18 100644 --- a/src/apps/mplayerc/MacrovisionKicker.cpp +++ b/src/VideoRenderers/MacrovisionKicker.cpp diff --git a/src/apps/mplayerc/MacrovisionKicker.h b/src/VideoRenderers/MacrovisionKicker.h index f033aaf0f..f033aaf0f 100644 --- a/src/apps/mplayerc/MacrovisionKicker.h +++ b/src/VideoRenderers/MacrovisionKicker.h diff --git a/src/apps/mplayerc/PixelShaderCompiler.cpp b/src/VideoRenderers/PixelShaderCompiler.cpp index f91c9a82c..462003835 100644 --- a/src/apps/mplayerc/PixelShaderCompiler.cpp +++ b/src/VideoRenderers/PixelShaderCompiler.cpp @@ -22,8 +22,9 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
#include "PixelShaderCompiler.h"
+#include "RenderersSettings.h"
+#include "../apps/mplayerc/resource.h"
CPixelShaderCompiler::CPixelShaderCompiler(IDirect3DDevice9* pD3DDev, bool fStaySilent)
@@ -32,7 +33,7 @@ CPixelShaderCompiler::CPixelShaderCompiler(IDirect3DDevice9* pD3DDev, bool fStay , m_pD3DXDisassembleShader(NULL)
{
HINSTANCE hDll;
- hDll = AfxGetMyApp()->GetD3X9Dll();
+ hDll = GetRenderersData()->GetD3X9Dll();
if(hDll)
{
diff --git a/src/apps/mplayerc/PixelShaderCompiler.h b/src/VideoRenderers/PixelShaderCompiler.h index a941cc505..a941cc505 100644 --- a/src/apps/mplayerc/PixelShaderCompiler.h +++ b/src/VideoRenderers/PixelShaderCompiler.h diff --git a/src/apps/mplayerc/QT7AllocatorPresenter.cpp b/src/VideoRenderers/QT7AllocatorPresenter.cpp index 451c5b2e0..451c5b2e0 100644 --- a/src/apps/mplayerc/QT7AllocatorPresenter.cpp +++ b/src/VideoRenderers/QT7AllocatorPresenter.cpp diff --git a/src/apps/mplayerc/QT7AllocatorPresenter.h b/src/VideoRenderers/QT7AllocatorPresenter.h index 466bc8dcd..466bc8dcd 100644 --- a/src/apps/mplayerc/QT7AllocatorPresenter.h +++ b/src/VideoRenderers/QT7AllocatorPresenter.h diff --git a/src/apps/mplayerc/QT9AllocatorPresenter.cpp b/src/VideoRenderers/QT9AllocatorPresenter.cpp index 3ea6d46f1..994a65a6c 100644 --- a/src/apps/mplayerc/QT9AllocatorPresenter.cpp +++ b/src/VideoRenderers/QT9AllocatorPresenter.cpp @@ -21,9 +21,9 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+//#include "mplayerc.h"
#include "QT9AllocatorPresenter.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
using namespace DSObjects;
@@ -31,8 +31,8 @@ using namespace DSObjects; // CQT9AllocatorPresenter
//
-CQT9AllocatorPresenter::CQT9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error)
- : CDX9AllocatorPresenter(hWnd, hr, false, _Error)
+CQT9AllocatorPresenter::CQT9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error)
+ : CDX9AllocatorPresenter(hWnd, bFullscreen, hr, false, _Error)
{
}
diff --git a/src/apps/mplayerc/QT9AllocatorPresenter.h b/src/VideoRenderers/QT9AllocatorPresenter.h index c10cd3e3c..1ffca90f4 100644 --- a/src/apps/mplayerc/QT9AllocatorPresenter.h +++ b/src/VideoRenderers/QT9AllocatorPresenter.h @@ -38,7 +38,7 @@ protected: void DeleteSurfaces();
public:
- CQT9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error);
+ CQT9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
diff --git a/src/apps/mplayerc/RM7AllocatorPresenter.cpp b/src/VideoRenderers/RM7AllocatorPresenter.cpp index 272ea2f1f..272ea2f1f 100644 --- a/src/apps/mplayerc/RM7AllocatorPresenter.cpp +++ b/src/VideoRenderers/RM7AllocatorPresenter.cpp diff --git a/src/apps/mplayerc/RM7AllocatorPresenter.h b/src/VideoRenderers/RM7AllocatorPresenter.h index ab1d8fe78..ab1d8fe78 100644 --- a/src/apps/mplayerc/RM7AllocatorPresenter.h +++ b/src/VideoRenderers/RM7AllocatorPresenter.h diff --git a/src/apps/mplayerc/RM9AllocatorPresenter.cpp b/src/VideoRenderers/RM9AllocatorPresenter.cpp index 09066b155..a2e8a3e58 100644 --- a/src/apps/mplayerc/RM9AllocatorPresenter.cpp +++ b/src/VideoRenderers/RM9AllocatorPresenter.cpp @@ -21,9 +21,9 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+//#include "mplayerc.h"
#include "RM9AllocatorPresenter.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
using namespace DSObjects;
@@ -31,8 +31,8 @@ using namespace DSObjects; // CRM9AllocatorPresenter
//
-CRM9AllocatorPresenter::CRM9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error)
- : CDX9AllocatorPresenter(hWnd, hr, false, _Error)
+CRM9AllocatorPresenter::CRM9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error)
+ : CDX9AllocatorPresenter(hWnd, bFullscreen, hr, false, _Error)
{
}
diff --git a/src/apps/mplayerc/RM9AllocatorPresenter.h b/src/VideoRenderers/RM9AllocatorPresenter.h index 183bb1c01..c673a2664 100644 --- a/src/apps/mplayerc/RM9AllocatorPresenter.h +++ b/src/VideoRenderers/RM9AllocatorPresenter.h @@ -46,7 +46,7 @@ protected: void DeleteSurfaces();
public:
- CRM9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error);
+ CRM9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
diff --git a/src/VideoRenderers/RenderersSettings.cpp b/src/VideoRenderers/RenderersSettings.cpp new file mode 100644 index 000000000..5668e6b96 --- /dev/null +++ b/src/VideoRenderers/RenderersSettings.cpp @@ -0,0 +1,108 @@ +/*
+ * $Id: mplayerc.cpp 1803 2010-04-20 19:45:33Z xhmikosr $
+ *
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "stdafx.h"
+#include "RenderersSettings.h"
+#include <d3dx9.h>
+
+#pragma comment(lib, "winmm.lib")
+
+/////////////////////////////////////////////////////////////////////////////
+// CRenderersData construction
+
+CRenderersData::CRenderersData()
+{
+ m_fTearingTest = false;
+ m_fDisplayStats = false;
+ m_bResetStats = false;
+ m_hD3DX9Dll = NULL;
+ m_nDXSdkRelease = 0;
+}
+
+LONGLONG CRenderersData::GetPerfCounter()
+{
+ LARGE_INTEGER i64Ticks100ns;
+ LARGE_INTEGER llPerfFrequency;
+
+ QueryPerformanceFrequency (&llPerfFrequency);
+ if (llPerfFrequency.QuadPart != 0)
+ {
+ QueryPerformanceCounter (&i64Ticks100ns);
+ return llMulDiv (i64Ticks100ns.QuadPart, 10000000, llPerfFrequency.QuadPart, 0);
+ }
+ else
+ {
+ // ms to 100ns units
+ return timeGetTime() * 10000;
+ }
+}
+
+HINSTANCE CRenderersData::GetD3X9Dll()
+{
+ if (m_hD3DX9Dll == NULL)
+ {
+ int min_ver = D3DX_SDK_VERSION;
+ int max_ver = D3DX_SDK_VERSION;
+
+ m_nDXSdkRelease = 0;
+
+ if(D3DX_SDK_VERSION >= 42)
+ {
+ // August 2009 SDK (v42) is not compatible with older versions
+ min_ver = 42;
+ }
+ else
+ {
+ if(D3DX_SDK_VERSION > 33)
+ {
+ // versions between 34 and 41 have no known compatibility issues
+ min_ver = 34;
+ }
+ else
+ {
+ // The minimum version that supports the functionality required by MPC is 24
+ min_ver = 24;
+
+ if(D3DX_SDK_VERSION == 33)
+ {
+ // The April 2007 SDK (v33) should not be used (crash sometimes during shader compilation)
+ max_ver = 32;
+ }
+ }
+ }
+
+ // load latest compatible version of the DLL that is available
+ for (int i=max_ver; i>=min_ver; i--)
+ {
+ m_strD3DX9Version.Format(_T("d3dx9_%d.dll"), i);
+ m_hD3DX9Dll = LoadLibrary (m_strD3DX9Version);
+ if (m_hD3DX9Dll)
+ {
+ m_nDXSdkRelease = i;
+ break;
+ }
+ }
+ }
+
+ return m_hD3DX9Dll;
+}
diff --git a/src/VideoRenderers/RenderersSettings.h b/src/VideoRenderers/RenderersSettings.h new file mode 100644 index 000000000..a8bbf0c20 --- /dev/null +++ b/src/VideoRenderers/RenderersSettings.h @@ -0,0 +1,198 @@ +/*
+ * $Id: mplayerc.h 1826 2010-05-02 01:20:06Z kinddragon $
+ *
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+enum
+{
+ WM_REARRANGERENDERLESS = WM_APP+1,
+ WM_RESET_DEVICE,
+};
+
+#define WM_MYMOUSELAST WM_XBUTTONDBLCLK
+
+enum
+{
+ VIDRNDT_RM_DEFAULT,
+ VIDRNDT_RM_DX7,
+ VIDRNDT_RM_DX9,
+};
+
+enum
+{
+ VIDRNDT_QT_DEFAULT,
+ VIDRNDT_QT_DX7,
+ VIDRNDT_QT_DX9,
+};
+
+enum
+{
+ VIDRNDT_AP_SURFACE,
+ VIDRNDT_AP_TEXTURE2D,
+ VIDRNDT_AP_TEXTURE3D,
+};
+
+class CRenderersSettings
+{
+
+public:
+ bool fResetDevice;
+
+ class CRendererSettingsShared
+ {
+ public:
+ CRendererSettingsShared()
+ {
+ SetDefault();
+ }
+ bool fVMR9AlterativeVSync;
+ int iVMR9VSyncOffset;
+ bool iVMR9VSyncAccurate;
+ bool iVMR9FullscreenGUISupport;
+ bool iVMR9VSync;
+ bool iVMRDisableDesktopComposition;
+ int iVMRFlushGPUBeforeVSync;
+ int iVMRFlushGPUAfterPresent;
+ int iVMRFlushGPUWait;
+
+ // SyncRenderer settings
+ int bSynchronizeVideo;
+ int bSynchronizeDisplay;
+ int bSynchronizeNearest;
+ int iLineDelta;
+ int iColumnDelta;
+ double fCycleDelta;
+ double fTargetSyncOffset;
+ double fControlLimit;
+
+ void SetDefault()
+ {
+ fVMR9AlterativeVSync = 0;
+ iVMR9VSyncOffset = 0;
+ iVMR9VSyncAccurate = 1;
+ iVMR9FullscreenGUISupport = 0;
+ iVMR9VSync = 1;
+ iVMRDisableDesktopComposition = 0;
+ iVMRFlushGPUBeforeVSync = 1;
+ iVMRFlushGPUAfterPresent = 1;
+ iVMRFlushGPUWait = 0;
+ bSynchronizeVideo = 0;
+ bSynchronizeDisplay = 0;
+ bSynchronizeNearest = 1;
+ iLineDelta = 0;
+ iColumnDelta = 0;
+ fCycleDelta = 0.0012;
+ fTargetSyncOffset = 12.0;
+ fControlLimit = 2.0;
+ }
+ void SetOptimal()
+ {
+ fVMR9AlterativeVSync = 1;
+ iVMR9VSyncAccurate = 1;
+ iVMR9VSync = 1;
+ iVMRDisableDesktopComposition = 1;
+ iVMRFlushGPUBeforeVSync = 1;
+ iVMRFlushGPUAfterPresent = 1;
+ iVMRFlushGPUWait = 0;
+ bSynchronizeVideo = 0;
+ bSynchronizeDisplay = 0;
+ bSynchronizeNearest = 1;
+ iLineDelta = 0;
+ iColumnDelta = 0;
+ fCycleDelta = 0.0012;
+ fTargetSyncOffset = 12.0;
+ fControlLimit = 2.0;
+ }
+ };
+ class CRendererSettingsEVR : public CRendererSettingsShared
+ {
+ public:
+ bool iEVRHighColorResolution;
+ bool iEVREnableFrameTimeCorrection;
+ int iEVROutputRange;
+
+ CRendererSettingsEVR()
+ {
+ SetDefault();
+ }
+ void SetDefault()
+ {
+ CRendererSettingsShared::SetDefault();
+ iEVRHighColorResolution = 0;
+ iEVREnableFrameTimeCorrection = 0;
+ iEVROutputRange = 0;
+ }
+ void SetOptimal()
+ {
+ CRendererSettingsShared::SetOptimal();
+ iEVRHighColorResolution = 0;
+ }
+ };
+
+ CRendererSettingsEVR m_RenderSettings;
+
+ int iAPSurfaceUsage;
+ //bool fVMRSyncFix;
+ int iDX9Resizer;
+ bool fVMR9MixerMode;
+ bool fVMR9MixerYUV;
+ int iEvrBuffers;
+
+ int nSPCSize;
+ int nSPCMaxRes;
+ bool fSPCPow2Tex;
+ bool fSPCAllowAnimationWhenBuffering;
+
+ CString D3D9RenderDevice;
+};
+
+
+class CRenderersData
+{
+ HINSTANCE m_hD3DX9Dll;
+ int m_nDXSdkRelease;
+
+public:
+ CRenderersData();
+
+ // === CASIMIR666
+ bool m_fTearingTest;
+ int m_fDisplayStats;
+ bool m_bResetStats; // Set to reset the presentation statistics
+ CString m_strD3DX9Version;
+
+ CWnd* m_pMainWnd; // main window (usually same AfxGetApp()->m_pMainWnd)
+
+ LONGLONG GetPerfCounter();
+ HINSTANCE GetD3X9Dll();
+ int GetDXSdkRelease()
+ {
+ return m_nDXSdkRelease;
+ };
+};
+
+extern CRenderersData* GetRenderersData();
+extern CRenderersSettings& GetRenderersSettings();
+
+extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
+extern bool IsVistaOrAbove();
diff --git a/src/apps/mplayerc/SyncAllocatorPresenter.h b/src/VideoRenderers/SyncAllocatorPresenter.h index 22dbf744b..d1fbe6871 100644 --- a/src/apps/mplayerc/SyncAllocatorPresenter.h +++ b/src/VideoRenderers/SyncAllocatorPresenter.h @@ -26,4 +26,4 @@ // {F9F62627-E3EF-4a2e-B6C9-5D4C0DC3326B}
DEFINE_GUID(CLSID_SyncAllocatorPresenter, 0xf9f62627, 0xe3ef, 0x4a2e, 0xb6, 0xc9, 0x5d, 0x4c, 0xd, 0xc3, 0x32, 0x6b);
-HRESULT CreateSyncRenderer(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP);
\ No newline at end of file +HRESULT CreateSyncRenderer(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP);
\ No newline at end of file diff --git a/src/apps/mplayerc/SyncRenderer.cpp b/src/VideoRenderers/SyncRenderer.cpp index 7beee7156..3922855e7 100644 --- a/src/apps/mplayerc/SyncRenderer.cpp +++ b/src/VideoRenderers/SyncRenderer.cpp @@ -23,9 +23,10 @@ #include "stdafx.h"
#include "../../filters/misc/SyncClock/Interfaces.h"
-#include "mplayerc.h"
+//#include "mplayerc.h"
#include <atlbase.h>
#include <atlcoll.h>
+#include "../apps/mplayerc/resource.h"
#include "../../DSUtil/DSUtil.h"
#include <strsafe.h> // Required in CGenlock
#include <Videoacc.h>
@@ -36,18 +37,22 @@ #include <evr.h>
#include <mfapi.h>
#include <Mferror.h>
+#include <vector>
#include "../../SubPic/DX9SubPic.h"
#include <moreuuids.h>
#include "MacrovisionKicker.h"
#include "IPinHook.h"
#include "PixelShaderCompiler.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
#include "SyncRenderer.h"
// only for debugging
//#define DISABLE_USING_D3D9EX
using namespace GothSync;
+using namespace std;
+
+extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
CString GothSyncErrorMessage(HRESULT _Error, HMODULE _Module)
{
@@ -129,7 +134,7 @@ CString GothSyncErrorMessage(HRESULT _Error, HMODULE _Module) return Temp + errmsg;
}
-CBaseAP::CBaseAP(HWND hWnd, HRESULT& hr, CString &_Error):
+CBaseAP::CBaseAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error):
ISubPicAllocatorPresenterImpl(hWnd, hr, &_Error),
m_ScreenSize(0, 0),
m_bicubicA(0),
@@ -143,8 +148,8 @@ CBaseAP::CBaseAP(HWND hWnd, HRESULT& hr, CString &_Error): m_TextScale(1.0),
m_dMainThreadId(0),
m_bNeedCheckSample(true),
- m_hEvtQuit(INVALID_HANDLE_VALUE),
- m_bIsFullscreen((AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode())),
+ m_hEvtQuit(INVALID_HANDLE_VALUE),
+ m_bIsFullscreen(bFullscreen),
m_uSyncGlitches(0),
m_pGenlock(NULL),
m_lAudioLag(0),
@@ -179,7 +184,7 @@ CBaseAP::CBaseAP(HWND hWnd, HRESULT& hr, CString &_Error): m_pD3DXCreateLine = NULL;
m_pD3DXCreateFont = NULL;
m_pD3DXCreateSprite = NULL;
- hDll = AfxGetMyApp()->GetD3X9Dll();
+ hDll = GetRenderersData()->GetD3X9Dll();
if(hDll)
{
(FARPROC &)m_pD3DXLoadSurfaceFromMemory = GetProcAddress(hDll, "D3DXLoadSurfaceFromMemory");
@@ -232,7 +237,7 @@ CBaseAP::CBaseAP(HWND hWnd, HRESULT& hr, CString &_Error): ZeroMemory(&m_VMR9AlphaBitmap, sizeof(m_VMR9AlphaBitmap));
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if (s.m_RenderSettings.iVMRDisableDesktopComposition)
{
m_bDesktopCompositionDisabled = true;
@@ -448,9 +453,9 @@ void CBaseAP::ResetStats() bool CBaseAP::SettingsNeedResetDevice()
{
- AppSettings& s = AfxGetAppSettings();
- CMPlayerCApp::Settings::CRendererSettingsEVR & New = AfxGetAppSettings().m_RenderSettings;
- CMPlayerCApp::Settings::CRendererSettingsEVR & Current = m_LastRendererSettings;
+ CRenderersSettings& s = GetRenderersSettings();
+ CRenderersSettings::CRendererSettingsEVR & New = s.m_RenderSettings;
+ CRenderersSettings::CRendererSettingsEVR & Current = m_LastRendererSettings;
bool bRet = false;
if (!m_bIsFullscreen)
@@ -482,7 +487,7 @@ bool CBaseAP::SettingsNeedResetDevice() HRESULT CBaseAP::CreateDXDevice(CString &_Error)
{
TRACE("--> CBaseAP::CreateDXDevice on thread: %d\n", GetCurrentThreadId());
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_LastRendererSettings = s.m_RenderSettings;
HRESULT hr = E_FAIL;
@@ -675,7 +680,7 @@ HRESULT CBaseAP::CreateDXDevice(CString &_Error) m_bicubicA = 0;
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -716,7 +721,7 @@ HRESULT CBaseAP::CreateDXDevice(CString &_Error) }
else
{
- m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator)
{
_Error += L"CDX9SubPicAllocator failed\n";
@@ -734,8 +739,8 @@ HRESULT CBaseAP::CreateDXDevice(CString &_Error) }
m_pSubPicQueue = NULL;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
{
@@ -761,7 +766,7 @@ HRESULT CBaseAP::CreateDXDevice(CString &_Error) HRESULT CBaseAP::ResetDXDevice(CString &_Error)
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_LastRendererSettings = s.m_RenderSettings;
HRESULT hr = E_FAIL;
@@ -970,7 +975,7 @@ HRESULT CBaseAP::ResetDXDevice(CString &_Error) CComPtr<ISubPicProvider> pSubPicProvider;
if(m_pSubPicQueue) m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -1011,7 +1016,7 @@ HRESULT CBaseAP::ResetDXDevice(CString &_Error) }
else
{
- m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX9SubPicAllocator(m_pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator)
{
_Error += L"CDX9SubPicAllocator failed\n";
@@ -1021,8 +1026,8 @@ HRESULT CBaseAP::ResetDXDevice(CString &_Error) }
hr = S_OK;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
{
@@ -1055,7 +1060,7 @@ HRESULT CBaseAP::AllocSurfaces(D3DFORMAT Format) CAutoLock cAutoLock(this);
CAutoLock cRenderLock(&m_allocatorLock);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
for(int i = 0; i < m_nDXSurface+2; i++)
{
@@ -1683,8 +1688,8 @@ STDMETHODIMP_(bool) CBaseAP::Paint(bool fAll) return false;
}
- AppSettings& s = AfxGetAppSettings();
- CMPlayerCApp * pApp = AfxGetMyApp();
+ CRenderersSettings& s = GetRenderersSettings();
+ CRenderersData * pApp = GetRenderersData();
D3DRASTER_STATUS rasterStatus;
REFERENCE_TIME llCurRefTime = 0;
REFERENCE_TIME llSyncOffset = 0;
@@ -2083,8 +2088,8 @@ void CBaseAP::DrawText(const RECT &rc, const CString &strText, int _Priority) void CBaseAP::DrawStats()
{
- AppSettings& s = AfxGetAppSettings();
- CMPlayerCApp * pApp = AfxGetMyApp();
+ CRenderersSettings& s = GetRenderersSettings();
+ CRenderersData * pApp = GetRenderersData();
LONGLONG llMaxJitter = m_MaxJitter;
LONGLONG llMinJitter = m_MinJitter;
@@ -2228,7 +2233,7 @@ void CBaseAP::DrawStats() DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
- strText.Format(L"DirectX SDK: %d", AfxGetMyApp()->GetDXSdkRelease());
+ strText.Format(L"DirectX SDK: %d", GetRenderersData()->GetDXSdkRelease());
DrawText(rc, strText, 1);
OffsetRect(&rc, 0, TextHeight);
@@ -2345,7 +2350,7 @@ void CBaseAP::EstimateRefreshTimings() {
if (m_pD3DDev)
{
- CMPlayerCApp *pApp = AfxGetMyApp();
+ CRenderersData *pApp = GetRenderersData();
D3DRASTER_STATUS rasterStatus;
m_pD3DDev->GetRasterStatus(0, &rasterStatus);
while (rasterStatus.ScanLine != 0) m_pD3DDev->GetRasterStatus(0, &rasterStatus);
@@ -2495,10 +2500,10 @@ STDMETHODIMP CBaseAP::SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScr }
-CSyncAP::CSyncAP(HWND hWnd, HRESULT& hr, CString &_Error): CBaseAP(hWnd, hr, _Error)
+CSyncAP::CSyncAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error): CBaseAP(hWnd, bFullscreen, hr, _Error)
{
HMODULE hLib;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_nResetToken = 0;
m_hRenderThread = INVALID_HANDLE_VALUE;
@@ -2922,7 +2927,7 @@ void CSyncAP::CompleteFrameStep(bool bCancel) STDMETHODIMP CSyncAP::ProcessMessage(MFVP_MESSAGE_TYPE eMessage, ULONG_PTR ulParam)
{
HRESULT hr = S_OK;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
switch (eMessage)
{
@@ -2943,11 +2948,9 @@ STDMETHODIMP CSyncAP::ProcessMessage(MFVP_MESSAGE_TYPE eMessage, ULONG_PTR ulPar break;
case MFVP_MESSAGE_ENDSTREAMING:
- {
m_pGenlock->ResetTiming();
m_pRefClock = NULL;
- }
- break;
+ break;
case MFVP_MESSAGE_FLUSH:
SetEvent(m_hEvtFlush);
@@ -3010,7 +3013,7 @@ HRESULT CSyncAP::CreateProposedOutputType(IMFMediaType* pMixerType, IMFMediaType i64Size.LowPart = VideoFormat->videoInfo.dwHeight;
m_pMediaType->SetUINT64(MF_MT_FRAME_SIZE, i64Size.QuadPart);
m_pMediaType->SetUINT32(MF_MT_PAN_SCAN_ENABLED, 0);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if (s.m_RenderSettings.iEVROutputRange == 1)
m_pMediaType->SetUINT32(MF_MT_VIDEO_NOMINAL_RANGE, MFNominalRange_16_235);
@@ -3231,9 +3234,9 @@ bool CSyncAP::GetSampleFromMixer() Buffer.pSample = pSample;
pSample->GetUINT32(GUID_SURFACE_INDEX, &dwSurface);
{
- llClockBefore = AfxGetMyApp()->GetPerfCounter();
+ llClockBefore = GetRenderersData()->GetPerfCounter();
hr = m_pMixer->ProcessOutput(0 , 1, &Buffer, &dwStatus);
- llClockAfter = AfxGetMyApp()->GetPerfCounter();
+ llClockAfter = GetRenderersData()->GetPerfCounter();
}
if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) // There are no samples left in the mixer
@@ -3249,7 +3252,7 @@ bool CSyncAP::GetSampleFromMixer() newSample = true;
- if (AfxGetMyApp()->m_fTearingTest)
+ if (GetRenderersData()->m_fTearingTest)
{
RECT rcTearing;
@@ -3656,7 +3659,7 @@ void CSyncAP::RenderThread() if (pfAvSetMmThreadCharacteristicsW) hAvrt = pfAvSetMmThreadCharacteristicsW (L"Playback", &dwTaskIndex);
if (pfAvSetMmThreadPriority) pfAvSetMmThreadPriority (hAvrt, AVRT_PRIORITY_HIGH);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
// Set timer resolution
timeGetDevCaps(&tc, sizeof(TIMECAPS));
@@ -3673,7 +3676,7 @@ void CSyncAP::RenderThread() LONG lDisplayCycle2 = (LONG)(GetDisplayCycle() / 2.0); // These are a couple of empirically determined constants used the control the "snap" function
LONG lDisplayCycle4 = (LONG)(GetDisplayCycle() / 4.0);
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
dTargetSyncOffset = s.m_RenderSettings.fTargetSyncOffset;
if ((m_nRenderState == Started || !m_bPrerolled) && !pNewSample) // If either streaming or the pre-roll sample and no sample yet fetched
@@ -3979,12 +3982,12 @@ void CSyncAP::FlushSamplesInternal() HRESULT CSyncAP::BeginStreaming()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
m_pcFramesDropped = 0;
m_pcFramesDrawn = 0;
- if (s.m_RenderSettings.bSynchronizeVideo)
- m_pGenlock->AdviseSyncClock(((CMainFrame*)(AfxGetApp()->m_pMainWnd))->m_pSyncClock);
+ //if (s.m_RenderSettings.bSynchronizeVideo)
+ // m_pGenlock->AdviseSyncClock(((CMainFrame*)(AfxGetApp()->m_pMainWnd))->m_pSyncClock);
CComPtr<IBaseFilter> pEVR;
FILTER_INFO filterInfo;
ZeroMemory(&filterInfo, sizeof(filterInfo));
@@ -4009,13 +4012,13 @@ HRESULT CSyncAP::BeginStreaming() return S_OK;
}
-HRESULT CreateSyncRenderer(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP)
+HRESULT CreateSyncRenderer(const CLSID& clsid, HWND hWnd, bool bFullscreen, ISubPicAllocatorPresenter** ppAP)
{
HRESULT hr = E_FAIL;
if (clsid == CLSID_SyncAllocatorPresenter)
{
- CString Error;
- *ppAP = DNew CSyncAP(hWnd, hr, Error);
+ CString Error;
+ *ppAP = DNew CSyncAP(hWnd, bFullscreen, hr, Error);
(*ppAP)->AddRef();
if(FAILED(hr))
@@ -4472,7 +4475,7 @@ HRESULT CGenlock::ControlDisplay(double syncOffset, double frameCycle) WPARAM wParam = monitor;
ATOM setTiming;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
targetSyncOffset = s.m_RenderSettings.fTargetSyncOffset;
lowSyncOffset = targetSyncOffset - s.m_RenderSettings.fControlLimit;
highSyncOffset = targetSyncOffset + s.m_RenderSettings.fControlLimit;
@@ -4538,7 +4541,7 @@ HRESULT CGenlock::ControlDisplay(double syncOffset, double frameCycle) // Todo: check so that we don't have a live source
HRESULT CGenlock::ControlClock(double syncOffset, double frameCycle)
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
targetSyncOffset = s.m_RenderSettings.fTargetSyncOffset;
lowSyncOffset = targetSyncOffset - s.m_RenderSettings.fControlLimit;
highSyncOffset = targetSyncOffset + s.m_RenderSettings.fControlLimit;
diff --git a/src/apps/mplayerc/SyncRenderer.h b/src/VideoRenderers/SyncRenderer.h index 1338333a0..74767c169 100644 --- a/src/apps/mplayerc/SyncRenderer.h +++ b/src/VideoRenderers/SyncRenderer.h @@ -23,7 +23,10 @@ #pragma once
#include "../../SubPic/ISubPic.h"
+#include "RenderersSettings.h"
#include "SyncAllocatorPresenter.h"
+#include "AllocatorCommon.h"
+#include <dxva2api.h>
#define VMRBITMAP_UPDATE 0x80000000
#define MAX_PICTURE_SLOTS (60+2) // Last 2 for pixels shader!
@@ -109,7 +112,7 @@ class CBaseAP: public ISubPicAllocatorPresenterImpl
{
protected:
- CMPlayerCApp::Settings::CRendererSettingsEVR m_LastRendererSettings;
+ CRenderersSettings::CRendererSettingsEVR m_LastRendererSettings;
HMODULE m_hDWMAPI;
HRESULT (__stdcall * m_pDwmIsCompositionEnabled)(__out BOOL* pfEnabled);
@@ -321,7 +324,7 @@ protected: bool ExtractInterlaced(const AM_MEDIA_TYPE* pmt);
public:
- CBaseAP(HWND hWnd, HRESULT& hr, CString &_Error);
+ CBaseAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
~CBaseAP();
CCritSec m_VMR9AlphaBitmapLock;
@@ -352,7 +355,7 @@ class CSyncAP: {
public:
- CSyncAP(HWND hWnd, HRESULT& hr, CString &_Error);
+ CSyncAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
~CSyncAP(void);
DECLARE_IUNKNOWN;
diff --git a/src/apps/mplayerc/VMR7AllocatorPresenter.cpp b/src/VideoRenderers/VMR7AllocatorPresenter.cpp index e67451ffb..a450fdc32 100644 --- a/src/apps/mplayerc/VMR7AllocatorPresenter.cpp +++ b/src/VideoRenderers/VMR7AllocatorPresenter.cpp @@ -22,7 +22,7 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
#include "VMR7AllocatorPresenter.h"
#include "IPinHook.h"
diff --git a/src/apps/mplayerc/VMR7AllocatorPresenter.h b/src/VideoRenderers/VMR7AllocatorPresenter.h index 6d6716c08..6d6716c08 100644 --- a/src/apps/mplayerc/VMR7AllocatorPresenter.h +++ b/src/VideoRenderers/VMR7AllocatorPresenter.h diff --git a/src/apps/mplayerc/VMR9AllocatorPresenter.cpp b/src/VideoRenderers/VMR9AllocatorPresenter.cpp index 634b8e088..d31d9ee3a 100644 --- a/src/apps/mplayerc/VMR9AllocatorPresenter.cpp +++ b/src/VideoRenderers/VMR9AllocatorPresenter.cpp @@ -21,11 +21,11 @@ */
#include "stdafx.h"
-#include "mplayerc.h"
+//#include "mplayerc.h"
#include "VMR9AllocatorPresenter.h"
#include "IPinHook.h"
#include "MacrovisionKicker.h"
-#include "MainFrm.h"
+//#include "MainFrm.h"
// ISubPicAllocatorPresenter
@@ -579,8 +579,8 @@ using namespace DSObjects; #define MY_USER_ID 0x6ABE51
-CVMR9AllocatorPresenter::CVMR9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error)
- : CDX9AllocatorPresenter(hWnd, hr, false, _Error)
+CVMR9AllocatorPresenter::CVMR9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error)
+ : CDX9AllocatorPresenter(hWnd, bFullscreen, hr, false, _Error)
, m_fUseInternalTimer(false)
, m_rtPrevStart(-1)
{
@@ -656,7 +656,7 @@ STDMETHODIMP CVMR9AllocatorPresenter::CreateRenderer(IUnknown** ppRenderer) if(!pConfig)
break;
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = GetRenderersSettings();
if(s.fVMR9MixerMode)
{
@@ -671,7 +671,7 @@ STDMETHODIMP CVMR9AllocatorPresenter::CreateRenderer(IUnknown** ppRenderer) // See http://msdn.microsoft.com/en-us/library/dd390928(VS.85).aspx
dwPrefs |= MixerPref9_NonSquareMixing;
dwPrefs |= MixerPref9_NoDecimation;
- if(s.fVMR9MixerYUV && !AfxGetMyApp()->IsVistaOrAbove())
+ if(s.fVMR9MixerYUV && !IsVistaOrAbove())
{
dwPrefs &= ~MixerPref9_RenderTargetMask;
dwPrefs |= MixerPref9_RenderTargetYUV;
@@ -969,7 +969,7 @@ STDMETHODIMP CVMR9AllocatorPresenter::PresentImage(DWORD_PTR dwUserID, VMR9Prese }
// Tear test bars
- if (AfxGetMyApp()->m_fTearingTest)
+ if (GetRenderersData()->m_fTearingTest)
{
RECT rcTearing;
diff --git a/src/apps/mplayerc/VMR9AllocatorPresenter.h b/src/VideoRenderers/VMR9AllocatorPresenter.h index 66130fc4c..587839afe 100644 --- a/src/apps/mplayerc/VMR9AllocatorPresenter.h +++ b/src/VideoRenderers/VMR9AllocatorPresenter.h @@ -43,7 +43,7 @@ protected: REFERENCE_TIME m_rtPrevStart;
public:
- CVMR9AllocatorPresenter(HWND hWnd, HRESULT& hr, CString &_Error);
+ CVMR9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString &_Error);
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
diff --git a/src/VideoRenderers/VideoRenderers.vcproj b/src/VideoRenderers/VideoRenderers.vcproj new file mode 100644 index 000000000..b8cfd05bf --- /dev/null +++ b/src/VideoRenderers/VideoRenderers.vcproj @@ -0,0 +1,536 @@ +<?xml version="1.0" encoding="windows-1250"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="VideoRenderers"
+ ProjectGUID="{FB565A7A-50DC-4A0D-852D-5E7F74DAB82C}"
+ RootNamespace="mplayerc"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release Unicode|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="..\common.vsprops;..\release.vsprops"
+ UseOfMFC="1"
+ UseOfATL="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release_unicode/mplayerc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="..\..\include;..\..\include\dx;..\..\include\atl;..\filters\BaseClasses;..\zlib"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;DETOURS_X32"
+ BufferSecurityCheck="true"
+ EnableEnhancedInstructionSet="1"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile="$(OutDir)\$(ProjectName).pch"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ ExcludedFromBuild="false"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="..\common.vsprops;..\release.vsprops"
+ UseOfMFC="1"
+ UseOfATL="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release_unicode/mplayerc.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="..\..\include;..\..\include\dx;..\..\include\atl;..\filters\BaseClasses;..\zlib"
+ PreprocessorDefinitions="_WIN64;NDEBUG;_WINDOWS;DETOURS_X64"
+ BufferSecurityCheck="true"
+ EnableEnhancedInstructionSet="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile="$(OutDir)\$(ProjectName).pch"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories=""
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ ExcludedFromBuild="false"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="..\common.vsprops;..\debug.vsprops"
+ UseOfMFC="1"
+ UseOfATL="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="..\..\include;..\..\include\dx;..\..\include\atl;..\filters\BaseClasses;..\zlib"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;DETOURS_X32"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile="$(OutDir)\$(ProjectName).pch"
+ ShowIncludes="false"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ InheritedPropertySheets="..\common.vsprops;..\debug.vsprops"
+ UseOfMFC="1"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="3"
+ TypeLibraryName="$(OutDir)\$(ProjectName).tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
+ AdditionalIncludeDirectories="..\..\include;..\..\include\dx;..\..\include\atl;..\filters\BaseClasses;..\zlib"
+ PreprocessorDefinitions="_WIN64;_DEBUG;_WINDOWS;DETOURS_X64"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile="$(OutDir)\$(ProjectName).pch"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\AllocatorCommon.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\AllocatorCommon7.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\D3DFont.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DX7AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DX9AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DXRAllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\EVRAllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\IPinHook.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MacrovisionKicker.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\madVRAllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelShaderCompiler.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\QT7AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\QT9AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\RenderersSettings.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\RM7AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\RM9AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\SyncRenderer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\VMR7AllocatorPresenter.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\VMR9AllocatorPresenter.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\AllocatorCommon.h"
+ >
+ </File>
+ <File
+ RelativePath=".\AllocatorCommon7.h"
+ >
+ </File>
+ <File
+ RelativePath=".\D3DFont.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DX7AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DX9AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\DXRAllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\EVRAllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\IGraphBuilder2.h"
+ >
+ </File>
+ <File
+ RelativePath=".\IPinHook.h"
+ >
+ </File>
+ <File
+ RelativePath=".\MacrovisionKicker.h"
+ >
+ </File>
+ <File
+ RelativePath=".\madVRAllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PixelShaderCompiler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\QT7AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\QT9AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\RenderersSettings.h"
+ >
+ </File>
+ <File
+ RelativePath=".\RM7AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\RM9AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SyncAllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SyncRenderer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VMR7AllocatorPresenter.h"
+ >
+ </File>
+ <File
+ RelativePath=".\VMR9AllocatorPresenter.h"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ <Global
+ Name="DevPartner_IsInstrumented"
+ Value="1"
+ />
+ <Global
+ Name="RESOURCE_FILE"
+ Value="mplayerc.rc"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/src/apps/mplayerc/madVRAllocatorPresenter.cpp b/src/VideoRenderers/madVRAllocatorPresenter.cpp index 8cf70cebe..ff8f1b8ae 100644 --- a/src/apps/mplayerc/madVRAllocatorPresenter.cpp +++ b/src/VideoRenderers/madVRAllocatorPresenter.cpp @@ -22,9 +22,9 @@ #include "stdafx.h"
#include "madVRAllocatorPresenter.h"
-#include "mplayerc.h"
+#include "RenderersSettings.h"
#include <moreuuids.h>
-#include "MainFrm.h"
+//#include "MainFrm.h"
using namespace DSObjects;
@@ -88,7 +88,7 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev) CheckPointer(pD3DDev, E_POINTER);
CSize size;
- switch(AfxGetAppSettings().nSPCMaxRes)
+ switch(GetRenderersSettings().nSPCMaxRes)
{
case 0:
default:
@@ -129,15 +129,15 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev) }
else
{
- m_pAllocator = DNew CDX9SubPicAllocator(pD3DDev, size, AfxGetAppSettings().fSPCPow2Tex);
+ m_pAllocator = DNew CDX9SubPicAllocator(pD3DDev, size, GetRenderersSettings().fSPCPow2Tex);
if(!m_pAllocator)
return E_FAIL;
}
HRESULT hr = S_OK;
- m_pSubPicQueue = AfxGetAppSettings().nSPCSize > 0
- ? (ISubPicQueue*)DNew CSubPicQueue(AfxGetAppSettings().nSPCSize, !AfxGetAppSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
+ m_pSubPicQueue = GetRenderersSettings().nSPCSize > 0
+ ? (ISubPicQueue*)DNew CSubPicQueue(GetRenderersSettings().nSPCSize, !GetRenderersSettings().fSPCAllowAnimationWhenBuffering, m_pAllocator, &hr)
: (ISubPicQueue*)DNew CSubPicQueueNoThread(m_pAllocator, &hr);
if(!m_pSubPicQueue || FAILED(hr))
return E_FAIL;
diff --git a/src/apps/mplayerc/madVRAllocatorPresenter.h b/src/VideoRenderers/madVRAllocatorPresenter.h index 1bf230a71..1bf230a71 100644 --- a/src/apps/mplayerc/madVRAllocatorPresenter.h +++ b/src/VideoRenderers/madVRAllocatorPresenter.h diff --git a/src/VideoRenderers/stdafx.cpp b/src/VideoRenderers/stdafx.cpp new file mode 100644 index 000000000..346b89373 --- /dev/null +++ b/src/VideoRenderers/stdafx.cpp @@ -0,0 +1,27 @@ +/*
+ * $Id: stdafx.cpp 1686 2010-02-20 21:26:33Z povaddict $
+ * stdafx.cpp : source file that includes just the standard includes
+ * mplayerc.pch will be the pre-compiled header
+ * stdafx.obj will contain the pre-compiled type information
+ *
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "stdafx.h"
diff --git a/src/VideoRenderers/stdafx.h b/src/VideoRenderers/stdafx.h new file mode 100644 index 000000000..dbda105d7 --- /dev/null +++ b/src/VideoRenderers/stdafx.h @@ -0,0 +1,92 @@ +/*
+ * $Id: stdafx.h 1785 2010-04-09 14:12:59Z xhmikosr $
+ * stdafx.h : include file for standard system include files,
+ * or project specific include files that are used frequently, but
+ * are changed infrequently
+ *
+ * (C) 2003-2006 Gabest
+ * (C) 2006-2010 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#if !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
+#define AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+#include "../../DSUtil/SharedInclude.h"
+
+// VS2005 changed result of OnNCHitTest
+#if _MSC_VER >= 1400
+#define HITTEST_RET LRESULT
+#else
+#define HITTEST_RET UINT
+#endif
+
+//#define _WIN32_IE 0x0600
+#define WINVER 0x0600
+
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+
+#include <afxwin.h> // MFC core and standard components
+#include <afxext.h> // MFC extensions
+#include <afxdisp.h> // MFC Automation classes
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+#include <afxdlgs.h>
+
+#define ResStr(id) CString(MAKEINTRESOURCE(id))
+
+#include <afxdisp.h>
+#include <afxole.h>
+
+#include <Shlwapi.h>
+
+#include <atlcoll.h>
+#include <atlpath.h>
+
+#include <streams.h>
+#include <dvdmedia.h>
+#include <mpconfig.h>
+#ifdef _WIN64
+#else
+#include <qt/qt.h>
+#endif
+
+#include "../../ui/ui.h"
+#include "../../DSUtil/DSUtil.h"
+
+#include <gdiplus.h>
+#pragma comment(lib, "gdiplus.lib")
+
+template <class T = CString, class S = CString>
+class CAtlStringMap : public CAtlMap<S, T, CStringElementTraits<S> > {};
+
+#define CheckAndLog(x, msg) hr = ##x; if (FAILED (hr)) { TRACE(msg" : 0x%08x\n", hr); return hr; }
+#define CheckNoLog(x) hr = ##x; if (FAILED (hr)) { return hr; }
+
+
+//#define BCM_SETSHIELD 0x0000160C // Shield style for button (elevated privilege)
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__C76533D6_6242_4BEB_8FD3_C6BE58F07224__INCLUDED_)
diff --git a/src/apps/mplayerc/AuthDlg.h b/src/apps/mplayerc/AuthDlg.h index 74dc78290..f0bc7587f 100644 --- a/src/apps/mplayerc/AuthDlg.h +++ b/src/apps/mplayerc/AuthDlg.h @@ -24,6 +24,7 @@ #pragma once
#include "afxwin.h"
+#include "../apps/mplayerc/resource.h"
// CAuthDlg dialog
diff --git a/src/apps/mplayerc/FGFilter.cpp b/src/apps/mplayerc/FGFilter.cpp index 737fa6824..bd1690fb3 100644 --- a/src/apps/mplayerc/FGFilter.cpp +++ b/src/apps/mplayerc/FGFilter.cpp @@ -23,10 +23,11 @@ #include "stdafx.h"
#include "FGFilter.h"
+#include "MainFrm.h"
#include "../../DSUtil/DSUtil.h"
-#include "AllocatorCommon7.h"
-#include "AllocatorCommon.h"
-#include "SyncAllocatorPresenter.h"
+#include "../../VideoRenderers/AllocatorCommon7.h"
+#include "../../VideoRenderers/AllocatorCommon.h"
+#include "../../VideoRenderers/SyncAllocatorPresenter.h"
#include <moreuuids.h>
@@ -470,11 +471,12 @@ HRESULT CFGFilterVideoRenderer::Create(IBaseFilter** ppBF, CInterfaceList<IUnkno || m_clsid == CLSID_madVRAllocatorPresenter
|| m_clsid == CLSID_EVRAllocatorPresenter
|| m_clsid == CLSID_SyncAllocatorPresenter)
- {
+ {
+ bool bFullscreen = (AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
if(SUCCEEDED(CreateAP7(m_clsid, m_hWnd, &pCAP))
- || SUCCEEDED(CreateAP9(m_clsid, m_hWnd, &pCAP))
- || SUCCEEDED(CreateEVR(m_clsid, m_hWnd, &pCAP))
- || SUCCEEDED(CreateSyncRenderer(m_clsid, m_hWnd, &pCAP)))
+ || SUCCEEDED(CreateAP9(m_clsid, m_hWnd, bFullscreen, &pCAP))
+ || SUCCEEDED(CreateEVR(m_clsid, m_hWnd, bFullscreen, &pCAP))
+ || SUCCEEDED(CreateSyncRenderer(m_clsid, m_hWnd, bFullscreen, &pCAP)))
{
CComPtr<IUnknown> pRenderer;
if(SUCCEEDED(hr = pCAP->CreateRenderer(&pRenderer)))
diff --git a/src/apps/mplayerc/FGManager.cpp b/src/apps/mplayerc/FGManager.cpp index fa5d25fd6..67c4d9bab 100644 --- a/src/apps/mplayerc/FGManager.cpp +++ b/src/apps/mplayerc/FGManager.cpp @@ -26,9 +26,9 @@ #include "FGManager.h"
#include "../../DSUtil/DSUtil.h"
#include "../../filters/filters.h"
-#include "AllocatorCommon7.h"
-#include "AllocatorCommon.h"
-#include "SyncAllocatorPresenter.h"
+#include "../../VideoRenderers/AllocatorCommon7.h"
+#include "../../VideoRenderers/AllocatorCommon.h"
+#include "../../VideoRenderers/SyncAllocatorPresenter.h"
#include "DeinterlacerFilter.h"
#include "internal_filter_config.h"
#include <initguid.h>
@@ -2278,8 +2278,8 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk) CMPCVideoDecFilter::FFmpegFilters = s.FFmpegFilters;
CMPCVideoDecFilter::DXVAFilters = s.DXVAFilters;
- CMPCVideoDecFilter::m_ref_frame_count_check_skip = false;
- if((!AfxGetMyApp()->IsVistaOrAbove()) && ((s.iDSVideoRendererType == VIDRNDT_DS_DEFAULT) || (s.iDSVideoRendererType == VIDRNDT_DS_DXR)))
+ CMPCVideoDecFilter::m_ref_frame_count_check_skip = false;
+ if((!IsVistaOrAbove()) && ((s.iDSVideoRendererType == VIDRNDT_DS_DEFAULT) || (s.iDSVideoRendererType == VIDRNDT_DS_DXR)))
{
CMPCVideoDecFilter::m_ref_frame_count_check_skip = true;
}
@@ -2617,7 +2617,7 @@ CFGManagerDVD::CFGManagerDVD(LPCTSTR pName, LPUNKNOWN pUnk, HWND hWnd) {
AppSettings& s = AfxGetAppSettings();
- // have to avoid the old video renderer
+ // have to avoid the old video renderer
if(!s.fXpOrBetter && s.iDSVideoRendererType != VIDRNDT_DS_OVERLAYMIXER || s.iDSVideoRendererType == VIDRNDT_DS_OLDRENDERER)
m_transform.AddTail(DNew CFGFilterVideoRenderer(m_hWnd, CLSID_OverlayMixer, L"Overlay Mixer", m_vrmerit-1));
diff --git a/src/apps/mplayerc/FGManagerBDA.cpp b/src/apps/mplayerc/FGManagerBDA.cpp index cb538ca3d..39cd44970 100644 --- a/src/apps/mplayerc/FGManagerBDA.cpp +++ b/src/apps/mplayerc/FGManagerBDA.cpp @@ -265,7 +265,7 @@ CFGManagerBDA::CFGManagerBDA(LPCTSTR pName, LPUNKNOWN pUnk, HWND hWnd) m_DVBStreams[DVB_EPG] = CDVBStream(L"epg", &mt_Epg);
// Warning : MEDIA_ELEMENTARY_STREAM didn't works for subtitles with Windows XP!
- if (CMPlayerCApp::IsVistaOrAbove())
+ if (IsVistaOrAbove())
m_DVBStreams[DVB_SUB] = CDVBStream(L"sub", &mt_Subtitle/*, false, MEDIA_TRANSPORT_PAYLOAD*/);
else
m_DVBStreams[DVB_SUB] = CDVBStream(L"sub", &mt_Subtitle, false, MEDIA_TRANSPORT_PAYLOAD);
diff --git a/src/apps/mplayerc/FakeFilterMapper2.cpp b/src/apps/mplayerc/FakeFilterMapper2.cpp index cee0a2b42..15f2dfad8 100644 --- a/src/apps/mplayerc/FakeFilterMapper2.cpp +++ b/src/apps/mplayerc/FakeFilterMapper2.cpp @@ -23,7 +23,7 @@ #include "stdafx.h"
#include "FakeFilterMapper2.h"
-#include "MacrovisionKicker.h"
+#include "../../VideoRenderers/MacrovisionKicker.h"
#include "../../DSUtil/DSUtil.h"
#include <initguid.h>
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index a3426d299..a7c49b96e 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -73,15 +73,15 @@ #include "../../filters/filters.h"
#include "../../filters/PinInfoWnd.h"
-#include "AllocatorCommon7.h"
-#include "AllocatorCommon.h"
+#include "../../VideoRenderers/AllocatorCommon7.h"
+#include "../../VideoRenderers/AllocatorCommon.h"
#include "../../subtitles/SSF.h"
#include "ComPropertySheet.h"
#include "LcdSupport.h"
#include "SettingsDefines.h"
-#include "IPinHook.h"
+#include "../../VideoRenderers/IPinHook.h"
#define DEFCLIENTW 292
#define DEFCLIENTH 200
@@ -5394,126 +5394,153 @@ void CMainFrame::OnFileCloseMedia() void CMainFrame::OnUpdateViewTearingTest(CCmdUI* pCmdUI)
{
pCmdUI->Enable (TRUE);
- pCmdUI->SetCheck (AfxGetMyApp()->m_fTearingTest);
+ pCmdUI->SetCheck (AfxGetMyApp()->m_Renderers.m_fTearingTest);
}
void CMainFrame::OnViewTearingTest()
{
- AfxGetMyApp()->m_fTearingTest = ! AfxGetMyApp()->m_fTearingTest;
+ AfxGetMyApp()->m_Renderers.m_fTearingTest = ! AfxGetMyApp()->m_Renderers.m_fTearingTest;
}
void CMainFrame::OnUpdateViewDisplayStats(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = (s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS || s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D;
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = (s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS ||
+ s.iDSVideoRendererType == VIDRNDT_DS_SYNC) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D;
pCmdUI->Enable (supported);
- pCmdUI->SetCheck (supported && (AfxGetMyApp()->m_fDisplayStats));
+ pCmdUI->SetCheck (supported && (AfxGetMyApp()->m_Renderers.m_fDisplayStats));
}
void CMainFrame::OnViewResetStats()
{
- AfxGetMyApp()->m_bResetStats = true; // Reset by "consumer"
+ AfxGetMyApp()->m_Renderers.m_bResetStats = true; // Reset by "consumer"
}
void CMainFrame::OnViewDisplayStatsSC()
{
- ++AfxGetMyApp()->m_fDisplayStats;
- if (AfxGetMyApp()->m_fDisplayStats > 3)
- AfxGetMyApp()->m_fDisplayStats = 0;
+ ++AfxGetMyApp()->m_Renderers.m_fDisplayStats;
+ if (AfxGetMyApp()->m_Renderers.m_fDisplayStats > 3)
+ AfxGetMyApp()->m_Renderers.m_fDisplayStats = 0;
}
void CMainFrame::OnUpdateViewVSync(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck (!supported || (s.m_RenderSettings.iVMR9VSync));
+ pCmdUI->SetCheck (!supported || (r.m_RenderSettings.iVMR9VSync));
}
void CMainFrame::OnUpdateViewVSyncOffset(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) && s.m_RenderSettings.fVMR9AlterativeVSync;
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) &&
+ r.m_RenderSettings.fVMR9AlterativeVSync;
pCmdUI->Enable(supported);
CString Temp;
- Temp.Format(L"%d", s.m_RenderSettings.iVMR9VSyncOffset);
+ Temp.Format(L"%d", r.m_RenderSettings.iVMR9VSyncOffset);
pCmdUI->SetText(Temp);
}
void CMainFrame::OnUpdateViewVSyncAccurate(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.iVMR9VSyncAccurate);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMR9VSyncAccurate);
}
void CMainFrame::OnUpdateViewSynchronizeVideo(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && GetPlaybackMode() == PM_NONE);
pCmdUI->Enable(supported);
- pCmdUI->SetCheck(s.m_RenderSettings.bSynchronizeVideo);
+ pCmdUI->SetCheck(r.m_RenderSettings.bSynchronizeVideo);
}
void CMainFrame::OnUpdateViewSynchronizeDisplay(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && GetPlaybackMode() == PM_NONE);
pCmdUI->Enable(supported);
- pCmdUI->SetCheck(s.m_RenderSettings.bSynchronizeDisplay);
+ pCmdUI->SetCheck(r.m_RenderSettings.bSynchronizeDisplay);
}
void CMainFrame::OnUpdateViewSynchronizeNearest(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
bool supported = (s.iDSVideoRendererType == VIDRNDT_DS_SYNC);
pCmdUI->Enable(supported);
- pCmdUI->SetCheck(s.m_RenderSettings.bSynchronizeNearest);
+ pCmdUI->SetCheck(r.m_RenderSettings.bSynchronizeNearest);
}
void CMainFrame::OnUpdateViewEVROutputRange(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_SYNC) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
if (pCmdUI->m_nID == ID_VIEW_EVROUTPUTRANGE_0_255)
- pCmdUI->SetCheck(s.m_RenderSettings.iEVROutputRange == 0);
+ pCmdUI->SetCheck(r.m_RenderSettings.iEVROutputRange == 0);
else if (pCmdUI->m_nID == ID_VIEW_EVROUTPUTRANGE_16_235)
- pCmdUI->SetCheck(s.m_RenderSettings.iEVROutputRange == 1);
+ pCmdUI->SetCheck(r.m_RenderSettings.iEVROutputRange == 1);
}
void CMainFrame::OnUpdateViewFlushGPU(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
if (pCmdUI->m_nID == ID_VIEW_FLUSHGPU_BEFOREVSYNC)
- pCmdUI->SetCheck(s.m_RenderSettings.iVMRFlushGPUBeforeVSync != 0);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMRFlushGPUBeforeVSync != 0);
else if (pCmdUI->m_nID == ID_VIEW_FLUSHGPU_AFTERPRESENT)
- pCmdUI->SetCheck(s.m_RenderSettings.iVMRFlushGPUAfterPresent != 0);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMRFlushGPUAfterPresent != 0);
else if (pCmdUI->m_nID == ID_VIEW_FLUSHGPU_WAIT)
- pCmdUI->SetCheck(s.m_RenderSettings.iVMRFlushGPUWait != 0);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMRFlushGPUWait != 0);
}
void CMainFrame::OnUpdateViewD3DFullscreen(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS || s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS ||
+ s.iDSVideoRendererType == VIDRNDT_DS_SYNC) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
pCmdUI->SetCheck(s.fD3DFullscreen);
@@ -5521,71 +5548,96 @@ void CMainFrame::OnUpdateViewD3DFullscreen(CCmdUI* pCmdUI) void CMainFrame::OnUpdateViewDisableDesktopComposition(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS || s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS ||
+ s.iDSVideoRendererType == VIDRNDT_DS_SYNC) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.iVMRDisableDesktopComposition);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMRDisableDesktopComposition);
}
void CMainFrame::OnUpdateViewAlternativeVSync(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.fVMR9AlterativeVSync);
+ pCmdUI->SetCheck(r.m_RenderSettings.fVMR9AlterativeVSync);
}
void CMainFrame::OnUpdateViewFullscreenGUISupport(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.iVMR9FullscreenGUISupport);
+ pCmdUI->SetCheck(r.m_RenderSettings.iVMR9FullscreenGUISupport);
}
void CMainFrame::OnUpdateViewHighColorResolution(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_SYNC) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_SYNC) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.iEVRHighColorResolution);
+ pCmdUI->SetCheck(r.m_RenderSettings.iEVRHighColorResolution);
}
void CMainFrame::OnUpdateViewEnableFrameTimeCorrection(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = ((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D);
pCmdUI->Enable (supported);
- pCmdUI->SetCheck(s.m_RenderSettings.iEVREnableFrameTimeCorrection);
+ pCmdUI->SetCheck(r.m_RenderSettings.iEVREnableFrameTimeCorrection);
}
void CMainFrame::OnUpdateViewVSyncOffsetIncrease(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = s.iDSVideoRendererType == VIDRNDT_DS_SYNC || (((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) && s.m_RenderSettings.fVMR9AlterativeVSync);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = s.iDSVideoRendererType == VIDRNDT_DS_SYNC ||
+ (((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) &&
+ r.m_RenderSettings.fVMR9AlterativeVSync);
pCmdUI->Enable (supported);
}
void CMainFrame::OnUpdateViewVSyncOffsetDecrease(CCmdUI* pCmdUI)
{
- AppSettings& s = AfxGetAppSettings();
- bool supported = s.iDSVideoRendererType == VIDRNDT_DS_SYNC || (((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM || s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) && s.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) && s.m_RenderSettings.fVMR9AlterativeVSync);
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ bool supported = s.iDSVideoRendererType == VIDRNDT_DS_SYNC ||
+ (((s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM ||
+ s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) &&
+ r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) &&
+ r.m_RenderSettings.fVMR9AlterativeVSync);
pCmdUI->Enable (supported);
}
void CMainFrame::OnViewVSync()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMR9VSync = !s.m_RenderSettings.iVMR9VSync;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"VSync: %s", s.m_RenderSettings.iVMR9VSync? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5593,9 +5645,9 @@ void CMainFrame::OnViewVSync() void CMainFrame::OnViewVSyncAccurate()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMR9VSyncAccurate = !s.m_RenderSettings.iVMR9VSyncAccurate;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Accurate VSync: %s", s.m_RenderSettings.iVMR9VSyncAccurate? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5603,7 +5655,7 @@ void CMainFrame::OnViewVSyncAccurate() void CMainFrame::OnViewSynchronizeVideo()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.bSynchronizeVideo = !s.m_RenderSettings.bSynchronizeVideo;
if (s.m_RenderSettings.bSynchronizeVideo)
{
@@ -5614,7 +5666,7 @@ void CMainFrame::OnViewSynchronizeVideo() s.m_RenderSettings.fVMR9AlterativeVSync = false;
}
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Synchronize Video to Display: %s", s.m_RenderSettings.bSynchronizeVideo? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5622,7 +5674,7 @@ void CMainFrame::OnViewSynchronizeVideo() void CMainFrame::OnViewSynchronizeDisplay()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.bSynchronizeDisplay = !s.m_RenderSettings.bSynchronizeDisplay;
if (s.m_RenderSettings.bSynchronizeDisplay)
{
@@ -5633,7 +5685,7 @@ void CMainFrame::OnViewSynchronizeDisplay() s.m_RenderSettings.fVMR9AlterativeVSync = false;
}
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Synchronize Display to Video: %s", s.m_RenderSettings.bSynchronizeDisplay? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5641,7 +5693,7 @@ void CMainFrame::OnViewSynchronizeDisplay() void CMainFrame::OnViewSynchronizeNearest()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.bSynchronizeNearest = !s.m_RenderSettings.bSynchronizeNearest;
if (s.m_RenderSettings.bSynchronizeNearest)
{
@@ -5652,7 +5704,7 @@ void CMainFrame::OnViewSynchronizeNearest() s.m_RenderSettings.fVMR9AlterativeVSync = false;
}
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Present at Nearest VSync: %s", s.m_RenderSettings.bSynchronizeNearest? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5660,9 +5712,9 @@ void CMainFrame::OnViewSynchronizeNearest() void CMainFrame::OnViewEVROutputRange_0_255()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iEVROutputRange = 0;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Output Range: 0 - 255");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5670,9 +5722,9 @@ void CMainFrame::OnViewEVROutputRange_0_255() void CMainFrame::OnViewEVROutputRange_16_235()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iEVROutputRange = 1;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Output Range: 16 - 235");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5680,9 +5732,9 @@ void CMainFrame::OnViewEVROutputRange_16_235() void CMainFrame::OnViewFlushGPUBeforeVSync()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMRFlushGPUBeforeVSync = !s.m_RenderSettings.iVMRFlushGPUBeforeVSync;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Flush GPU before VSync: %s", s.m_RenderSettings.iVMRFlushGPUBeforeVSync? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5690,9 +5742,9 @@ void CMainFrame::OnViewFlushGPUBeforeVSync() void CMainFrame::OnViewFlushGPUAfterVSync()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMRFlushGPUAfterPresent = !s.m_RenderSettings.iVMRFlushGPUAfterPresent;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Flush GPU after Present: %s", s.m_RenderSettings.iVMRFlushGPUAfterPresent? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5700,9 +5752,9 @@ void CMainFrame::OnViewFlushGPUAfterVSync() void CMainFrame::OnViewFlushGPUWait()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMRFlushGPUWait = !s.m_RenderSettings.iVMRFlushGPUWait;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Wait for GPU Flush: %s", s.m_RenderSettings.iVMRFlushGPUWait? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5712,7 +5764,7 @@ void CMainFrame::OnViewD3DFullScreen() {
AppSettings& s = AfxGetAppSettings();
s.fD3DFullscreen = !s.fD3DFullscreen;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"D3D Fullscreen (Requires restart): %s", s.fD3DFullscreen? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5720,9 +5772,9 @@ void CMainFrame::OnViewD3DFullScreen() void CMainFrame::OnViewDisableDesktopComposition()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMRDisableDesktopComposition = !s.m_RenderSettings.iVMRDisableDesktopComposition;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Disable desktop composition: %s", s.m_RenderSettings.iVMRDisableDesktopComposition? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5730,9 +5782,9 @@ void CMainFrame::OnViewDisableDesktopComposition() void CMainFrame::OnViewAlternativeVSync()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.fVMR9AlterativeVSync = !s.m_RenderSettings.fVMR9AlterativeVSync;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Alternative VSync: %s", s.m_RenderSettings.fVMR9AlterativeVSync? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5740,9 +5792,9 @@ void CMainFrame::OnViewAlternativeVSync() void CMainFrame::OnViewResetDefault()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.SetDefault();
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Renderer settings reset to default");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5750,9 +5802,9 @@ void CMainFrame::OnViewResetDefault() void CMainFrame::OnViewResetOptimal()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.SetOptimal();
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Renderer settings reset to optimal");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5760,9 +5812,9 @@ void CMainFrame::OnViewResetOptimal() void CMainFrame::OnViewFullscreenGUISupport()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iVMR9FullscreenGUISupport = !s.m_RenderSettings.iVMR9FullscreenGUISupport;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"D3D Fullscreen GUI Support: %s", s.m_RenderSettings.iVMR9FullscreenGUISupport? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5770,9 +5822,9 @@ void CMainFrame::OnViewFullscreenGUISupport() void CMainFrame::OnViewHighColorResolution()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iEVRHighColorResolution = !s.m_RenderSettings.iEVRHighColorResolution;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"10 bit RGB: %s", s.m_RenderSettings.iEVRHighColorResolution? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5780,9 +5832,9 @@ void CMainFrame::OnViewHighColorResolution() void CMainFrame::OnViewEnableFrameTimeCorrection()
{
- AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& s = AfxGetAppSettings().m_RenderersSettings;
s.m_RenderSettings.iEVREnableFrameTimeCorrection = !s.m_RenderSettings.iEVREnableFrameTimeCorrection;
- s.UpdateData(true);
+ AfxGetAppSettings().UpdateData(true);
CString Format;
Format.Format(L"Frame Time Correction: %s", s.m_RenderSettings.iEVREnableFrameTimeCorrection? L"On":L"Off");
m_OSD.DisplayMessage (OSD_TOPRIGHT, Format);
@@ -5790,39 +5842,39 @@ void CMainFrame::OnViewEnableFrameTimeCorrection() void CMainFrame::OnViewVSyncOffsetIncrease()
{
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
CString Format;
if (s.iDSVideoRendererType == VIDRNDT_DS_SYNC)
{
- s.m_RenderSettings.fTargetSyncOffset = s.m_RenderSettings.fTargetSyncOffset - 0.5; // Yeah, it should be a "-"
- s.UpdateData(true);
- Format.Format(L"Target VSync Offset: %.1f", s.m_RenderSettings.fTargetSyncOffset);
+ r.m_RenderSettings.fTargetSyncOffset = r.m_RenderSettings.fTargetSyncOffset - 0.5; // Yeah, it should be a "-"
+ Format.Format(L"Target VSync Offset: %.1f", r.m_RenderSettings.fTargetSyncOffset);
}
else
{
- ++s.m_RenderSettings.iVMR9VSyncOffset;
- s.UpdateData(true);
- Format.Format(L"VSync Offset: %d", s.m_RenderSettings.iVMR9VSyncOffset);
+ ++r.m_RenderSettings.iVMR9VSyncOffset;
+ Format.Format(L"VSync Offset: %d", r.m_RenderSettings.iVMR9VSyncOffset);
}
+ AfxGetAppSettings().UpdateData(true);
m_OSD.DisplayMessage(OSD_TOPRIGHT, Format);
}
void CMainFrame::OnViewVSyncOffsetDecrease()
{
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
CString Format;
if (s.iDSVideoRendererType == VIDRNDT_DS_SYNC)
{
- s.m_RenderSettings.fTargetSyncOffset = s.m_RenderSettings.fTargetSyncOffset + 0.5;
- s.UpdateData(true);
- Format.Format(L"Target VSync Offset: %.1f", s.m_RenderSettings.fTargetSyncOffset);
+ r.m_RenderSettings.fTargetSyncOffset = r.m_RenderSettings.fTargetSyncOffset + 0.5;
+ Format.Format(L"Target VSync Offset: %.1f", r.m_RenderSettings.fTargetSyncOffset);
}
else
{
- --s.m_RenderSettings.iVMR9VSyncOffset;
- s.UpdateData(true);
- Format.Format(L"VSync Offset: %d", s.m_RenderSettings.iVMR9VSyncOffset);
+ --r.m_RenderSettings.iVMR9VSyncOffset;
+ Format.Format(L"VSync Offset: %d", r.m_RenderSettings.iVMR9VSyncOffset);
}
+ AfxGetAppSettings().UpdateData(true);
m_OSD.DisplayMessage(OSD_TOPRIGHT, Format);
}
@@ -8992,12 +9044,12 @@ void CMainFrame::AutoChangeMonitorMode() }
}
- if ((MediaFPS > 23.971) && (MediaFPS < 23.981) && CMPlayerCApp::IsVistaOrAbove())
+ if ((MediaFPS > 23.971) && (MediaFPS < 23.981) && IsVistaOrAbove())
{
SetDispMode(AfxGetAppSettings().AutoChangeFullscrRes.dmFullscreenRes23d976Hz, mf_hmonitor);
return;
}
- if ((MediaFPS > 29.965) && (MediaFPS < 29.975) && CMPlayerCApp::IsVistaOrAbove())
+ if ((MediaFPS > 29.965) && (MediaFPS < 29.975) && IsVistaOrAbove())
{
SetDispMode(AfxGetAppSettings().AutoChangeFullscrRes.dmFullscreenRes29d97Hz, mf_hmonitor);
return;
@@ -9463,10 +9515,14 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD) m_fCustomGraph = false;
m_fRealMediaGraph = m_fShockwaveGraph = m_fQuicktimeGraph = false;
- AppSettings& s = AfxGetAppSettings();
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
// CASIMIR666 todo
- if (s.IsD3DFullscreen() && ((s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) || (s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM) || (s.iDSVideoRendererType == VIDRNDT_DS_SYNC)))
+ if (s.IsD3DFullscreen() &&
+ ((s.iDSVideoRendererType == VIDRNDT_DS_VMR9RENDERLESS) ||
+ (s.iDSVideoRendererType == VIDRNDT_DS_EVR_CUSTOM) ||
+ (s.iDSVideoRendererType == VIDRNDT_DS_SYNC)))
{
CreateFullScreenWindow();
m_pVideoWnd = m_pFullscreenWnd;
@@ -9606,7 +9662,7 @@ CWnd *CMainFrame::GetModalParent() {
AppSettings& s = AfxGetAppSettings();
CWnd *pParentWnd = this;
- if (m_pFullscreenWnd->IsWindow() && s.m_RenderSettings.iVMR9FullscreenGUISupport)
+ if (m_pFullscreenWnd->IsWindow() && s.m_RenderersSettings.m_RenderSettings.iVMR9FullscreenGUISupport)
pParentWnd = m_pFullscreenWnd;
return pParentWnd;
}
@@ -10110,8 +10166,9 @@ void CMainFrame::OpenCustomizeGraph() AddTextPassThruFilter();
}
- AppSettings& s = AfxGetAppSettings();
- if (s.m_RenderSettings.bSynchronizeVideo && s.iDSVideoRendererType == VIDRNDT_DS_SYNC)
+ AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& r = s.m_RenderersSettings;
+ if (r.m_RenderSettings.bSynchronizeVideo && s.iDSVideoRendererType == VIDRNDT_DS_SYNC)
{
HRESULT hr;
m_pRefClock = DNew CSyncClockFilter(NULL, &hr);
@@ -10153,9 +10210,9 @@ void CMainFrame::OpenCustomizeGraph() {
if(CComQIPtr<IAMStreamSelect> pSS = pBF)
{
- LCID idAudio = AfxGetAppSettings().idAudioLang;
+ LCID idAudio = s.idAudioLang;
if(!idAudio) idAudio = GetUserDefaultLCID();
- LCID idSub = AfxGetAppSettings().idSubtitlesLang;
+ LCID idSub = s.idSubtitlesLang;
if(!idSub) idSub = GetUserDefaultLCID();
DWORD cnt = 0;
@@ -13456,7 +13513,7 @@ void CMainFrame::SetVMR9ColorControl(float dBrightness, float dContrast, float d {
VMR9ProcAmpControl ClrControl;
- if(m_pMC && !AfxGetAppSettings().fVMR9MixerYUV)
+ if(m_pMC && !AfxGetAppSettings().m_RenderersSettings.fVMR9MixerYUV)
{
ClrControl.dwSize = sizeof(ClrControl);
ClrControl.dwFlags = ProcAmpControl9_Mask;
diff --git a/src/apps/mplayerc/PPageFormats.cpp b/src/apps/mplayerc/PPageFormats.cpp index ef81e39a9..e555074a0 100644 --- a/src/apps/mplayerc/PPageFormats.cpp +++ b/src/apps/mplayerc/PPageFormats.cpp @@ -532,7 +532,7 @@ BOOL CPPageFormats::OnInitDialog() CreateToolTip();
- if (AfxGetMyApp()->IsVistaOrAbove() && !IsUserAnAdmin())
+ if (IsVistaOrAbove() && !IsUserAnAdmin())
{
GetDlgItem(IDC_BUTTON1)->ShowWindow (SW_HIDE);
GetDlgItem(IDC_BUTTON3)->ShowWindow (SW_HIDE);
diff --git a/src/apps/mplayerc/PPageFullscreen.cpp b/src/apps/mplayerc/PPageFullscreen.cpp index 4da60e474..1389506cc 100644 --- a/src/apps/mplayerc/PPageFullscreen.cpp +++ b/src/apps/mplayerc/PPageFullscreen.cpp @@ -216,12 +216,12 @@ void CPPageFullscreen::OnUpdateDispModeOtherCombo(CCmdUI* pCmdUI) void CPPageFullscreen::OnUpdateDispMode23d976Combo(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK2) && CMPlayerCApp::IsVistaOrAbove());
+ pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK2) && IsVistaOrAbove());
}
void CPPageFullscreen::OnUpdateDispMode29d97Combo(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK2) && CMPlayerCApp::IsVistaOrAbove());
+ pCmdUI->Enable(!!IsDlgButtonChecked(IDC_CHECK2) && IsVistaOrAbove());
}
void CPPageFullscreen::OnUpdateApplyDefault(CCmdUI* pCmdUI)
diff --git a/src/apps/mplayerc/PPageOutput.cpp b/src/apps/mplayerc/PPageOutput.cpp index 9c9194dd8..1fc479e4c 100644 --- a/src/apps/mplayerc/PPageOutput.cpp +++ b/src/apps/mplayerc/PPageOutput.cpp @@ -110,19 +110,20 @@ BOOL CPPageOutput::OnInitDialog() AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& renderersSettings = s.m_RenderersSettings;
m_iDSVideoRendererType = s.iDSVideoRendererType;
m_iRMVideoRendererType = s.iRMVideoRendererType;
m_iQTVideoRendererType = s.iQTVideoRendererType;
- m_iAPSurfaceUsage = s.iAPSurfaceUsage;
-// m_fVMRSyncFix = s.fVMRSyncFix;
- m_iDX9Resizer = s.iDX9Resizer;
- m_fVMR9MixerMode = s.fVMR9MixerMode;
- m_fVMR9MixerYUV = s.fVMR9MixerYUV;
- m_fVMR9AlterativeVSync = s.m_RenderSettings.fVMR9AlterativeVSync;
+ m_iAPSurfaceUsage = renderersSettings.iAPSurfaceUsage;
+// m_fVMRSyncFix = renderersSettings.fVMRSyncFix;
+ m_iDX9Resizer = renderersSettings.iDX9Resizer;
+ m_fVMR9MixerMode = renderersSettings.fVMR9MixerMode;
+ m_fVMR9MixerYUV = renderersSettings.fVMR9MixerYUV;
+ m_fVMR9AlterativeVSync = renderersSettings.m_RenderSettings.fVMR9AlterativeVSync;
m_fD3DFullscreen = s.fD3DFullscreen;
- m_iEvrBuffers.Format(L"%d", s.iEvrBuffers);
+ m_iEvrBuffers.Format(L"%d", renderersSettings.iEvrBuffers);
- m_fResetDevice = s.fResetDevice;
+ m_fResetDevice = s.m_RenderersSettings.fResetDevice;
m_AudioRendererDisplayNames.Add(_T(""));
m_iAudioRendererTypeCtrl.AddString(_T("1: System Default"));
m_iAudioRendererType = 0;
@@ -274,7 +275,7 @@ BOOL CPPageOutput::OnInitDialog() }
// YUV mixing is not compatible with Vista
- if (AfxGetMyApp()->IsVistaOrAbove())
+ if (IsVistaOrAbove())
{
GetDlgItem(IDC_DSVMR9YUVMIXER)->ShowWindow (SW_HIDE);
}
@@ -317,28 +318,29 @@ BOOL CPPageOutput::OnApply() AppSettings& s = AfxGetAppSettings();
+ CRenderersSettings& renderersSettings = s.m_RenderersSettings;
s.iDSVideoRendererType = m_iDSVideoRendererType;
s.iRMVideoRendererType = m_iRMVideoRendererType;
s.iQTVideoRendererType = m_iQTVideoRendererType;
- s.iAPSurfaceUsage = m_iAPSurfaceUsage;
-// s.fVMRSyncFix = !!m_fVMRSyncFix;
- s.AudioRendererDisplayName = m_AudioRendererDisplayNames[m_iAudioRendererType];
- s.iDX9Resizer = m_iDX9Resizer;
- s.fVMR9MixerMode = !!m_fVMR9MixerMode;
- s.fVMR9MixerYUV = !!m_fVMR9MixerYUV;
- s.m_RenderSettings.fVMR9AlterativeVSync = m_fVMR9AlterativeVSync != 0;
+ renderersSettings.iAPSurfaceUsage = m_iAPSurfaceUsage;
+// renderersSettings.fVMRSyncFix = !!m_fVMRSyncFix;
+ renderersSettings.iDX9Resizer = m_iDX9Resizer;
+ renderersSettings.fVMR9MixerMode = !!m_fVMR9MixerMode;
+ renderersSettings.fVMR9MixerYUV = !!m_fVMR9MixerYUV;
+ renderersSettings.m_RenderSettings.fVMR9AlterativeVSync = m_fVMR9AlterativeVSync != 0;
+ s.AudioRendererDisplayName = m_AudioRendererDisplayNames[m_iAudioRendererType];
s.fD3DFullscreen = m_fD3DFullscreen ? true : false;
- s.fResetDevice = !!m_fResetDevice;
+ renderersSettings.fResetDevice = !!m_fResetDevice;
if (!m_iEvrBuffers.IsEmpty())
{
int Temp = 5;
swscanf(m_iEvrBuffers.GetBuffer(), L"%d", &Temp);
- s.iEvrBuffers = Temp;
+ renderersSettings.iEvrBuffers = Temp;
}
else
- s.iEvrBuffers = 5;
+ renderersSettings.iEvrBuffers = 5;
s.D3D9RenderDevice = m_fD3D9RenderDevice ? m_D3D9GUIDNames[m_iD3D9RenderDevice] : _T("");
diff --git a/src/apps/mplayerc/PPageSubtitles.cpp b/src/apps/mplayerc/PPageSubtitles.cpp index f62729ec4..d5db3c103 100644 --- a/src/apps/mplayerc/PPageSubtitles.cpp +++ b/src/apps/mplayerc/PPageSubtitles.cpp @@ -135,7 +135,7 @@ BOOL CPPageSubtitles::OnInitDialog() m_nHorPosCtrl.SetRange(-10,110);
m_nVerPos = s.nVerPos;
m_nVerPosCtrl.SetRange(110,-10);
- m_nSPCSize = s.nSPCSize;
+ m_nSPCSize = s.m_RenderersSettings.nSPCSize;
m_nSPCSizeCtrl.SetRange(0, 60);
m_spmaxres.AddString(_T("Desktop"));
m_spmaxres.AddString(_T("2560x1600"));
@@ -147,9 +147,9 @@ BOOL CPPageSubtitles::OnInitDialog() m_spmaxres.AddString(_T("640x480"));
m_spmaxres.AddString(_T("512x384"));
m_spmaxres.AddString(_T("384x288"));
- m_spmaxres.SetCurSel(TranslateResIn(s.nSPCMaxRes));
- m_fSPCPow2Tex = s.fSPCPow2Tex;
- m_fSPCAllowAnimationWhenBuffering = s.fSPCAllowAnimationWhenBuffering;
+ m_spmaxres.SetCurSel(TranslateResIn(s.m_RenderersSettings.nSPCMaxRes));
+ m_fSPCPow2Tex = s.m_RenderersSettings.fSPCPow2Tex;
+ m_fSPCAllowAnimationWhenBuffering = s.m_RenderersSettings.fSPCAllowAnimationWhenBuffering;
m_nSubDelayInterval = s.nSubDelayInterval;
UpdateData(FALSE);
@@ -169,20 +169,20 @@ BOOL CPPageSubtitles::OnApply() if(s.fOverridePlacement != !!m_fOverridePlacement
|| s.nHorPos != m_nHorPos
|| s.nVerPos != m_nVerPos
- || s.nSPCSize != m_nSPCSize
+ || s.m_RenderersSettings.nSPCSize != m_nSPCSize
|| s.nSubDelayInterval != m_nSubDelayInterval
- || s.nSPCMaxRes != TranslateResOut(m_spmaxres.GetCurSel())
- || s.fSPCPow2Tex != !!m_fSPCPow2Tex
- || s.fSPCAllowAnimationWhenBuffering != !!m_fSPCAllowAnimationWhenBuffering)
+ || s.m_RenderersSettings.nSPCMaxRes != TranslateResOut(m_spmaxres.GetCurSel())
+ || s.m_RenderersSettings.fSPCPow2Tex != !!m_fSPCPow2Tex
+ || s.m_RenderersSettings.fSPCAllowAnimationWhenBuffering != !!m_fSPCAllowAnimationWhenBuffering)
{
s.fOverridePlacement = !!m_fOverridePlacement;
s.nHorPos = m_nHorPos;
s.nVerPos = m_nVerPos;
- s.nSPCSize = m_nSPCSize;
+ s.m_RenderersSettings.nSPCSize = m_nSPCSize;
s.nSubDelayInterval = m_nSubDelayInterval;
- s.nSPCMaxRes = TranslateResOut(m_spmaxres.GetCurSel());
- s.fSPCPow2Tex = !!m_fSPCPow2Tex;
- s.fSPCAllowAnimationWhenBuffering = !!m_fSPCAllowAnimationWhenBuffering;
+ s.m_RenderersSettings.nSPCMaxRes = TranslateResOut(m_spmaxres.GetCurSel());
+ s.m_RenderersSettings.fSPCPow2Tex = !!m_fSPCPow2Tex;
+ s.m_RenderersSettings.fSPCAllowAnimationWhenBuffering = !!m_fSPCAllowAnimationWhenBuffering;
if(CMainFrame* pFrame = (CMainFrame*)GetParentFrame())
pFrame->UpdateSubtitle(true);
diff --git a/src/apps/mplayerc/PPageSync.cpp b/src/apps/mplayerc/PPageSync.cpp index 92989dc92..02215d710 100644 --- a/src/apps/mplayerc/PPageSync.cpp +++ b/src/apps/mplayerc/PPageSync.cpp @@ -75,14 +75,15 @@ BOOL CPPageSync::OnInitDialog() GetDlgItem(IDC_SYNCNEAREST)->EnableWindow(FALSE);
}
- m_bSynchronizeVideo = s.m_RenderSettings.bSynchronizeVideo;
- m_bSynchronizeDisplay = s.m_RenderSettings.bSynchronizeDisplay;
- m_bSynchronizeNearest = s.m_RenderSettings.bSynchronizeNearest;
- m_iLineDelta = s.m_RenderSettings.iLineDelta;
- m_iColumnDelta = s.m_RenderSettings.iColumnDelta;
- m_fCycleDelta = s.m_RenderSettings.fCycleDelta;
- m_fTargetSyncOffset = s.m_RenderSettings.fTargetSyncOffset;
- m_fControlLimit = s.m_RenderSettings.fControlLimit;
+ CRenderersSettings::CRendererSettingsEVR& rendererSettings = s.m_RenderersSettings.m_RenderSettings;
+ m_bSynchronizeVideo = rendererSettings.bSynchronizeVideo;
+ m_bSynchronizeDisplay = rendererSettings.bSynchronizeDisplay;
+ m_bSynchronizeNearest = rendererSettings.bSynchronizeNearest;
+ m_iLineDelta = rendererSettings.iLineDelta;
+ m_iColumnDelta = rendererSettings.iColumnDelta;
+ m_fCycleDelta = rendererSettings.fCycleDelta;
+ m_fTargetSyncOffset = rendererSettings.fTargetSyncOffset;
+ m_fControlLimit = rendererSettings.fControlLimit;
UpdateData(FALSE);
@@ -108,14 +109,15 @@ BOOL CPPageSync::OnSetActive() GetDlgItem(IDC_SYNCNEAREST)->EnableWindow(FALSE);
}
- m_bSynchronizeVideo = s.m_RenderSettings.bSynchronizeVideo;
- m_bSynchronizeDisplay = s.m_RenderSettings.bSynchronizeDisplay;
- m_bSynchronizeNearest = s.m_RenderSettings.bSynchronizeNearest;
- m_iLineDelta = s.m_RenderSettings.iLineDelta;
- m_iColumnDelta = s.m_RenderSettings.iColumnDelta;
- m_fCycleDelta = s.m_RenderSettings.fCycleDelta;
- m_fTargetSyncOffset = s.m_RenderSettings.fTargetSyncOffset;
- m_fControlLimit = s.m_RenderSettings.fControlLimit;
+ CRenderersSettings::CRendererSettingsEVR& rendererSettings = s.m_RenderersSettings.m_RenderSettings;
+ m_bSynchronizeVideo = rendererSettings.bSynchronizeVideo;
+ m_bSynchronizeDisplay = rendererSettings.bSynchronizeDisplay;
+ m_bSynchronizeNearest = rendererSettings.bSynchronizeNearest;
+ m_iLineDelta = rendererSettings.iLineDelta;
+ m_iColumnDelta = rendererSettings.iColumnDelta;
+ m_fCycleDelta = rendererSettings.fCycleDelta;
+ m_fTargetSyncOffset = rendererSettings.fTargetSyncOffset;
+ m_fControlLimit = rendererSettings.fControlLimit;
UpdateData(FALSE);
@@ -128,14 +130,15 @@ BOOL CPPageSync::OnApply() AppSettings& s = AfxGetAppSettings();
- s.m_RenderSettings.bSynchronizeVideo = !!m_bSynchronizeVideo;
- s.m_RenderSettings.bSynchronizeDisplay = !!m_bSynchronizeDisplay;
- s.m_RenderSettings.bSynchronizeNearest = !!m_bSynchronizeNearest;
- s.m_RenderSettings.iLineDelta = m_iLineDelta;
- s.m_RenderSettings.iColumnDelta = m_iColumnDelta;
- s.m_RenderSettings.fCycleDelta = m_fCycleDelta;
- s.m_RenderSettings.fTargetSyncOffset = m_fTargetSyncOffset;
- s.m_RenderSettings.fControlLimit = m_fControlLimit;
+ CRenderersSettings::CRendererSettingsEVR& rendererSettings = s.m_RenderersSettings.m_RenderSettings;
+ rendererSettings.bSynchronizeVideo = !!m_bSynchronizeVideo;
+ rendererSettings.bSynchronizeDisplay = !!m_bSynchronizeDisplay;
+ rendererSettings.bSynchronizeNearest = !!m_bSynchronizeNearest;
+ rendererSettings.iLineDelta = m_iLineDelta;
+ rendererSettings.iColumnDelta = m_iColumnDelta;
+ rendererSettings.fCycleDelta = m_fCycleDelta;
+ rendererSettings.fTargetSyncOffset = m_fTargetSyncOffset;
+ rendererSettings.fControlLimit = m_fControlLimit;
return __super::OnApply();
}
diff --git a/src/apps/mplayerc/QuicktimeGraph.cpp b/src/apps/mplayerc/QuicktimeGraph.cpp index 2152b1c4b..5351ed2f2 100644 --- a/src/apps/mplayerc/QuicktimeGraph.cpp +++ b/src/apps/mplayerc/QuicktimeGraph.cpp @@ -24,8 +24,9 @@ #include "stdafx.h"
#include <math.h>
#include "QuicktimeGraph.h"
-#include "IQTVideoSurface.h"
+#include "../../VideoRenderers/IQTVideoSurface.h"
#include "mplayerc.h"
+#include "MainFrm.h"
#include "../../DSUtil/DSUtil.h"
@@ -55,7 +56,8 @@ CQuicktimeGraph::CQuicktimeGraph(HWND hWndParent, HRESULT& hr) }
else if(s.iQTVideoRendererType == VIDRNDT_QT_DX9)
{
- if(SUCCEEDED(CreateAP9(CLSID_QT9AllocatorPresenter, hWndParent, &m_pQTAP)))
+ bool bFullscreen = (AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
+ if(SUCCEEDED(CreateAP9(CLSID_QT9AllocatorPresenter, hWndParent, bFullscreen, &m_pQTAP)))
dwStyle &= ~WS_VISIBLE;
}
diff --git a/src/apps/mplayerc/QuicktimeGraph.h b/src/apps/mplayerc/QuicktimeGraph.h index a3c37126c..0f0c25864 100644 --- a/src/apps/mplayerc/QuicktimeGraph.h +++ b/src/apps/mplayerc/QuicktimeGraph.h @@ -24,8 +24,8 @@ #pragma once
#include "BaseGraph.h"
-#include "AllocatorCommon7.h"
-#include "AllocatorCommon.h"
+#include "../../VideoRenderers/AllocatorCommon7.h"
+#include "../../VideoRenderers/AllocatorCommon.h"
namespace DSObjects
{
diff --git a/src/apps/mplayerc/RealMediaGraph.cpp b/src/apps/mplayerc/RealMediaGraph.cpp index ce4e1f7a4..355fc35b8 100644 --- a/src/apps/mplayerc/RealMediaGraph.cpp +++ b/src/apps/mplayerc/RealMediaGraph.cpp @@ -23,6 +23,7 @@ #include "stdafx.h"
#include "mplayerc.h"
+#include "MainFrm.h"
#include <math.h>
#include <atlbase.h>
#include <atlcoll.h>
@@ -508,6 +509,7 @@ CRealMediaPlayerWindowless::CRealMediaPlayerWindowless(HWND hWndParent, CRealMed {
AppSettings& s = AfxGetAppSettings();
+ bool bFullscreen = (AfxGetApp()->m_pMainWnd != NULL) && (((CMainFrame*)AfxGetApp()->m_pMainWnd)->IsD3DFullScreenMode());
switch(s.iRMVideoRendererType)
{
default:
@@ -516,7 +518,7 @@ CRealMediaPlayerWindowless::CRealMediaPlayerWindowless(HWND hWndParent, CRealMed return;
break;
case VIDRNDT_RM_DX9:
- if(FAILED(CreateAP9(CLSID_RM9AllocatorPresenter, hWndParent, &m_pRMAP)))
+ if(FAILED(CreateAP9(CLSID_RM9AllocatorPresenter, hWndParent, bFullscreen, &m_pRMAP)))
return;
break;
}
diff --git a/src/apps/mplayerc/RealMediaGraph.h b/src/apps/mplayerc/RealMediaGraph.h index f8f313996..7f095185d 100644 --- a/src/apps/mplayerc/RealMediaGraph.h +++ b/src/apps/mplayerc/RealMediaGraph.h @@ -25,8 +25,8 @@ #include "BaseGraph.h"
-#include "AllocatorCommon7.h"
-#include "AllocatorCommon.h"
+#include "../../VideoRenderers/AllocatorCommon7.h"
+#include "../../VideoRenderers/AllocatorCommon.h"
#include <RealMedia/pntypes.h>
#include <RealMedia/pnwintyp.h>
diff --git a/src/apps/mplayerc/ShaderEditorDlg.cpp b/src/apps/mplayerc/ShaderEditorDlg.cpp index 8a228e2f5..c43ba0d25 100644 --- a/src/apps/mplayerc/ShaderEditorDlg.cpp +++ b/src/apps/mplayerc/ShaderEditorDlg.cpp @@ -23,7 +23,7 @@ #include "stdafx.h"
#include "mplayerc.h"
-#include "PixelShaderCompiler.h"
+#include "../../VideoRenderers/PixelShaderCompiler.h"
#include "ShaderEditorDlg.h"
#include "MainFrm.h"
diff --git a/src/apps/mplayerc/WebServer.cpp b/src/apps/mplayerc/WebServer.cpp index 00f83d95b..7e9a57853 100644 --- a/src/apps/mplayerc/WebServer.cpp +++ b/src/apps/mplayerc/WebServer.cpp @@ -21,7 +21,6 @@ *
*/
-#include "../../zlib/zlib.h"
#include "stdafx.h"
#include "mplayerc.h"
#include "resource.h"
diff --git a/src/apps/mplayerc/libpng.h b/src/apps/mplayerc/libpng.h index 36054c6a6..01894be0b 100644 --- a/src/apps/mplayerc/libpng.h +++ b/src/apps/mplayerc/libpng.h @@ -34,6 +34,7 @@ struct png_t extern "C" unsigned char* DecompressPNG(struct png_t* png, int* w, int* h);
#include <atlimage.h>
+#include "mplayerc.h"
class CMPCPngImage : public CImage
{
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp index 133e3ad30..5410faee6 100644 --- a/src/apps/mplayerc/mplayerc.cpp +++ b/src/apps/mplayerc/mplayerc.cpp @@ -30,8 +30,6 @@ #include "Struct.h"
#include "FileVersionInfo.h"
#include <psapi.h>
-#include <d3d9.h>
-#include <d3dx9.h>
#include "Ifo.h"
#include "MiniDump.h"
#include "SettingsDefines.h"
@@ -39,9 +37,6 @@ #include "Monitors.h"
-#pragma comment(lib, "winmm.lib")
-
-
void CorrectComboListWidth(CComboBox& box, CFont* pWndFont)
{
@@ -188,6 +183,20 @@ bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype) return(true);
}
+bool IsVistaOrAbove()
+{
+ OSVERSIONINFO osver;
+
+ osver.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
+
+ if ( ::GetVersionEx( &osver ) &&
+ osver.dwPlatformId == VER_PLATFORM_WIN32_NT &&
+ (osver.dwMajorVersion >= 6 ) )
+ return TRUE;
+
+ return FALSE;
+}
+
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
@@ -299,11 +308,6 @@ CMPlayerCApp::CMPlayerCApp() Version.Create (strApp);
m_strVersion = Version.GetFileVersionEx();
- m_fTearingTest = false;
- m_fDisplayStats = false;
- m_bResetStats = false;
- m_hD3DX9Dll = NULL;
- m_nDXSdkRelease = 0;
memset (&m_ColorControl, 0, sizeof(m_ColorControl));
m_ColorControl[0].dwSize = sizeof (COLORPROPERTY_RANGE);
m_ColorControl[0].dwProperty = Brightness;
@@ -769,7 +773,7 @@ BOOL CMPlayerCApp::InitInstance() FILE * foo; // Not used
freopen_s(&foo, "conin$", "r", stdin); // Redirect stdin etc. to console
freopen_s(&foo, "conout$", "w", stdout);
- freopen_s(&foo, "conout$", "w", stderr);
+ freopen_s(&foo, "conout$", "w", stderr);
}
else
AfxMessageBox(_T("Could not create console"));
@@ -1710,37 +1714,40 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DSVIDEORENDERERTYPE, iDSVideoRendererType);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_RMVIDEORENDERERTYPE, iRMVideoRendererType);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_QTVIDEORENDERERTYPE, iQTVideoRendererType);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_APSURACEFUSAGE, iAPSurfaceUsage);
-// pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMRSYNCFIX, fVMRSyncFix);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DX9_RESIZER, iDX9Resizer);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERMODE, fVMR9MixerMode);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERYUV, fVMR9MixerYUV);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRAlternateVSync"), m_RenderSettings.fVMR9AlterativeVSync);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSyncOffset"), m_RenderSettings.iVMR9VSyncOffset);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSyncAccurate2"), m_RenderSettings.iVMR9VSyncAccurate);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFullscreenGUISupport"), m_RenderSettings.iVMR9FullscreenGUISupport);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), m_RenderSettings.iVMR9VSync);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), m_RenderSettings.iVMRDisableDesktopComposition);
-
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVROutputRange"), m_RenderSettings.iEVROutputRange);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVRHighColorRes"), m_RenderSettings.iEVRHighColorResolution);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVREnableFrameTimeCorrection"), m_RenderSettings.iEVREnableFrameTimeCorrection);
-
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUBeforeVSync"), m_RenderSettings.iVMRFlushGPUBeforeVSync);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUAfterPresent"), m_RenderSettings.iVMRFlushGPUAfterPresent);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUWait"), m_RenderSettings.iVMRFlushGPUWait);
-
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeClock"), m_RenderSettings.bSynchronizeVideo);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeDisplay"), m_RenderSettings.bSynchronizeDisplay);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeNearest"), m_RenderSettings.bSynchronizeNearest);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("LineDelta"), m_RenderSettings.iLineDelta);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("ColumnDelta"), m_RenderSettings.iColumnDelta);
-
- pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("CycleDelta"), (LPBYTE)&(m_RenderSettings.fCycleDelta), sizeof(m_RenderSettings.fCycleDelta));
- pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("TargetSyncOffset"), (LPBYTE)&(m_RenderSettings.fTargetSyncOffset), sizeof(m_RenderSettings.fTargetSyncOffset));
- pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("ControlLimit"), (LPBYTE)&(m_RenderSettings.fControlLimit), sizeof(m_RenderSettings.fControlLimit));
-
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("ResetDevice"), fResetDevice);
+
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_APSURACEFUSAGE, m_RenderersSettings.iAPSurfaceUsage);
+// pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMRSYNCFIX, m_RenderersSettings.fVMRSyncFix);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DX9_RESIZER, m_RenderersSettings.iDX9Resizer);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERMODE, m_RenderersSettings.fVMR9MixerMode);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERYUV, m_RenderersSettings.fVMR9MixerYUV);
+
+ CRenderersSettings::CRendererSettingsEVR& rendererSettings = m_RenderersSettings.m_RenderSettings;
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRAlternateVSync"), rendererSettings.fVMR9AlterativeVSync);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSyncOffset"), rendererSettings.iVMR9VSyncOffset);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSyncAccurate2"), rendererSettings.iVMR9VSyncAccurate);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFullscreenGUISupport"), rendererSettings.iVMR9FullscreenGUISupport);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), rendererSettings.iVMR9VSync);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), rendererSettings.iVMRDisableDesktopComposition);
+
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVROutputRange"), rendererSettings.iEVROutputRange);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVRHighColorRes"), rendererSettings.iEVRHighColorResolution);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("EVREnableFrameTimeCorrection"), rendererSettings.iEVREnableFrameTimeCorrection);
+
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUBeforeVSync"), rendererSettings.iVMRFlushGPUBeforeVSync);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUAfterPresent"), rendererSettings.iVMRFlushGPUAfterPresent);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUWait"), rendererSettings.iVMRFlushGPUWait);
+
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeClock"), rendererSettings.bSynchronizeVideo);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeDisplay"), rendererSettings.bSynchronizeDisplay);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SynchronizeNearest"), rendererSettings.bSynchronizeNearest);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("LineDelta"), rendererSettings.iLineDelta);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("ColumnDelta"), rendererSettings.iColumnDelta);
+
+ pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("CycleDelta"), (LPBYTE)&(rendererSettings.fCycleDelta), sizeof(rendererSettings.fCycleDelta));
+ pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("TargetSyncOffset"), (LPBYTE)&(rendererSettings.fTargetSyncOffset), sizeof(rendererSettings.fTargetSyncOffset));
+ pApp->WriteProfileBinary(IDS_R_SETTINGS, _T("ControlLimit"), (LPBYTE)&(rendererSettings.fControlLimit), sizeof(rendererSettings.fControlLimit));
+
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("ResetDevice"), m_RenderersSettings.fResetDevice);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, CString(AudioRendererDisplayName));
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, fAutoloadAudio);
@@ -1761,11 +1768,11 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPOVERRIDEPLACEMENT, fOverridePlacement);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPHORPOS, nHorPos);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPVERPOS, nVerPos);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPCSIZE, nSPCSize);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPCMAXRES, nSPCMaxRes);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPCSIZE, m_RenderersSettings.nSPCSize);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPCMAXRES, m_RenderersSettings.nSPCMaxRes);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SUBDELAYINTERVAL, nSubDelayInterval);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_POW2TEX, fSPCPow2Tex);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), fSPCAllowAnimationWhenBuffering);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_POW2TEX, m_RenderersSettings.fSPCPow2Tex);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), m_RenderersSettings.fSPCAllowAnimationWhenBuffering);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLESUBTITLES, fEnableSubtitles);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_USEDEFAULTSUBTITLESSTYLE, fUseDefaultSubtitlesStyle);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOSWITCHER, fEnableAudioSwitcher);
@@ -1815,7 +1822,7 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, (int)m_bToggleShader);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, (int)m_bToggleShaderScreenSpace);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_EVR_BUFFERS, iEvrBuffers);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_EVR_BUFFERS, m_RenderersSettings.iEvrBuffers);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SHOWOSD, (int)fShowOSD);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEEDLEDITOR, (int)fEnableEDLEditor);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LANGUAGE, (int)iLanguage);
@@ -2085,56 +2092,59 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) fLoopForever = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOOP, 0);
fRewind = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REWIND, FALSE);
iZoomLevel = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ZOOM, 1);
- iDSVideoRendererType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DSVIDEORENDERERTYPE, (IsVistaOrAbove() ? (HasEVR() ? VIDRNDT_DS_EVR_CUSTOM : VIDRNDT_DS_DEFAULT) : VIDRNDT_DS_OVERLAYMIXER) );
+ iDSVideoRendererType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DSVIDEORENDERERTYPE, (IsVistaOrAbove() ? (HasEVR() ? VIDRNDT_DS_EVR_CUSTOM : VIDRNDT_DS_DEFAULT) : VIDRNDT_DS_OVERLAYMIXER) );
iRMVideoRendererType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_RMVIDEORENDERERTYPE, VIDRNDT_RM_DEFAULT);
iQTVideoRendererType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_QTVIDEORENDERERTYPE, VIDRNDT_QT_DEFAULT);
- iAPSurfaceUsage = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_APSURACEFUSAGE, (IsVistaOrAbove() ? VIDRNDT_AP_TEXTURE3D : VIDRNDT_AP_TEXTURE2D));
-// fVMRSyncFix = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMRSYNCFIX, FALSE);
- iDX9Resizer = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DX9_RESIZER, 1);
- fVMR9MixerMode = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERMODE, TRUE);
- fVMR9MixerYUV = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERYUV, FALSE);
- CRendererSettingsEVR DefaultSettings;
- m_RenderSettings.fVMR9AlterativeVSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRAlternateVSync"), DefaultSettings.fVMR9AlterativeVSync);
- m_RenderSettings.iVMR9VSyncOffset = pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSyncOffset"), DefaultSettings.iVMR9VSyncOffset);
- m_RenderSettings.iVMR9VSyncAccurate = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSyncAccurate2"), DefaultSettings.iVMR9VSyncAccurate);
- m_RenderSettings.iVMR9FullscreenGUISupport = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFullscreenGUISupport"), DefaultSettings.iVMR9FullscreenGUISupport);
- m_RenderSettings.iEVRHighColorResolution = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVRHighColorRes"), DefaultSettings.iEVRHighColorResolution);
- m_RenderSettings.iEVREnableFrameTimeCorrection = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVREnableFrameTimeCorrection"), DefaultSettings.iEVREnableFrameTimeCorrection);
- m_RenderSettings.iVMR9VSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), DefaultSettings.iVMR9VSync);
- m_RenderSettings.iVMRDisableDesktopComposition = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), DefaultSettings.iVMRDisableDesktopComposition);
-
- m_RenderSettings.iEVROutputRange = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVROutputRange"), DefaultSettings.iEVROutputRange);
-
- m_RenderSettings.iVMRFlushGPUBeforeVSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUBeforeVSync"), DefaultSettings.iVMRFlushGPUBeforeVSync);
- m_RenderSettings.iVMRFlushGPUAfterPresent = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUAfterPresent"), DefaultSettings.iVMRFlushGPUAfterPresent);
- m_RenderSettings.iVMRFlushGPUWait = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUWait"), DefaultSettings.iVMRFlushGPUWait);
-
- m_RenderSettings.bSynchronizeVideo = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeClock"), DefaultSettings.bSynchronizeVideo);
- m_RenderSettings.bSynchronizeDisplay = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeDisplay"), DefaultSettings.bSynchronizeDisplay);
- m_RenderSettings.bSynchronizeNearest = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeNearest"), DefaultSettings.bSynchronizeNearest);
- m_RenderSettings.iLineDelta = pApp->GetProfileInt(IDS_R_SETTINGS, _T("LineDelta"), DefaultSettings.iLineDelta);
- m_RenderSettings.iColumnDelta = pApp->GetProfileInt(IDS_R_SETTINGS, _T("ColumnDelta"), DefaultSettings.iColumnDelta);
+
+ m_RenderersSettings.iAPSurfaceUsage = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_APSURACEFUSAGE, (IsVistaOrAbove() ? VIDRNDT_AP_TEXTURE3D : VIDRNDT_AP_TEXTURE2D));
+// m_RenderersSettings.fVMRSyncFix = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMRSYNCFIX, FALSE);
+ m_RenderersSettings.iDX9Resizer = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DX9_RESIZER, 1);
+ m_RenderersSettings.fVMR9MixerMode = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERMODE, TRUE);
+ m_RenderersSettings.fVMR9MixerYUV = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_VMR9MIXERYUV, FALSE);
+
+ CRenderersSettings::CRendererSettingsEVR& rendererSettings = m_RenderersSettings.m_RenderSettings;
+ CRenderersSettings::CRendererSettingsEVR DefaultSettings;
+ rendererSettings.fVMR9AlterativeVSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRAlternateVSync"), DefaultSettings.fVMR9AlterativeVSync);
+ rendererSettings.iVMR9VSyncOffset = pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSyncOffset"), DefaultSettings.iVMR9VSyncOffset);
+ rendererSettings.iVMR9VSyncAccurate = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSyncAccurate2"), DefaultSettings.iVMR9VSyncAccurate);
+ rendererSettings.iVMR9FullscreenGUISupport = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFullscreenGUISupport"), DefaultSettings.iVMR9FullscreenGUISupport);
+ rendererSettings.iEVRHighColorResolution = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVRHighColorRes"), DefaultSettings.iEVRHighColorResolution);
+ rendererSettings.iEVREnableFrameTimeCorrection = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVREnableFrameTimeCorrection"), DefaultSettings.iEVREnableFrameTimeCorrection);
+ rendererSettings.iVMR9VSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRVSync"), DefaultSettings.iVMR9VSync);
+ rendererSettings.iVMRDisableDesktopComposition = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRDisableDesktopComposition"), DefaultSettings.iVMRDisableDesktopComposition);
+
+ rendererSettings.iEVROutputRange = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("EVROutputRange"), DefaultSettings.iEVROutputRange);
+
+ rendererSettings.iVMRFlushGPUBeforeVSync = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUBeforeVSync"), DefaultSettings.iVMRFlushGPUBeforeVSync);
+ rendererSettings.iVMRFlushGPUAfterPresent = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUAfterPresent"), DefaultSettings.iVMRFlushGPUAfterPresent);
+ rendererSettings.iVMRFlushGPUWait = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("VMRFlushGPUWait"), DefaultSettings.iVMRFlushGPUWait);
+
+ rendererSettings.bSynchronizeVideo = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeClock"), DefaultSettings.bSynchronizeVideo);
+ rendererSettings.bSynchronizeDisplay = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeDisplay"), DefaultSettings.bSynchronizeDisplay);
+ rendererSettings.bSynchronizeNearest = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SynchronizeNearest"), DefaultSettings.bSynchronizeNearest);
+ rendererSettings.iLineDelta = pApp->GetProfileInt(IDS_R_SETTINGS, _T("LineDelta"), DefaultSettings.iLineDelta);
+ rendererSettings.iColumnDelta = pApp->GetProfileInt(IDS_R_SETTINGS, _T("ColumnDelta"), DefaultSettings.iColumnDelta);
double *dPtr;
UINT dSize;
if(pApp->GetProfileBinary(IDS_R_SETTINGS, _T("CycleDelta"), (LPBYTE*)&dPtr, &dSize))
{
- m_RenderSettings.fCycleDelta = *dPtr;
+ rendererSettings.fCycleDelta = *dPtr;
delete [] dPtr;
}
if(pApp->GetProfileBinary(IDS_R_SETTINGS, _T("TargetSyncOffset"), (LPBYTE*)&dPtr, &dSize))
{
- m_RenderSettings.fTargetSyncOffset = *dPtr;
+ rendererSettings.fTargetSyncOffset = *dPtr;
delete [] dPtr;
}
if(pApp->GetProfileBinary(IDS_R_SETTINGS, _T("ControlLimit"), (LPBYTE*)&dPtr, &dSize))
{
- m_RenderSettings.fControlLimit = *dPtr;
+ rendererSettings.fControlLimit = *dPtr;
delete [] dPtr;
}
- fResetDevice = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("ResetDevice"), TRUE);
+ m_RenderersSettings.fResetDevice = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("ResetDevice"), TRUE);
AudioRendererDisplayName = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, _T(""));
fAutoloadAudio = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, TRUE);
@@ -2214,10 +2224,10 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) fOverridePlacement = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPOVERRIDEPLACEMENT, 0);
nHorPos = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPHORPOS, 50);
nVerPos = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPVERPOS, 90);
- nSPCSize = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPCSIZE, 3);
- nSPCMaxRes = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPCMAXRES, 2);
+ m_RenderersSettings.nSPCSize = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPCSIZE, 3);
+ m_RenderersSettings.nSPCMaxRes = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPCMAXRES, 2);
nSubDelayInterval = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SUBDELAYINTERVAL, 500);
- fSPCPow2Tex = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_POW2TEX, TRUE);
+ m_RenderersSettings.fSPCPow2Tex = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_POW2TEX, TRUE);
bool bAllowAnimationWhenBuffering = true;
SYSTEM_INFO SysInfo;
@@ -2226,7 +2236,7 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) bAllowAnimationWhenBuffering = false;
- fSPCAllowAnimationWhenBuffering = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), bAllowAnimationWhenBuffering);
+ m_RenderersSettings.fSPCAllowAnimationWhenBuffering = !!pApp->GetProfileInt(IDS_R_SETTINGS, _T("SPCAllowAnimationWhenBuffering"), bAllowAnimationWhenBuffering);
fEnableSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLESUBTITLES, TRUE);
fUseDefaultSubtitlesStyle = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_USEDEFAULTSUBTITLESSTYLE, FALSE);
fEnableAudioSwitcher = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOSWITCHER, TRUE);
@@ -2552,7 +2562,7 @@ void CMPlayerCApp::Settings::UpdateData(bool fSave) m_bToggleShader = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, 0);
m_bToggleShaderScreenSpace = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, 0);
- iEvrBuffers = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_EVR_BUFFERS, 5);
+ m_RenderersSettings.iEvrBuffers = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_EVR_BUFFERS, 5);
fShowOSD = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SHOWOSD, 1);
fEnableEDLEditor= !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEEDLEDITOR, FALSE);
@@ -3366,25 +3376,6 @@ CStringA GetContentType(CString fn, CAtlList<CString>* redir) return TToA(ct);
}
-
-LONGLONG CMPlayerCApp::GetPerfCounter()
-{
- LARGE_INTEGER i64Ticks100ns;
- LARGE_INTEGER llPerfFrequency;
-
- QueryPerformanceFrequency (&llPerfFrequency);
- if (llPerfFrequency.QuadPart != 0)
- {
- QueryPerformanceCounter (&i64Ticks100ns);
- return llMulDiv (i64Ticks100ns.QuadPart, 10000000, llPerfFrequency.QuadPart, 0);
- }
- else
- {
- // ms to 100ns units
- return timeGetTime() * 10000;
- }
-}
-
COLORPROPERTY_RANGE* CMPlayerCApp::GetColorControl(ControlType nFlag)
{
switch (nFlag)
@@ -3402,56 +3393,6 @@ COLORPROPERTY_RANGE* CMPlayerCApp::GetColorControl(ControlType nFlag) }
-HINSTANCE CMPlayerCApp::GetD3X9Dll()
-{
- if (m_hD3DX9Dll == NULL)
- {
- int min_ver = D3DX_SDK_VERSION;
- int max_ver = D3DX_SDK_VERSION;
-
- m_nDXSdkRelease = 0;
-
- if(D3DX_SDK_VERSION >= 42)
- {
- // August 2009 SDK (v42) is not compatible with older versions
- min_ver = 42;
- }
- else
- {
- if(D3DX_SDK_VERSION > 33)
- {
- // versions between 34 and 41 have no known compatibility issues
- min_ver = 34;
- }
- else
- {
- // The minimum version that supports the functionality required by MPC is 24
- min_ver = 24;
-
- if(D3DX_SDK_VERSION == 33)
- {
- // The April 2007 SDK (v33) should not be used (crash sometimes during shader compilation)
- max_ver = 32;
- }
- }
- }
-
- // load latest compatible version of the DLL that is available
- for (int i=max_ver; i>=min_ver; i--)
- {
- m_strD3DX9Version.Format(_T("d3dx9_%d.dll"), i);
- m_hD3DX9Dll = LoadLibrary (m_strD3DX9Version);
- if (m_hD3DX9Dll)
- {
- m_nDXSdkRelease = i;
- break;
- }
- }
- }
-
- return m_hD3DX9Dll;
-}
-
LPCTSTR CMPlayerCApp::GetSatelliteDll(int nLanguage)
{
switch (nLanguage)
@@ -3536,21 +3477,6 @@ void CMPlayerCApp::SetLanguage (int nLanguage) AfxSetResourceHandle( hMod );
}
-
-bool CMPlayerCApp::IsVistaOrAbove()
-{
- OSVERSIONINFO osver;
-
- osver.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
-
- if ( ::GetVersionEx( &osver ) &&
- osver.dwPlatformId == VER_PLATFORM_WIN32_NT &&
- (osver.dwMajorVersion >= 6 ) )
- return TRUE;
-
- return FALSE;
-}
-
bool CMPlayerCApp::IsVSFilterInstalled()
{
bool result = false;
@@ -3636,3 +3562,13 @@ void CAboutDlg::OnHomepage(NMHDR *pNMHDR, LRESULT *pResult) ShellExecute(m_hWnd, _T("open"), _T("http://mpc-hc.sourceforge.net/about-homepage.html"), NULL, NULL, SW_SHOWDEFAULT);
*pResult = 0;
}
+
+CRenderersData* GetRenderersData()
+{
+ return &AfxGetMyApp()->m_Renderers;
+}
+
+CRenderersSettings& GetRenderersSettings()
+{
+ return AfxGetAppSettings().m_RenderersSettings;
+}
diff --git a/src/apps/mplayerc/mplayerc.h b/src/apps/mplayerc/mplayerc.h index 690fa953a..ffca3e8b5 100644 --- a/src/apps/mplayerc/mplayerc.h +++ b/src/apps/mplayerc/mplayerc.h @@ -34,6 +34,7 @@ #include "MediaFormats.h"
#include "FakeFilterMapper2.h"
#include "DVBChannel.h"
+#include "../../VideoRenderers/RenderersSettings.h"
#ifdef UNICODE
#define MPC_WND_CLASS_NAME L"MediaPlayerClassicW"
@@ -43,10 +44,8 @@ enum
{
- WM_GRAPHNOTIFY = WM_APP+1,
- WM_REARRANGERENDERLESS,
+ WM_GRAPHNOTIFY = WM_RESET_DEVICE+1,
WM_RESUMEFROMSTATE,
- WM_RESET_DEVICE,
WM_TUNER_SCAN_PROGRESS,
WM_TUNER_SCAN_END,
WM_TUNER_STATS,
@@ -62,6 +61,7 @@ extern HICON LoadIcon(CString fn, bool fSmall); extern bool LoadType(CString fn, CString& type);
extern bool LoadResource(UINT resid, CStringA& str, LPCTSTR restype);
extern CStringA GetContentType(CString fn, CAtlList<CString>* redir = NULL);
+extern bool IsVistaOrAbove();
/////////////////////////////////////////////////////////////////////////////
// Casimir666
@@ -167,28 +167,6 @@ enum VIDRNDT_DS_SYNC
};
-enum
-{
- VIDRNDT_RM_DEFAULT,
- VIDRNDT_RM_DX7,
- VIDRNDT_RM_DX9,
-};
-
-enum
-{
- VIDRNDT_QT_DEFAULT,
- VIDRNDT_QT_DX7,
- VIDRNDT_QT_DX9,
-};
-
-enum
-{
- VIDRNDT_AP_SURFACE,
- VIDRNDT_AP_TEXTURE2D,
- VIDRNDT_AP_TEXTURE3D,
-};
-
-
// Enumeration for MCE remotecontrol (careful : add 0x010000 for all keys!)
enum MCE_RAW_INPUT
{
@@ -445,8 +423,6 @@ class CMPlayerCApp : public CWinApp // === CASIMIR666 : Ajout CMPlayerCApp
COLORPROPERTY_RANGE m_ColorControl[4];
- HINSTANCE m_hD3DX9Dll;
- int m_nDXSdkRelease;
static UINT GetRemoteControlCodeMicrosoft(UINT nInputcode, HRAWINPUT hRawInput);
static UINT GetRemoteControlCodeSRM7500(UINT nInputcode, HRAWINPUT hRawInput);
@@ -464,26 +440,16 @@ public: bool GetAppSavePath(CString& path);
// === CASIMIR666 : Ajout CMPlayerCApp
- bool m_fTearingTest;
- int m_fDisplayStats;
- bool m_bResetStats; // Set to reset the presentation statistics
+ CRenderersData m_Renderers;
CString m_strVersion;
- CString m_strD3DX9Version;
CString m_AudioRendererDisplayName_CL;
typedef UINT (*PTR_GetRemoteControlCode)(UINT nInputcode, HRAWINPUT hRawInput);
PTR_GetRemoteControlCode GetRemoteControlCode;
- LONGLONG GetPerfCounter();
COLORPROPERTY_RANGE* GetColorControl(ControlType nFlag);
- HINSTANCE GetD3X9Dll();
- int GetDXSdkRelease()
- {
- return m_nDXSdkRelease;
- };
static void SetLanguage (int nLanguage);
static LPCTSTR GetSatelliteDll(int nLang);
- static bool IsVistaOrAbove();
static bool IsVSFilterInstalled();
static bool HasEVR();
static HRESULT GetElevationType(TOKEN_ELEVATION_TYPE* ptet);
@@ -557,109 +523,11 @@ public: CAutoPtrList<FilterOverride> filters;
- bool fResetDevice;
-
- class CRendererSettingsShared
- {
- public:
- CRendererSettingsShared()
- {
- SetDefault();
- }
- bool fVMR9AlterativeVSync;
- int iVMR9VSyncOffset;
- bool iVMR9VSyncAccurate;
- bool iVMR9FullscreenGUISupport;
- bool iVMR9VSync;
- bool iVMRDisableDesktopComposition;
- int iVMRFlushGPUBeforeVSync;
- int iVMRFlushGPUAfterPresent;
- int iVMRFlushGPUWait;
-
- // SyncRenderer settings
- int bSynchronizeVideo;
- int bSynchronizeDisplay;
- int bSynchronizeNearest;
- int iLineDelta;
- int iColumnDelta;
- double fCycleDelta;
- double fTargetSyncOffset;
- double fControlLimit;
-
- void SetDefault()
- {
- fVMR9AlterativeVSync = 0;
- iVMR9VSyncOffset = 0;
- iVMR9VSyncAccurate = 1;
- iVMR9FullscreenGUISupport = 0;
- iVMR9VSync = 1;
- iVMRDisableDesktopComposition = 0;
- iVMRFlushGPUBeforeVSync = 1;
- iVMRFlushGPUAfterPresent = 1;
- iVMRFlushGPUWait = 0;
- bSynchronizeVideo = 0;
- bSynchronizeDisplay = 0;
- bSynchronizeNearest = 1;
- iLineDelta = 0;
- iColumnDelta = 0;
- fCycleDelta = 0.0012;
- fTargetSyncOffset = 12.0;
- fControlLimit = 2.0;
- }
- void SetOptimal()
- {
- fVMR9AlterativeVSync = 1;
- iVMR9VSyncAccurate = 1;
- iVMR9VSync = 1;
- iVMRDisableDesktopComposition = 1;
- iVMRFlushGPUBeforeVSync = 1;
- iVMRFlushGPUAfterPresent = 1;
- iVMRFlushGPUWait = 0;
- bSynchronizeVideo = 0;
- bSynchronizeDisplay = 0;
- bSynchronizeNearest = 1;
- iLineDelta = 0;
- iColumnDelta = 0;
- fCycleDelta = 0.0012;
- fTargetSyncOffset = 12.0;
- fControlLimit = 2.0;
- }
- };
- class CRendererSettingsEVR : public CRendererSettingsShared
- {
- public:
- bool iEVRHighColorResolution;
- bool iEVREnableFrameTimeCorrection;
- int iEVROutputRange;
-
- CRendererSettingsEVR()
- {
- SetDefault();
- }
- void SetDefault()
- {
- CRendererSettingsShared::SetDefault();
- iEVRHighColorResolution = 0;
- iEVREnableFrameTimeCorrection = 0;
- iEVROutputRange = 0;
- }
- void SetOptimal()
- {
- CRendererSettingsShared::SetOptimal();
- iEVRHighColorResolution = 0;
- }
- };
-
- CRendererSettingsEVR m_RenderSettings;
+ CRenderersSettings m_RenderersSettings;
int iDSVideoRendererType;
int iRMVideoRendererType;
int iQTVideoRendererType;
- int iAPSurfaceUsage;
-// bool fVMRSyncFix;
- int iDX9Resizer;
- bool fVMR9MixerMode;
- bool fVMR9MixerYUV;
int nVolume;
int nBalance;
@@ -707,11 +575,7 @@ public: STSStyle subdefstyle;
bool fOverridePlacement;
int nHorPos, nVerPos;
- int nSPCSize;
- int nSPCMaxRes;
int nSubDelayInterval;
- bool fSPCPow2Tex;
- bool fSPCAllowAnimationWhenBuffering;
bool fEnableSubtitles;
bool fUseDefaultSubtitlesStyle;
@@ -735,7 +599,7 @@ public: float AudioBoost;
bool fIntRealMedia;
- // bool fRealMediaRenderless;
+ //bool fRealMediaRenderless;
int iQuickTimeRenderer;
float RealMediaQuickTimeFPS;
@@ -805,7 +669,6 @@ public: bool fRememberDVDPos;
bool fRememberFilePos;
bool fShowOSD;
- int iEvrBuffers;
int iLanguage;
// BDA configuration
diff --git a/src/apps/mplayerc/mplayerc.vcproj b/src/apps/mplayerc/mplayerc.vcproj index fb96ee54a..21a744fe5 100644 --- a/src/apps/mplayerc/mplayerc.vcproj +++ b/src/apps/mplayerc/mplayerc.vcproj @@ -27,7 +27,7 @@ UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
- WholeProgramOptimization="0"
+ WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -121,6 +121,7 @@ UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
+ WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -385,19 +386,11 @@ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
- RelativePath=".\AllocatorCommon.cpp"
- >
- </File>
- <File
- RelativePath=".\AllocatorCommon7.cpp"
- >
- </File>
- <File
RelativePath=".\AuthDlg.cpp"
>
</File>
<File
- RelativePath="BaseGraph.cpp"
+ RelativePath=".\BaseGraph.cpp"
>
</File>
<File
@@ -405,11 +398,11 @@ >
</File>
<File
- RelativePath="ComPropertyPage.cpp"
+ RelativePath=".\ComPropertyPage.cpp"
>
</File>
<File
- RelativePath="ComPropertySheet.cpp"
+ RelativePath=".\ComPropertySheet.cpp"
>
</File>
<File
@@ -429,11 +422,7 @@ >
</File>
<File
- RelativePath="CShockwaveFlash.cpp"
- >
- </File>
- <File
- RelativePath=".\D3DFont.cpp"
+ RelativePath=".\CShockwaveFlash.cpp"
>
</File>
<File
@@ -445,75 +434,19 @@ >
</File>
<File
- RelativePath="DX7AllocatorPresenter.cpp"
- >
- </File>
- <File
- RelativePath="DX9AllocatorPresenter.cpp"
- >
- <FileConfiguration
- Name="Release Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="false"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\DXRAllocatorPresenter.cpp"
- >
- </File>
- <File
RelativePath=".\EditListEditor.cpp"
>
</File>
<File
- RelativePath=".\EVRAllocatorPresenter.cpp"
- >
- <FileConfiguration
- Name="Release Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Unicode|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="false"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Unicode|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="false"
- />
- </FileConfiguration>
- </File>
- <File
RelativePath=".\FakeFilterMapper2.cpp"
>
</File>
<File
- RelativePath="FavoriteAddDlg.cpp"
+ RelativePath=".\FavoriteAddDlg.cpp"
>
</File>
<File
- RelativePath="FavoriteOrganizeDlg.cpp"
+ RelativePath=".\FavoriteOrganizeDlg.cpp"
>
</File>
<File
@@ -529,7 +462,7 @@ >
</File>
<File
- RelativePath="FileDropTarget.cpp"
+ RelativePath=".\FileDropTarget.cpp"
>
</File>
<File
@@ -537,7 +470,7 @@ >
</File>
<File
- RelativePath="FloatEdit.cpp"
+ RelativePath=".\FloatEdit.cpp"
>
</File>
<File
@@ -545,7 +478,7 @@ >
</File>
<File
- RelativePath="GoToDlg.cpp"
+ RelativePath=".\GoToDlg.cpp"
>
</File>
<File
@@ -553,10 +486,6 @@ >
</File>
<File
- RelativePath=".\IPinHook.cpp"
- >
- </File>
- <File
RelativePath=".\ISDb.cpp"
>
</File>
@@ -565,7 +494,7 @@ >
</File>
<File
- RelativePath="KeyProvider.cpp"
+ RelativePath=".\KeyProvider.cpp"
>
</File>
<File
@@ -617,23 +546,15 @@ >
</File>
<File
- RelativePath=".\MacrovisionKicker.cpp"
- >
- </File>
- <File
- RelativePath=".\madVRAllocatorPresenter.cpp"
- >
- </File>
- <File
RelativePath=".\MainFrm.cpp"
>
</File>
<File
- RelativePath="MediaFormats.cpp"
+ RelativePath=".\MediaFormats.cpp"
>
</File>
<File
- RelativePath="MediaTypesDlg.cpp"
+ RelativePath=".\MediaTypesDlg.cpp"
>
</File>
<File
@@ -685,11 +606,11 @@ >
</File>
<File
- RelativePath="OpenCapDeviceDlg.cpp"
+ RelativePath=".\OpenCapDeviceDlg.cpp"
>
</File>
<File
- RelativePath="OpenDlg.cpp"
+ RelativePath=".\OpenDlg.cpp"
>
</File>
<File
@@ -697,23 +618,19 @@ >
</File>
<File
- RelativePath=".\PixelShaderCompiler.cpp"
+ RelativePath=".\PlayerCaptureBar.cpp"
>
</File>
<File
- RelativePath="PlayerCaptureBar.cpp"
+ RelativePath=".\PlayerCaptureDialog.cpp"
>
</File>
<File
- RelativePath="PlayerCaptureDialog.cpp"
+ RelativePath=".\PlayerInfoBar.cpp"
>
</File>
<File
- RelativePath="PlayerInfoBar.cpp"
- >
- </File>
- <File
- RelativePath="PlayerListCtrl.cpp"
+ RelativePath=".\PlayerListCtrl.cpp"
>
</File>
<File
@@ -725,11 +642,11 @@ >
</File>
<File
- RelativePath="PlayerPlaylistBar.cpp"
+ RelativePath=".\PlayerPlaylistBar.cpp"
>
</File>
<File
- RelativePath="PlayerSeekBar.cpp"
+ RelativePath=".\PlayerSeekBar.cpp"
>
</File>
<File
@@ -737,19 +654,19 @@ >
</File>
<File
- RelativePath="PlayerStatusBar.cpp"
+ RelativePath=".\PlayerStatusBar.cpp"
>
</File>
<File
- RelativePath="PlayerSubresyncBar.cpp"
+ RelativePath=".\PlayerSubresyncBar.cpp"
>
</File>
<File
- RelativePath="PlayerToolBar.cpp"
+ RelativePath=".\PlayerToolBar.cpp"
>
</File>
<File
- RelativePath="Playlist.cpp"
+ RelativePath=".\Playlist.cpp"
>
</File>
<File
@@ -793,19 +710,19 @@ </FileConfiguration>
</File>
<File
- RelativePath="PnSPresetsDlg.cpp"
+ RelativePath=".\PnSPresetsDlg.cpp"
>
</File>
<File
- RelativePath="PPageAccelTbl.cpp"
+ RelativePath=".\PPageAccelTbl.cpp"
>
</File>
<File
- RelativePath="PPageAudioSwitcher.cpp"
+ RelativePath=".\PPageAudioSwitcher.cpp"
>
</File>
<File
- RelativePath="PPageBase.cpp"
+ RelativePath=".\PPageBase.cpp"
>
</File>
<File
@@ -817,7 +734,7 @@ >
</File>
<File
- RelativePath="PPageDVD.cpp"
+ RelativePath=".\PPageDVD.cpp"
>
</File>
<File
@@ -825,11 +742,11 @@ >
</File>
<File
- RelativePath="PPageFileInfoClip.cpp"
+ RelativePath=".\PPageFileInfoClip.cpp"
>
</File>
<File
- RelativePath="PPageFileInfoDetails.cpp"
+ RelativePath=".\PPageFileInfoDetails.cpp"
>
</File>
<File
@@ -837,7 +754,7 @@ >
</File>
<File
- RelativePath="PPageFileInfoSheet.cpp"
+ RelativePath=".\PPageFileInfoSheet.cpp"
>
</File>
<File
@@ -845,7 +762,7 @@ >
</File>
<File
- RelativePath="PPageFormats.cpp"
+ RelativePath=".\PPageFormats.cpp"
>
</File>
<File
@@ -865,15 +782,15 @@ >
</File>
<File
- RelativePath="PPagePlayback.cpp"
+ RelativePath=".\PPagePlayback.cpp"
>
</File>
<File
- RelativePath="PPagePlayer.cpp"
+ RelativePath=".\PPagePlayer.cpp"
>
</File>
<File
- RelativePath="PPageSheet.cpp"
+ RelativePath=".\PPageSheet.cpp"
>
</File>
<File
@@ -881,11 +798,11 @@ >
</File>
<File
- RelativePath="PPageSubStyle.cpp"
+ RelativePath=".\PPageSubStyle.cpp"
>
</File>
<File
- RelativePath="PPageSubtitles.cpp"
+ RelativePath=".\PPageSubtitles.cpp"
>
</File>
<File
@@ -893,7 +810,7 @@ >
</File>
<File
- RelativePath="PPageTweaks.cpp"
+ RelativePath=".\PPageTweaks.cpp"
>
</File>
<File
@@ -901,14 +818,6 @@ >
</File>
<File
- RelativePath=".\QT7AllocatorPresenter.cpp"
- >
- </File>
- <File
- RelativePath=".\QT9AllocatorPresenter.cpp"
- >
- </File>
- <File
RelativePath="QuicktimeGraph.cpp"
>
<FileConfiguration
@@ -929,31 +838,23 @@ </FileConfiguration>
</File>
<File
- RelativePath="RealMediaGraph.cpp"
- >
- </File>
- <File
- RelativePath="RealMediaWindowlessSite.cpp"
- >
- </File>
- <File
- RelativePath="RegFilterChooserDlg.cpp"
+ RelativePath=".\RealMediaGraph.cpp"
>
</File>
<File
- RelativePath=".\RM7AllocatorPresenter.cpp"
+ RelativePath=".\RealMediaWindowlessSite.cpp"
>
</File>
<File
- RelativePath=".\RM9AllocatorPresenter.cpp"
+ RelativePath=".\RegFilterChooserDlg.cpp"
>
</File>
<File
- RelativePath="SaveDlg.cpp"
+ RelativePath=".\SaveDlg.cpp"
>
</File>
<File
- RelativePath="SaveTextFileDialog.cpp"
+ RelativePath=".\SaveTextFileDialog.cpp"
>
</File>
<File
@@ -961,7 +862,7 @@ >
</File>
<File
- RelativePath="SelectMediaType.cpp"
+ RelativePath=".\SelectMediaType.cpp"
>
</File>
<File
@@ -977,19 +878,19 @@ >
</File>
<File
- RelativePath="ShockwaveGraph.cpp"
+ RelativePath=".\ShockwaveGraph.cpp"
>
</File>
<File
- RelativePath="StaticLink.cpp"
+ RelativePath=".\StaticLink.cpp"
>
</File>
<File
- RelativePath="StatusLabel.cpp"
+ RelativePath=".\StatusLabel.cpp"
>
</File>
<File
- RelativePath=".\StdAfx.cpp"
+ RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Name="Release Unicode|Win32"
@@ -1029,11 +930,7 @@ >
</File>
<File
- RelativePath=".\SyncRenderer.cpp"
- >
- </File>
- <File
- RelativePath="TextPassThruFilter.cpp"
+ RelativePath=".\TextPassThruFilter.cpp"
>
</File>
<File
@@ -1041,19 +938,11 @@ >
</File>
<File
- RelativePath=".\VMR7AllocatorPresenter.cpp"
- >
- </File>
- <File
- RelativePath=".\VMR9AllocatorPresenter.cpp"
- >
- </File>
- <File
RelativePath=".\VMROSD.cpp"
>
</File>
<File
- RelativePath="VolumeCtrl.cpp"
+ RelativePath=".\VolumeCtrl.cpp"
>
</File>
<File
@@ -1063,38 +952,6 @@ <File
RelativePath=".\WebServer.cpp"
>
- <FileConfiguration
- Name="Release Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release Unicode|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Unicode|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug Unicode|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
</File>
<File
RelativePath=".\WebServerSocket.cpp"
@@ -1106,19 +963,11 @@ Filter="h;hpp;hxx;hm;inl"
>
<File
- RelativePath=".\AllocatorCommon.h"
- >
- </File>
- <File
- RelativePath=".\AllocatorCommon7.h"
- >
- </File>
- <File
RelativePath=".\AuthDlg.h"
>
</File>
<File
- RelativePath="BaseGraph.h"
+ RelativePath=".\BaseGraph.h"
>
</File>
<File
@@ -1130,11 +979,11 @@ >
</File>
<File
- RelativePath="ComPropertyPage.h"
+ RelativePath=".\ComPropertyPage.h"
>
</File>
<File
- RelativePath="ComPropertySheet.h"
+ RelativePath=".\ComPropertySheet.h"
>
</File>
<File
@@ -1154,11 +1003,7 @@ >
</File>
<File
- RelativePath="CShockwaveFlash.h"
- >
- </File>
- <File
- RelativePath=".\D3DFont.h"
+ RelativePath=".\CShockwaveFlash.h"
>
</File>
<File
@@ -1170,35 +1015,19 @@ >
</File>
<File
- RelativePath="DX7AllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath="DX9AllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath=".\DXRAllocatorPresenter.h"
- >
- </File>
- <File
RelativePath=".\EditListEditor.h"
>
</File>
<File
- RelativePath=".\EVRAllocatorPresenter.h"
- >
- </File>
- <File
RelativePath=".\FakeFilterMapper2.h"
>
</File>
<File
- RelativePath="FavoriteAddDlg.h"
+ RelativePath=".\FavoriteAddDlg.h"
>
</File>
<File
- RelativePath="FavoriteOrganizeDlg.h"
+ RelativePath=".\FavoriteOrganizeDlg.h"
>
</File>
<File
@@ -1214,7 +1043,7 @@ >
</File>
<File
- RelativePath="FileDropTarget.h"
+ RelativePath=".\FileDropTarget.h"
>
</File>
<File
@@ -1222,7 +1051,7 @@ >
</File>
<File
- RelativePath="FloatEdit.h"
+ RelativePath=".\FloatEdit.h"
>
</File>
<File
@@ -1230,7 +1059,7 @@ >
</File>
<File
- RelativePath="GoToDlg.h"
+ RelativePath=".\GoToDlg.h"
>
</File>
<File
@@ -1246,14 +1075,6 @@ >
</File>
<File
- RelativePath=".\IPinHook.h"
- >
- </File>
- <File
- RelativePath="IQTVideoSurface.h"
- >
- </File>
- <File
RelativePath=".\ISDb.h"
>
</File>
@@ -1266,7 +1087,7 @@ >
</File>
<File
- RelativePath="KeyProvider.h"
+ RelativePath=".\KeyProvider.h"
>
</File>
<File
@@ -1282,23 +1103,15 @@ >
</File>
<File
- RelativePath=".\MacrovisionKicker.h"
- >
- </File>
- <File
- RelativePath=".\madVRAllocatorPresenter.h"
- >
- </File>
- <File
RelativePath=".\MainFrm.h"
>
</File>
<File
- RelativePath="MediaFormats.h"
+ RelativePath=".\MediaFormats.h"
>
</File>
<File
- RelativePath="MediaTypesDlg.h"
+ RelativePath=".\MediaTypesDlg.h"
>
</File>
<File
@@ -1326,11 +1139,11 @@ >
</File>
<File
- RelativePath="OpenCapDeviceDlg.h"
+ RelativePath=".\OpenCapDeviceDlg.h"
>
</File>
<File
- RelativePath="OpenDlg.h"
+ RelativePath=".\OpenDlg.h"
>
</File>
<File
@@ -1338,23 +1151,19 @@ >
</File>
<File
- RelativePath=".\PixelShaderCompiler.h"
+ RelativePath=".\PlayerCaptureBar.h"
>
</File>
<File
- RelativePath="PlayerCaptureBar.h"
+ RelativePath=".\PlayerCaptureDialog.h"
>
</File>
<File
- RelativePath="PlayerCaptureDialog.h"
+ RelativePath=".\PlayerInfoBar.h"
>
</File>
<File
- RelativePath="PlayerInfoBar.h"
- >
- </File>
- <File
- RelativePath="PlayerListCtrl.h"
+ RelativePath=".\PlayerListCtrl.h"
>
</File>
<File
@@ -1366,11 +1175,11 @@ >
</File>
<File
- RelativePath="PlayerPlaylistBar.h"
+ RelativePath=".\PlayerPlaylistBar.h"
>
</File>
<File
- RelativePath="PlayerSeekBar.h"
+ RelativePath=".\PlayerSeekBar.h"
>
</File>
<File
@@ -1378,19 +1187,19 @@ >
</File>
<File
- RelativePath="PlayerStatusBar.h"
+ RelativePath=".\PlayerStatusBar.h"
>
</File>
<File
- RelativePath="PlayerSubresyncBar.h"
+ RelativePath=".\PlayerSubresyncBar.h"
>
</File>
<File
- RelativePath="PlayerToolBar.h"
+ RelativePath=".\PlayerToolBar.h"
>
</File>
<File
- RelativePath="Playlist.h"
+ RelativePath=".\Playlist.h"
>
</File>
<File
@@ -1398,19 +1207,19 @@ >
</File>
<File
- RelativePath="PnSPresetsDlg.h"
+ RelativePath=".\PnSPresetsDlg.h"
>
</File>
<File
- RelativePath="PPageAccelTbl.h"
+ RelativePath=".\PPageAccelTbl.h"
>
</File>
<File
- RelativePath="PPageAudioSwitcher.h"
+ RelativePath=".\PPageAudioSwitcher.h"
>
</File>
<File
- RelativePath="PPageBase.h"
+ RelativePath=".\PPageBase.h"
>
</File>
<File
@@ -1422,7 +1231,7 @@ >
</File>
<File
- RelativePath="PPageDVD.h"
+ RelativePath=".\PPageDVD.h"
>
</File>
<File
@@ -1430,11 +1239,11 @@ >
</File>
<File
- RelativePath="PPageFileInfoClip.h"
+ RelativePath=".\PPageFileInfoClip.h"
>
</File>
<File
- RelativePath="PPageFileInfoDetails.h"
+ RelativePath=".\PPageFileInfoDetails.h"
>
</File>
<File
@@ -1442,7 +1251,7 @@ >
</File>
<File
- RelativePath="PPageFileInfoSheet.h"
+ RelativePath=".\PPageFileInfoSheet.h"
>
</File>
<File
@@ -1450,7 +1259,7 @@ >
</File>
<File
- RelativePath="PPageFormats.h"
+ RelativePath=".\PPageFormats.h"
>
</File>
<File
@@ -1470,15 +1279,15 @@ >
</File>
<File
- RelativePath="PPagePlayback.h"
+ RelativePath=".\PPagePlayback.h"
>
</File>
<File
- RelativePath="PPagePlayer.h"
+ RelativePath=".\PPagePlayer.h"
>
</File>
<File
- RelativePath="PPageSheet.h"
+ RelativePath=".\PPageSheet.h"
>
</File>
<File
@@ -1486,11 +1295,11 @@ >
</File>
<File
- RelativePath="PPageSubStyle.h"
+ RelativePath=".\PPageSubStyle.h"
>
</File>
<File
- RelativePath="PPageSubtitles.h"
+ RelativePath=".\PPageSubtitles.h"
>
</File>
<File
@@ -1498,7 +1307,7 @@ >
</File>
<File
- RelativePath="PPageTweaks.h"
+ RelativePath=".\PPageTweaks.h"
>
</File>
<File
@@ -1506,14 +1315,6 @@ >
</File>
<File
- RelativePath=".\QT7AllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath=".\QT9AllocatorPresenter.h"
- >
- </File>
- <File
RelativePath="QuicktimeGraph.h"
>
<FileConfiguration
@@ -1534,35 +1335,27 @@ </FileConfiguration>
</File>
<File
- RelativePath="RealMediaGraph.h"
+ RelativePath=".\RealMediaGraph.h"
>
</File>
<File
- RelativePath="RealMediaWindowlessSite.h"
+ RelativePath=".\RealMediaWindowlessSite.h"
>
</File>
<File
- RelativePath="RegFilterChooserDlg.h"
+ RelativePath=".\RegFilterChooserDlg.h"
>
</File>
<File
- RelativePath=".\Resource.h"
+ RelativePath=".\resource.h"
>
</File>
<File
- RelativePath=".\RM7AllocatorPresenter.h"
+ RelativePath=".\SaveDlg.h"
>
</File>
<File
- RelativePath=".\RM9AllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath="SaveDlg.h"
- >
- </File>
- <File
- RelativePath="SaveTextFileDialog.h"
+ RelativePath=".\SaveTextFileDialog.h"
>
</File>
<File
@@ -1570,7 +1363,7 @@ >
</File>
<File
- RelativePath="SelectMediaType.h"
+ RelativePath=".\SelectMediaType.h"
>
</File>
<File
@@ -1590,19 +1383,19 @@ >
</File>
<File
- RelativePath="ShockwaveGraph.h"
+ RelativePath=".\ShockwaveGraph.h"
>
</File>
<File
- RelativePath="StaticLink.h"
+ RelativePath=".\StaticLink.h"
>
</File>
<File
- RelativePath="StatusLabel.h"
+ RelativePath=".\StatusLabel.h"
>
</File>
<File
- RelativePath=".\StdAfx.h"
+ RelativePath=".\stdafx.h"
>
</File>
<File
@@ -1614,15 +1407,7 @@ >
</File>
<File
- RelativePath=".\SyncAllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath=".\SyncRenderer.h"
- >
- </File>
- <File
- RelativePath="TextPassThruFilter.h"
+ RelativePath=".\TextPassThruFilter.h"
>
</File>
<File
@@ -1630,19 +1415,11 @@ >
</File>
<File
- RelativePath=".\VMR7AllocatorPresenter.h"
- >
- </File>
- <File
- RelativePath=".\VMR9AllocatorPresenter.h"
- >
- </File>
- <File
RelativePath=".\VMROSD.h"
>
</File>
<File
- RelativePath="VolumeCtrl.h"
+ RelativePath=".\VolumeCtrl.h"
>
</File>
<File
diff --git a/src/apps/mplayerc/stdafx.h b/src/apps/mplayerc/stdafx.h index 05798764a..350766bd7 100644 --- a/src/apps/mplayerc/stdafx.h +++ b/src/apps/mplayerc/stdafx.h @@ -63,6 +63,8 @@ #include <atlcoll.h>
#include <atlpath.h>
+#include "../../zlib/zlib.h"
+
#include <streams.h>
#include <dvdmedia.h>
#include <mpconfig.h>
|