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

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2017-03-06 10:50:50 +0300
committerKacper Michajłow <kasper93@gmail.com>2017-03-06 10:50:50 +0300
commitb989276ec26ede85b20ab469460882c850edcbcd (patch)
tree34ea494e14c919f8bca51b55c95c92303a147c89 /src/filters
parentd911f14d5619d800819d6f4658e72236720b79af (diff)
parentba2ea5d9e0cf5451398dfd438a0a962a0fe6fd74 (diff)
Merge branch 'release-1.7.11'1.7.11
Diffstat (limited to 'src/filters')
-rw-r--r--src/filters/FilterApp.cpp5
-rw-r--r--src/filters/Filters.vcxproj58
-rw-r--r--src/filters/Filters.vcxproj.filters2
-rw-r--r--src/filters/PinInfoWnd.cpp25
-rw-r--r--src/filters/PinInfoWnd.h7
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxer.cpp15
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj53
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj.filters2
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp5
-rw-r--r--src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp10
-rw-r--r--src/filters/muxer/BaseMuxer/BitStream.cpp2
-rw-r--r--src/filters/muxer/BaseMuxer/stdafx.h4
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.cpp4
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj136
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters2
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp13
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj136
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters2
-rw-r--r--src/filters/muxer/WavDest/WavDest.vcxproj133
-rw-r--r--src/filters/muxer/WavDest/WavDest.vcxproj.filters2
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp23
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.vcxproj53
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.vcxproj.filters2
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.cpp16
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.vcxproj136
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters2
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.cpp8
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj136
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters2
-rw-r--r--src/filters/reader/CDDAReader/CDDAReader.vcxproj138
-rw-r--r--src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters2
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.cpp4
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.vcxproj138
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters2
-rw-r--r--src/filters/reader/VTSReader/VTSReader.vcxproj136
-rw-r--r--src/filters/reader/VTSReader/VTSReader.vcxproj.filters2
-rw-r--r--src/filters/renderer/SyncClock/SyncClock.h4
-rw-r--r--src/filters/renderer/SyncClock/SyncClock.vcxproj53
-rw-r--r--src/filters/renderer/SyncClock/SyncClock.vcxproj.filters2
-rw-r--r--src/filters/renderer/VideoRenderers/AllocatorCommon.cpp3
-rw-r--r--src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp77
-rw-r--r--src/filters/renderer/VideoRenderers/AllocatorCommon7.h41
-rw-r--r--src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.cpp480
-rw-r--r--src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.h71
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp489
-rw-r--r--src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h5
-rw-r--r--src/filters/renderer/VideoRenderers/DX9RenderingEngine.h3
-rw-r--r--src/filters/renderer/VideoRenderers/DXRAllocatorPresenter.cpp3
-rw-r--r--src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp34
-rw-r--r--src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h1
-rw-r--r--src/filters/renderer/VideoRenderers/PixelShaderCache.cpp242
-rw-r--r--src/filters/renderer/VideoRenderers/PixelShaderCache.h67
-rw-r--r--src/filters/renderer/VideoRenderers/PixelShaderCompiler.cpp13
-rw-r--r--src/filters/renderer/VideoRenderers/PixelShaderCompiler.h6
-rw-r--r--src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.cpp161
-rw-r--r--src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.h57
-rw-r--r--src/filters/renderer/VideoRenderers/QT9AllocatorPresenter.cpp3
-rw-r--r--src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp265
-rw-r--r--src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.h68
-rw-r--r--src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp3
-rw-r--r--src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.h6
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.cpp26
-rw-r--r--src/filters/renderer/VideoRenderers/RenderersSettings.h14
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.cpp405
-rw-r--r--src/filters/renderer/VideoRenderers/SyncRenderer.h2
-rw-r--r--src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.cpp393
-rw-r--r--src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.h82
-rw-r--r--src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp13
-rw-r--r--src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj80
-rw-r--r--src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters38
-rw-r--r--src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp14
-rw-r--r--src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h22
-rw-r--r--src/filters/source/BaseSource/BaseSource.vcxproj53
-rw-r--r--src/filters/source/BaseSource/BaseSource.vcxproj.filters2
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.vcxproj138
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters2
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj138
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters2
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj135
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters2
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp4
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj53
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj.filters2
-rw-r--r--src/filters/transform/BufferFilter/BufferFilter.vcxproj135
-rw-r--r--src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters2
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.cpp5
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj135
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters2
-rw-r--r--src/filters/transform/VSFilter/Copy.cpp13
-rw-r--r--src/filters/transform/VSFilter/DirectVobSub.cpp8
-rw-r--r--src/filters/transform/VSFilter/DirectVobSub.h5
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubFilter.cpp25
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubPropPage.cpp2
-rw-r--r--src/filters/transform/VSFilter/VSFilter.cpp6
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj91
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj.filters2
-rw-r--r--src/filters/transform/VSFilter/installer/vsfilter_setup.iss8
-rw-r--r--src/filters/transform/VSFilter/plugins.cpp10
98 files changed, 1216 insertions, 4426 deletions
diff --git a/src/filters/FilterApp.cpp b/src/filters/FilterApp.cpp
index a9e882a3f..b7a2c899f 100644
--- a/src/filters/FilterApp.cpp
+++ b/src/filters/FilterApp.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,7 +21,6 @@
#include "stdafx.h"
#include "FilterApp.h"
-#include "../MathLibFix/MathLibFix.h"
extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
@@ -35,8 +34,6 @@ BOOL CFilterApp::InitInstance()
return FALSE;
}
- WorkAroundMathLibraryBug();
-
SetRegistryKey(_T("Gabest"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0);
diff --git a/src/filters/Filters.vcxproj b/src/filters/Filters.vcxproj
index 46093bfeb..44fa3c0e5 100644
--- a/src/filters/Filters.vcxproj
+++ b/src/filters/Filters.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -106,8 +61,9 @@
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\MathLibFix\MathLibFix.vcxproj">
- <Project>{fc9fc17f-70bf-4aca-8285-c24d1889bacb}</Project>
+ <ProjectReference Include="..\..\build\BuildConfig.vcxproj">
+ <Project>{981574ae-5a5e-4f27-bdf1-1b841e374cff}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\thirdparty\BaseClasses\BaseClasses.vcxproj">
<Project>{e8a3f6fa-ae1c-4c8e-a0b6-9c8480324eaa}</Project>
diff --git a/src/filters/Filters.vcxproj.filters b/src/filters/Filters.vcxproj.filters
index 07513538f..d5e04f352 100644
--- a/src/filters/Filters.vcxproj.filters
+++ b/src/filters/Filters.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{f8b5bbc2-2fe8-4b4f-bc46-236e4ad3d92d}</UniqueIdentifier>
diff --git a/src/filters/PinInfoWnd.cpp b/src/filters/PinInfoWnd.cpp
index 2ba426472..6e92daa78 100644
--- a/src/filters/PinInfoWnd.cpp
+++ b/src/filters/PinInfoWnd.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -22,6 +22,8 @@
#include "stdafx.h"
#include "PinInfoWnd.h"
#include "../DSUtil/DSUtil.h"
+#include "../mpc-hc/DpiHelper.h"
+#include "../DSUtil/MediaTypeEx.h"
//
// CPinInfoWnd
@@ -74,17 +76,23 @@ static LRESULT CALLBACK ControlProc(HWND control, UINT message, WPARAM wParam, L
bool CPinInfoWnd::OnActivate()
{
- DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
- CPoint p(10, 10);
+ m_dpi.Override(GetSafeHwnd());
- m_pin_static.Create(_T("Pin:"), dwStyle, CRect(p + CPoint(0, 3), CSize(30, m_fontheight)), this);
- m_pin_combo.Create(dwStyle | CBS_DROPDOWNLIST, CRect(p + CPoint(30, 0), CSize(450, 200)), this, IDC_PP_COMBO1);
+ DWORD dwStyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP;
+ CPoint p(m_dpi.ScaleX(10), m_dpi.ScaleY(10));
+
+ m_pin_static.Create(_T("Pin:"), dwStyle,
+ CRect(p + CPoint(m_dpi.ScaleX(0), m_dpi.ScaleY(3)), CSize(m_dpi.ScaleX(30), m_fontheight)),
+ this);
+ m_pin_combo.Create(dwStyle | CBS_DROPDOWNLIST,
+ CRect(p + CPoint(m_dpi.ScaleX(30), m_dpi.ScaleY(0)), CSize(m_dpi.ScaleX(520), m_dpi.ScaleY(200))),
+ this, IDC_PP_COMBO1);
BeginEnumPins(m_pBF, pEP, pPin) {
CPinInfo pi;
if (FAILED(pPin->QueryPinInfo(&pi))) {
continue;
}
- CString str = CString(pi.achName);
+ CString str(pi.achName);
if (!str.Find(_T("Apple"))) {
str.Delete(0, 1);
}
@@ -99,7 +107,7 @@ bool CPinInfoWnd::OnActivate()
EndEnumPins;
m_pin_combo.SetCurSel(0);
- p.y += m_fontheight + 20;
+ p.y += m_fontheight + m_dpi.ScaleY(20);
m_info_edit.CreateEx(WS_EX_CLIENTEDGE,
_T("EDIT"),
@@ -109,9 +117,8 @@ bool CPinInfoWnd::OnActivate()
WS_VSCROLL |
WS_HSCROLL |
ES_MULTILINE |
- ES_AUTOHSCROLL |
ES_READONLY,
- CRect(p, CSize(480, m_fontheight * 20)),
+ CRect(p, CSize(m_dpi.ScaleX(550), m_fontheight * 30)),
this,
IDC_PP_EDIT1);
m_info_edit.SetLimitText(60000);
diff --git a/src/filters/PinInfoWnd.h b/src/filters/PinInfoWnd.h
index 441d1764f..6fa7ef346 100644
--- a/src/filters/PinInfoWnd.h
+++ b/src/filters/PinInfoWnd.h
@@ -22,7 +22,8 @@
#pragma once
#include "InternalPropertyPage.h"
-#include <afxcmn.h>
+#include "../mpc-hc/DpiHelper.h"
+#include <atlcoll.h>
class __declspec(uuid("A1EB391C-6089-4A87-9988-BE50872317D4"))
CPinInfoWnd : public CInternalPropertyPageWnd
@@ -38,6 +39,8 @@ class __declspec(uuid("A1EB391C-6089-4A87-9988-BE50872317D4"))
CComboBox m_pin_combo;
CEdit m_info_edit;
+ DpiHelper m_dpi;
+
void AddLine(CString str);
public:
@@ -50,7 +53,7 @@ public:
bool OnApply();
static LPCTSTR GetWindowTitle() { return _T("Pin Info"); }
- static CSize GetWindowSize() { return CSize(500, 300); }
+ static CSize GetWindowSize() { return { 0, 0 }; }
DECLARE_MESSAGE_MAP()
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
index 33fc1662a..25368cbd0 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
+++ b/src/filters/muxer/BaseMuxer/BaseMuxer.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -114,6 +114,8 @@ HRESULT CBaseMuxerFilter::CreateRawOutput(CStringW name, CBaseMuxerRawOutputPin*
//
+#pragma warning(push)
+#pragma warning(disable: 4702)
DWORD CBaseMuxerFilter::ThreadProc()
{
SetThreadPriority(m_hThread, THREAD_PRIORITY_ABOVE_NORMAL);
@@ -158,7 +160,7 @@ DWORD CBaseMuxerFilter::ThreadProc()
continue;
}
- CAutoPtr<MuxerPacket> pPacket = GetPacket();
+ CAutoPtr<MuxerPacket> pPacket(GetPacket().Detach());
if (!pPacket) {
Sleep(1);
continue;
@@ -193,11 +195,8 @@ DWORD CBaseMuxerFilter::ThreadProc()
break;
}
}
-
- ASSERT(0); // this function should only return via CMD_EXIT
-
- CAMThread::m_hThread = nullptr;
- return 0;
+ UNREACHABLE_CODE(); // we should only exit via CMD_EXIT
+#pragma warning(pop)
}
void CBaseMuxerFilter::MuxHeaderInternal()
@@ -298,7 +297,7 @@ CAutoPtr<MuxerPacket> CBaseMuxerFilter::GetPacket()
CAutoPtr<MuxerPacket> pPacket;
if (pPinMin && i == 0) {
- pPacket = pPinMin->PopPacket();
+ pPacket.Attach(pPinMin->PopPacket().Detach());
} else {
pos = m_pActivePins.GetHeadPosition();
while (pos) {
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj b/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj
index f4542f274..0b774cefb 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj
+++ b/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup>
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj.filters b/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj.filters
index ef6d8c461..5b978fca9 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj.filters
+++ b/src/filters/muxer/BaseMuxer/BaseMuxer.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{b0dec0e2-a0fd-4979-b3c8-e2a8b7b8a7b9}</UniqueIdentifier>
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp
index 8cb244c52..a55ade0e7 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp
+++ b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -24,7 +24,6 @@
#include <MMReg.h>
#include "BaseMuxer.h"
#include "../../../DSUtil/DSUtil.h"
-#include <InitGuid.h>
#include "moreuuids.h"
#define MAXQUEUESIZE 100
@@ -95,7 +94,7 @@ CAutoPtr<MuxerPacket> CBaseMuxerInputPin::PopPacket()
CAutoLock cAutoLock(&m_csQueue);
if (m_queue.GetCount()) {
- pPacket = m_queue.RemoveHead();
+ pPacket.Attach(m_queue.RemoveHead().Detach());
}
if (m_queue.GetCount() < MAXQUEUESIZE) {
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp b/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
index e4408028c..283478d30 100644
--- a/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
+++ b/src/filters/muxer/BaseMuxer/BaseMuxerOutputPin.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013, 2015 see Authors.txt
+ * (C) 2006-2013, 2015-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -27,8 +27,8 @@
#include <aviriff.h>
#include <atlpath.h>
-#include <InitGuid.h>
#include "moreuuids.h"
+#include "../DSUtil/ISOLang.h"
//
// CBaseMuxerOutputPin
@@ -459,15 +459,15 @@ void CBaseMuxerRawOutputPin::MuxFooter(const CMediaType& mt)
fwrite(mt.Format() + si->dwOffset, mt.FormatLength() - si->dwOffset, 1, f);
- CString iso6391 = ISO6392To6391(si->IsoLang);
+ CString iso6391 = ISOLang::ISO6392To6391(si->IsoLang);
if (iso6391.IsEmpty()) {
iso6391 = _T("--");
}
- _ftprintf_s(f, _T("\nlangidx: 0\n\nid: %s, index: 0\n"), iso6391);
+ _ftprintf_s(f, _T("\nlangidx: 0\n\nid: %s, index: 0\n"), iso6391.GetString());
CString alt = CString(CStringW(si->TrackName));
if (!alt.IsEmpty()) {
- _ftprintf_s(f, _T("alt: %s\n"), alt);
+ _ftprintf_s(f, _T("alt: %s\n"), alt.GetString());
}
POSITION pos = m_idx.GetHeadPosition();
diff --git a/src/filters/muxer/BaseMuxer/BitStream.cpp b/src/filters/muxer/BaseMuxer/BitStream.cpp
index f1e6b8a04..c58c45d88 100644
--- a/src/filters/muxer/BaseMuxer/BitStream.cpp
+++ b/src/filters/muxer/BaseMuxer/BitStream.cpp
@@ -30,8 +30,8 @@ CBitStream::CBitStream(IStream* pStream, bool fThrowError)
: CUnknown(_T("CBitStream"), nullptr)
, m_pStream(pStream)
, m_fThrowError(fThrowError)
- , m_bitlen(0)
, m_bitbuff(0)
+ , m_bitlen(0)
{
ASSERT(m_pStream);
diff --git a/src/filters/muxer/BaseMuxer/stdafx.h b/src/filters/muxer/BaseMuxer/stdafx.h
index 32bc34c45..0ebf71a17 100644
--- a/src/filters/muxer/BaseMuxer/stdafx.h
+++ b/src/filters/muxer/BaseMuxer/stdafx.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -33,7 +33,5 @@
#include <atlbase.h>
#include <atlcoll.h>
-#include <dshow.h>
#include "BaseClasses/streams.h"
-#include <dvdmedia.h>
#include "../../../DSUtil/DSUtil.h"
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.cpp b/src/filters/muxer/DSMMuxer/DSMMuxer.cpp
index 192c8484c..265bdd9bf 100644
--- a/src/filters/muxer/DSMMuxer/DSMMuxer.cpp
+++ b/src/filters/muxer/DSMMuxer/DSMMuxer.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013, 2015 see Authors.txt
+ * (C) 2006-2013, 2015-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -182,7 +182,7 @@ void CDSMMuxerFilter::MuxInit()
void CDSMMuxerFilter::MuxHeader(IBitStream* pBS)
{
CString muxer;
- muxer.Format(_T("DSM Muxer (%s)"), CString(__TIMESTAMP__));
+ muxer.Format(_T("DSM Muxer (%S)"), __TIMESTAMP__);
SetProperty(L"MUXR", CStringW(muxer));
SetProperty(L"DATE", CStringW(CTime::GetCurrentTime().FormatGmt(_T("%Y-%m-%d %H:%M:%S"))));
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
index d4c002c5c..3f17d32a7 100644
--- a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
+++ b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,152 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>DSMMuxer.def</ModuleDefinitionFile>
@@ -208,13 +92,13 @@
<ItemGroup>
<ClInclude Include="DSMMuxer.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DSMMuxer.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
index db6d2a69b..23b96ae45 100644
--- a/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
+++ b/src/filters/muxer/DSMMuxer/DSMMuxer.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{f2a0afa9-5123-40d6-9344-b1620d9ab714}</UniqueIdentifier>
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
index c9c2de091..1d2946f62 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -359,6 +359,8 @@ ULONGLONG SetStreamPosition(IStream* pStream, ULONGLONG seekpos)
return posnew.QuadPart;
}
+#pragma warning(push)
+#pragma warning(disable: 4702)
DWORD CMatroskaMuxerFilter::ThreadProc()
{
CComQIPtr<IStream> pStream;
@@ -573,7 +575,7 @@ DWORD CMatroskaMuxerFilter::ThreadProc()
{
CAutoLock cAutoLock(&pPin->m_csQueue);
- b = pPin->m_blocks.RemoveHead();
+ b.Attach(pPin->m_blocks.RemoveHead().Detach());
}
if (b) {
@@ -704,11 +706,8 @@ DWORD CMatroskaMuxerFilter::ThreadProc()
break;
}
}
-
- ASSERT(0); // we should only exit via CMD_EXIT
-
- CAMThread::m_hThread = nullptr;
- return 0;
+ UNREACHABLE_CODE(); // we should only exit via CMD_EXIT
+#pragma warning(pop)
}
//
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
index 088585918..0bf089772 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,152 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>MatroskaMuxer.def</ModuleDefinitionFile>
@@ -210,13 +94,13 @@
<ClInclude Include="MatroskaFile.h" />
<ClInclude Include="MatroskaMuxer.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MatroskaMuxer.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
index d653d4775..3b9080e48 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{5ba8ecdf-2b3a-4c43-8d71-30a1bbc63dbb}</UniqueIdentifier>
diff --git a/src/filters/muxer/WavDest/WavDest.vcxproj b/src/filters/muxer/WavDest/WavDest.vcxproj
index 9665b74b7..7552a4fb8 100644
--- a/src/filters/muxer/WavDest/WavDest.vcxproj
+++ b/src/filters/muxer/WavDest/WavDest.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,149 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<ModuleDefinitionFile>WavDest.def</ModuleDefinitionFile>
</Link>
@@ -203,14 +90,14 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="WavDest.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="WavDest.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/muxer/WavDest/WavDest.vcxproj.filters b/src/filters/muxer/WavDest/WavDest.vcxproj.filters
index 18dd873b1..d6dec7162 100644
--- a/src/filters/muxer/WavDest/WavDest.vcxproj.filters
+++ b/src/filters/muxer/WavDest/WavDest.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4e8bc353-99a5-4a8a-8345-30fa00f8868c}</UniqueIdentifier>
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index 2e29e37c1..d80ed7061 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,7 +21,6 @@
#include "stdafx.h"
#include "../../../DSUtil/DSUtil.h"
-#include <InitGuid.h>
#include "moreuuids.h"
#include "../../switcher/AudioSwitcher/AudioSwitcher.h"
#include "BaseSplitter.h"
@@ -65,7 +64,7 @@ CAutoPtr<Packet> CPacketQueue::Remove()
{
CAutoLock cAutoLock(this);
ASSERT(__super::GetCount() > 0);
- CAutoPtr<Packet> p = RemoveHead();
+ CAutoPtr<Packet> p(RemoveHead().Detach());
if (p) {
m_size -= p->GetDataSize();
}
@@ -388,7 +387,8 @@ int CBaseSplitterOutputPin::QueueSize()
HRESULT CBaseSplitterOutputPin::QueueEndOfStream()
{
- return QueuePacket(CAutoPtr<Packet>()); // NULL means EndOfStream
+ CAutoPtr<Packet> p;
+ return QueuePacket(p); // NULL means EndOfStream
}
HRESULT CBaseSplitterOutputPin::QueuePacket(CAutoPtr<Packet> p)
@@ -480,7 +480,7 @@ DWORD CBaseSplitterOutputPin::ThreadProc()
{
CAutoLock cAutoLock(&m_queue);
if ((cnt = m_queue.GetCount()) > 0) {
- p = m_queue.Remove();
+ p.Attach(m_queue.Remove().Detach());
}
}
@@ -905,7 +905,7 @@ HRESULT CBaseSplitterFilter::DeleteOutputs()
}
while (m_pOutputs.GetCount()) {
- CAutoPtr<CBaseSplitterOutputPin> pPin = m_pOutputs.RemoveHead();
+ CAutoPtr<CBaseSplitterOutputPin> pPin(m_pOutputs.RemoveHead().Detach());
if (IPin* pPinTo = pPin->GetConnected()) {
pPinTo->Disconnect();
}
@@ -950,6 +950,8 @@ void CBaseSplitterFilter::DeliverEndFlush()
m_eEndFlush.Set();
}
+#pragma warning(push)
+#pragma warning(disable: 4702)
DWORD CBaseSplitterFilter::ThreadProc()
{
if (m_pSyncReader) {
@@ -1012,11 +1014,8 @@ DWORD CBaseSplitterFilter::ThreadProc()
m_pActivePins.GetNext(pos)->QueueEndOfStream();
}
}
-
- ASSERT(0); // we should only exit via CMD_EXIT
-
- m_hThread = nullptr;
- return 0;
+ UNREACHABLE_CODE(); // we should only exit via CMD_EXIT
+#pragma warning(pop)
}
HRESULT CBaseSplitterFilter::DeliverPacket(CAutoPtr<Packet> p)
@@ -1254,7 +1253,7 @@ STDMETHODIMP CBaseSplitterFilter::Load(LPCOLESTR pszFileName, const AM_MEDIA_TYP
if (FAILED(hr)
|| FAILED(hr = DeleteOutputs())
|| FAILED(hr = CreateOutputs(pAsyncReader))) {
- m_fn = "";
+ m_fn.Empty();
return hr;
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj b/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj
index 6379507e8..ababd13b4 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj.filters b/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj.filters
index d218a4b82..0d75cd1e5 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj.filters
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{b95be5c7-0978-4aad-b33b-140fbdb42012}</UniqueIdentifier>
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.cpp b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
index 8bf7f9363..b799c99bd 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.cpp
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -20,13 +20,14 @@
*/
#include "stdafx.h"
-#include "DSMSplitter.h"
#include "../../../DSUtil/DSUtil.h"
+#include "../../../DSUtil/ISOLang.h"
#ifdef STANDALONE_FILTER
#include <InitGuid.h>
#endif
#include "moreuuids.h"
+#include "DSMSplitter.h"
#ifdef STANDALONE_FILTER
@@ -170,9 +171,12 @@ HRESULT CDSMSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
if (key == "NAME") {
name = value;
}
- if (key == "LANG") if ((lang = ISO6392ToLanguage(CStringA(CString(value)))).IsEmpty()) {
+ if (key == "LANG") {
+ lang = ISOLang::ISO6392ToLanguage(CStringA(value));
+ if (lang.IsEmpty()) {
lang = value;
}
+ }
}
if (!name.IsEmpty() || !lang.IsEmpty()) {
@@ -199,9 +203,9 @@ HRESULT CDSMSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
for (size_t i = 0; i < m_resources.GetCount(); i++) {
const CDSMResource& r = m_resources[i];
- if (r.mime == "application/x-truetype-font" ||
- r.mime == "application/x-font-ttf" ||
- r.mime == "application/vnd.ms-opentype") {
+ if (r.mime == L"application/x-truetype-font" ||
+ r.mime == L"application/x-font-ttf" ||
+ r.mime == L"application/vnd.ms-opentype") {
//m_fontinst.InstallFont(r.data);
m_fontinst.InstallFontMemory(r.data.GetData(), (UINT)r.data.GetCount());
}
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
index d2c52d254..baefd385d 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,152 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>DSMSplitter.def</ModuleDefinitionFile>
@@ -210,13 +94,13 @@
<ClInclude Include="DSMSplitter.h" />
<ClInclude Include="DSMSplitterFile.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DSMSplitter.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
index 8b14f9ef1..83f06422a 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{a337cc5d-54f7-4fa2-9559-6c88116d892c}</UniqueIdentifier>
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp b/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp
index efd02df97..3d4e7ba7f 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013, 2015 see Authors.txt
+ * (C) 2006-2013, 2015-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -105,6 +105,8 @@ STDMETHODIMP CStreamDriveThruFilter::NonDelegatingQueryInterface(REFIID riid, vo
#define PACKETSIZE 65536
+#pragma warning(push)
+#pragma warning(disable: 4702)
DWORD CStreamDriveThruFilter::ThreadProc()
{
for (;;) {
@@ -200,8 +202,8 @@ DWORD CStreamDriveThruFilter::ThreadProc()
break;
}
}
-
- return 0;
+ UNREACHABLE_CODE(); // we should only exit via CMD_EXIT
+#pragma warning(pop)
}
int CStreamDriveThruFilter::GetPinCount()
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
index 86021d9e3..319a169a2 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,152 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>StreamDriveThru.def</ModuleDefinitionFile>
@@ -207,14 +91,14 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="StreamDriveThru.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="StreamDriveThru.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
index a2d187b96..173cd5f6f 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{28a35247-c38a-473b-8877-78de4c5a56e6}</UniqueIdentifier>
diff --git a/src/filters/reader/CDDAReader/CDDAReader.vcxproj b/src/filters/reader/CDDAReader/CDDAReader.vcxproj
index 99c42cf64..d8a4dbe97 100644
--- a/src/filters/reader/CDDAReader/CDDAReader.vcxproj
+++ b/src/filters/reader/CDDAReader/CDDAReader.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,128 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>CDDAReader.def</ModuleDefinitionFile>
@@ -172,30 +80,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CDDAReader.cpp" />
<ClCompile Include="stdafx.cpp">
@@ -208,13 +92,13 @@
<ItemGroup>
<ClInclude Include="CDDAReader.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="CDDAReader.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters b/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
index d7904b8ac..0df042c20 100644
--- a/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
+++ b/src/filters/reader/CDDAReader/CDDAReader.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{3251baa6-81ad-4ee0-a183-a0ace02fd96c}</UniqueIdentifier>
diff --git a/src/filters/reader/CDXAReader/CDXAReader.cpp b/src/filters/reader/CDXAReader/CDXAReader.cpp
index 9d111ab9c..8eee77f33 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.cpp
+++ b/src/filters/reader/CDXAReader/CDXAReader.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -481,7 +481,7 @@ bool CCDXAStream::LookForMediaSubType()
}
CString p = pattern;
- p += ',';
+ p += _T(',');
__int64 offset = 0;
DWORD cb = 0;
diff --git a/src/filters/reader/CDXAReader/CDXAReader.vcxproj b/src/filters/reader/CDXAReader/CDXAReader.vcxproj
index af0da882b..c593478c4 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.vcxproj
+++ b/src/filters/reader/CDXAReader/CDXAReader.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,128 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>CDXAReader.def</ModuleDefinitionFile>
@@ -172,30 +80,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CDXAReader.cpp" />
<ClCompile Include="stdafx.cpp">
@@ -208,13 +92,13 @@
<ItemGroup>
<ClInclude Include="CDXAReader.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="CDXAReader.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters b/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
index 3c9763333..47d4a3b50 100644
--- a/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
+++ b/src/filters/reader/CDXAReader/CDXAReader.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{bee90cb9-7ace-4e7d-b77a-1b4d710b5a25}</UniqueIdentifier>
diff --git a/src/filters/reader/VTSReader/VTSReader.vcxproj b/src/filters/reader/VTSReader/VTSReader.vcxproj
index d67e4185d..9f960ef2c 100644
--- a/src/filters/reader/VTSReader/VTSReader.vcxproj
+++ b/src/filters/reader/VTSReader/VTSReader.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,152 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>VTSReader.def</ModuleDefinitionFile>
@@ -207,14 +91,14 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="VTSReader.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VTSReader.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/reader/VTSReader/VTSReader.vcxproj.filters b/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
index f9804422c..1f898d5d8 100644
--- a/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
+++ b/src/filters/reader/VTSReader/VTSReader.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{6f84c2e5-5b7f-4a7e-8f4b-1f45a45a3078}</UniqueIdentifier>
diff --git a/src/filters/renderer/SyncClock/SyncClock.h b/src/filters/renderer/SyncClock/SyncClock.h
index f7edc1943..40be493e9 100644
--- a/src/filters/renderer/SyncClock/SyncClock.h
+++ b/src/filters/renderer/SyncClock/SyncClock.h
@@ -1,5 +1,5 @@
/*
- * (C) 2010-2013 see Authors.txt
+ * (C) 2010-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -20,8 +20,6 @@
#pragma once
-#include <atlbase.h>
-#include <atlutil.h>
#include "Interfaces.h"
class CSyncClockFilter;
diff --git a/src/filters/renderer/SyncClock/SyncClock.vcxproj b/src/filters/renderer/SyncClock/SyncClock.vcxproj
index 131e1b69e..2d0e93dd6 100644
--- a/src/filters/renderer/SyncClock/SyncClock.vcxproj
+++ b/src/filters/renderer/SyncClock/SyncClock.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/renderer/SyncClock/SyncClock.vcxproj.filters b/src/filters/renderer/SyncClock/SyncClock.vcxproj.filters
index 0964ef976..0703860a3 100644
--- a/src/filters/renderer/SyncClock/SyncClock.vcxproj.filters
+++ b/src/filters/renderer/SyncClock/SyncClock.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
diff --git a/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp b/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
index 96962ece3..dd37cfbd2 100644
--- a/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
+++ b/src/filters/renderer/VideoRenderers/AllocatorCommon.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -19,7 +19,6 @@
*/
#include "stdafx.h"
-#include <InitGuid.h>
#include "AllocatorCommon.h"
#include "../DSUtil/DSUtil.h"
diff --git a/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp b/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp
deleted file mode 100644
index 9853d6170..000000000
--- a/src/filters/renderer/VideoRenderers/AllocatorCommon7.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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 <InitGuid.h>
-#include "AllocatorCommon7.h"
-#include "../DSUtil/DSUtil.h"
-
-#include "DX7AllocatorPresenter.h"
-#include "VMR7AllocatorPresenter.h"
-#include "RM7AllocatorPresenter.h"
-#include "QT7AllocatorPresenter.h"
-
-
-bool IsVMR7InGraph(IFilterGraph* pFG)
-{
- BeginEnumFilters(pFG, pEF, pBF);
- if (CComQIPtr<IVMRWindowlessControl>(pBF)) {
- return true;
- }
- EndEnumFilters;
- return false;
-}
-
-using namespace DSObjects;
-
-//
-
-HRESULT CreateAP7(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP)
-{
- CheckPointer(ppAP, E_POINTER);
-
- *ppAP = nullptr;
-
- HRESULT hr = S_OK;
-
- if (IsEqualCLSID(clsid, CLSID_VMR7AllocatorPresenter)) {
- *ppAP = DEBUG_NEW CVMR7AllocatorPresenter(hWnd, hr);
- } else if (IsEqualCLSID(clsid, CLSID_RM7AllocatorPresenter)) {
- *ppAP = DEBUG_NEW CRM7AllocatorPresenter(hWnd, hr);
- } else if (IsEqualCLSID(clsid, CLSID_QT7AllocatorPresenter)) {
- *ppAP = DEBUG_NEW CQT7AllocatorPresenter(hWnd, hr);
- } else {
- return E_FAIL;
- }
-
- if (*ppAP == nullptr) {
- return E_OUTOFMEMORY;
- }
-
- (*ppAP)->AddRef();
-
- if (FAILED(hr)) {
- (*ppAP)->Release();
- *ppAP = nullptr;
- }
-
- return hr;
-}
diff --git a/src/filters/renderer/VideoRenderers/AllocatorCommon7.h b/src/filters/renderer/VideoRenderers/AllocatorCommon7.h
deleted file mode 100644
index 49e9311f2..000000000
--- a/src/filters/renderer/VideoRenderers/AllocatorCommon7.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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
-
-#include "../../../SubPic/ISubPic.h"
-
-
-// {495CF191-810D-44c7-92C5-E7D46AE00F44}
-DEFINE_GUID(CLSID_VMR7AllocatorPresenter,
- 0x495cf191, 0x810d, 0x44c7, 0x92, 0xc5, 0xe7, 0xd4, 0x6a, 0xe0, 0xf, 0x44);
-
-// {97B3462E-1752-4dfb-A038-271060BC7A94}
-DEFINE_GUID(CLSID_RM7AllocatorPresenter,
- 0x97b3462e, 0x1752, 0x4dfb, 0xa0, 0x38, 0x27, 0x10, 0x60, 0xbc, 0x7a, 0x94);
-
-// {36CC5A71-441C-462a-9D10-48A19485938D}
-DEFINE_GUID(CLSID_QT7AllocatorPresenter,
- 0x36cc5a71, 0x441c, 0x462a, 0x9d, 0x10, 0x48, 0xa1, 0x94, 0x85, 0x93, 0x8d);
-
-extern HRESULT CreateAP7(const CLSID& clsid, HWND hWnd, ISubPicAllocatorPresenter** ppAP);
-
-extern bool IsVMR7InGraph(IFilterGraph* pFG);
diff --git a/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.cpp
deleted file mode 100644
index f13c1a472..000000000
--- a/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.cpp
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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 "DX7AllocatorPresenter.h"
-#include "../../../SubPic/DX7SubPic.h"
-#include "../../../SubPic/SubPicQueueImpl.h"
-
-using namespace DSObjects;
-
-//
-
-static HRESULT TextureBlt(IDirect3DDevice7* pD3DDev, IDirectDrawSurface7* pTexture, const Vector dst[4], const CRect& src)
-{
- CheckPointer(pTexture, E_POINTER);
-
- ASSERT(pD3DDev);
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- if (FAILED(pTexture->GetSurfaceDesc(&ddsd))) {
- return E_FAIL;
- }
-
- float w = (float)ddsd.dwWidth;
- float h = (float)ddsd.dwHeight;
-
- // Be careful with the code that follows. Some compilers (e.g. Visual Studio 2012) used to miscompile
- // it in some cases (namely x64 with optimizations /O2 /Ot). This bug led pVertices not to be correctly
- // initialized and thus the subtitles weren't shown.
- struct {
- float x, y, z, rhw;
- float tu, tv;
- } pVertices[] = {
- {(float)dst[0].x, (float)dst[0].y, (float)dst[0].z, 1.0f / (float)dst[0].z, (float)src.left / w, (float)src.top / h},
- {(float)dst[1].x, (float)dst[1].y, (float)dst[1].z, 1.0f / (float)dst[1].z, (float)src.right / w, (float)src.top / h},
- {(float)dst[2].x, (float)dst[2].y, (float)dst[2].z, 1.0f / (float)dst[2].z, (float)src.left / w, (float)src.bottom / h},
- {(float)dst[3].x, (float)dst[3].y, (float)dst[3].z, 1.0f / (float)dst[3].z, (float)src.right / w, (float)src.bottom / h},
- };
-
- for (size_t i = 0; i < _countof(pVertices); i++) {
- pVertices[i].x -= 0.5f;
- pVertices[i].y -= 0.5f;
- }
-
- pD3DDev->SetTexture(0, pTexture);
-
- pD3DDev->SetRenderState(D3DRENDERSTATE_CULLMODE, D3DCULL_NONE);
- pD3DDev->SetRenderState(D3DRENDERSTATE_LIGHTING, FALSE);
- pD3DDev->SetRenderState(D3DRENDERSTATE_BLENDENABLE, FALSE);
- pD3DDev->SetRenderState(D3DRENDERSTATE_ALPHATESTENABLE, FALSE);
-
- pD3DDev->SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR);
- pD3DDev->SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFN_LINEAR);
- pD3DDev->SetTextureStageState(0, D3DTSS_MIPFILTER, D3DTFP_LINEAR);
-
- pD3DDev->SetTextureStageState(0, D3DTSS_ADDRESS, D3DTADDRESS_CLAMP);
-
- //
-
- if (FAILED(pD3DDev->BeginScene())) {
- return E_FAIL;
- }
-
- pD3DDev->DrawPrimitive(D3DPT_TRIANGLESTRIP,
- D3DFVF_XYZRHW | D3DFVF_TEX1,
- pVertices, 4, D3DDP_WAIT);
- pD3DDev->EndScene();
-
- //
-
- pD3DDev->SetTexture(0, nullptr);
-
- return S_OK;
-}
-
-//
-// CDX7AllocatorPresenter
-//
-
-typedef HRESULT(WINAPI* DirectDrawCreateExPtr)(GUID FAR* lpGuid, LPVOID* lplpDD, REFIID iid, IUnknown FAR* pUnkOuter);
-
-
-CDX7AllocatorPresenter::CDX7AllocatorPresenter(HWND hWnd, HRESULT& hr)
- : CSubPicAllocatorPresenterImpl(hWnd, hr, nullptr)
- , m_ScreenSize(0, 0)
- , m_hDDrawLib(nullptr)
- , m_bIsRendering(false)
-{
- if (FAILED(hr)) {
- return;
- }
-
- DirectDrawCreateExPtr pDirectDrawCreateEx = nullptr;
-
- m_hDDrawLib = LoadLibrary(_T("ddraw.dll"));
- if (m_hDDrawLib) {
- pDirectDrawCreateEx = (DirectDrawCreateExPtr)GetProcAddress(m_hDDrawLib, "DirectDrawCreateEx");
- }
- if (pDirectDrawCreateEx == nullptr) {
- hr = E_FAIL;
- return;
- }
-
- if (FAILED(hr = pDirectDrawCreateEx(nullptr, (void**)&m_pDD, IID_IDirectDraw7, nullptr))
- || FAILED(hr = m_pDD->SetCooperativeLevel(AfxGetMainWnd()->GetSafeHwnd(), DDSCL_NORMAL))) {
- return;
- }
-
- if (!(m_pD3D = m_pDD)) {
- hr = E_NOINTERFACE;
- return;
- }
-
- hr = CreateDevice();
- if (FAILED(hr)) {
- TRACE(_T("CreateDevice failed: 0x%08x\n"), (LONG)hr);
- }
-}
-
-CDX7AllocatorPresenter::~CDX7AllocatorPresenter()
-{
- // Release the interfaces before releasing the library
- m_pPrimary = nullptr;
- m_pBackBuffer = nullptr;
- m_pVideoTexture = nullptr;
- m_pVideoSurface = nullptr;
- m_pD3DDev = nullptr;
- m_pD3D.Release();
- m_pDD = nullptr;
- if (m_hDDrawLib) {
- FreeLibrary(m_hDDrawLib);
- }
-}
-
-HRESULT CDX7AllocatorPresenter::CreateDevice()
-{
- const CRenderersSettings& r = GetRenderersSettings();
-
- m_pD3DDev = nullptr;
- m_pPrimary = nullptr;
- m_pBackBuffer = nullptr;
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- if (FAILED(m_pDD->GetDisplayMode(&ddsd)) ||
- ddsd.ddpfPixelFormat.dwRGBBitCount <= 8) {
- return DDERR_INVALIDMODE;
- }
- m_refreshRate = ddsd.dwRefreshRate;
- m_ScreenSize.SetSize(ddsd.dwWidth, ddsd.dwHeight);
- CSize szDesktopSize(GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));
-
- HRESULT hr;
-
- // m_pPrimary
-
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS;
- ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
- if (FAILED(hr = m_pDD->CreateSurface(&ddsd, &m_pPrimary, nullptr))) {
- return hr;
- }
-
- CComPtr<IDirectDrawClipper> pcClipper;
- if (FAILED(hr = m_pDD->CreateClipper(0, &pcClipper, nullptr))) {
- return hr;
- }
- pcClipper->SetHWnd(0, m_hWnd);
- m_pPrimary->SetClipper(pcClipper);
-
- // m_pBackBuffer
-
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
- ddsd.ddsCaps.dwCaps = /*DDSCAPS_OFFSCREENPLAIN |*/ DDSCAPS_VIDEOMEMORY | DDSCAPS_3DDEVICE;
- ddsd.dwWidth = szDesktopSize.cx;
- ddsd.dwHeight = szDesktopSize.cy;
- if (FAILED(hr = m_pDD->CreateSurface(&ddsd, &m_pBackBuffer, nullptr))) {
- return hr;
- }
-
- pcClipper = nullptr;
- if (FAILED(hr = m_pDD->CreateClipper(0, &pcClipper, nullptr))) {
- return hr;
- }
- BYTE rgnDataBuffer[1024];
- HRGN hrgn = CreateRectRgn(0, 0, ddsd.dwWidth, ddsd.dwHeight);
- GetRegionData(hrgn, sizeof(rgnDataBuffer), (RGNDATA*)rgnDataBuffer);
- DeleteObject(hrgn);
- pcClipper->SetClipList((RGNDATA*)rgnDataBuffer, 0);
- m_pBackBuffer->SetClipper(pcClipper);
-
- // m_pD3DDev
-
- if (FAILED(hr = m_pD3D->CreateDevice(IID_IDirect3DHALDevice, m_pBackBuffer, &m_pD3DDev))) { // this seems to fail if the desktop size is too large (width or height >2048)
- return hr;
- }
-
- //
-
- CComPtr<ISubPicProvider> pSubPicProvider;
- if (m_pSubPicQueue) {
- m_pSubPicQueue->GetSubPicProvider(&pSubPicProvider);
- }
-
- InitMaxSubtitleTextureSize(r.subPicQueueSettings.nMaxRes, szDesktopSize);
-
- if (m_pAllocator) {
- m_pAllocator->ChangeDevice(m_pD3DDev);
- } else {
- m_pAllocator = DEBUG_NEW CDX7SubPicAllocator(m_pD3DDev, m_maxSubtitleTextureSize);
- }
-
- hr = S_OK;
- if (!m_pSubPicQueue) {
- CAutoLock(this);
- m_pSubPicQueue = r.subPicQueueSettings.nSize > 0
- ? (ISubPicQueue*)DEBUG_NEW CSubPicQueue(r.subPicQueueSettings, m_pAllocator, &hr)
- : (ISubPicQueue*)DEBUG_NEW CSubPicQueueNoThread(r.subPicQueueSettings, m_pAllocator, &hr);
- } else {
- m_pSubPicQueue->Invalidate();
- }
-
- if (SUCCEEDED(hr) && pSubPicProvider) {
- m_pSubPicQueue->SetSubPicProvider(pSubPicProvider);
- }
-
- return hr;
-}
-
-HRESULT CDX7AllocatorPresenter::AllocSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- CheckPointer(m_pDD, E_POINTER);
-
- const CRenderersSettings& r = GetRenderersSettings();
-
- m_pVideoTexture = nullptr;
- m_pVideoSurface = nullptr;
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
- ddsd.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY;
- ddsd.dwWidth = m_nativeVideoSize.cx;
- ddsd.dwHeight = m_nativeVideoSize.cy;
- ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
- ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
- ddsd.ddpfPixelFormat.dwRGBBitCount = 32;
- ddsd.ddpfPixelFormat.dwRBitMask = 0x00FF0000;
- ddsd.ddpfPixelFormat.dwGBitMask = 0x0000FF00;
- ddsd.ddpfPixelFormat.dwBBitMask = 0x000000FF;
-
- if (r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE2D || r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) {
- ddsd.ddsCaps.dwCaps |= DDSCAPS_TEXTURE;
- //ddsd.ddpfPixelFormat.dwFlags |= DDPF_ALPHAPIXELS;
- //ddsd.ddpfPixelFormat.dwRGBAlphaBitMask = 0xFF000000;
- }
-
- HRESULT hr = m_pDD->CreateSurface(&ddsd, &m_pVideoSurface, nullptr);
- if (FAILED(hr)) {
- // FIXME: eh, dx9 has no problem creating a 32bpp surface under a 16bpp desktop, but dx7 fails here (textures are ok)
- DDSURFACEDESC2 ddsd2;
- INITDDSTRUCT(ddsd2);
- if (!(r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE2D || r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D)
- && SUCCEEDED(m_pDD->GetDisplayMode(&ddsd2))
- && ddsd2.ddpfPixelFormat.dwRGBBitCount == 16) {
- ddsd.ddpfPixelFormat.dwRGBBitCount = 16;
- ddsd.ddpfPixelFormat.dwRBitMask = 0x0000F800;
- ddsd.ddpfPixelFormat.dwGBitMask = 0x000007E0;
- ddsd.ddpfPixelFormat.dwBBitMask = 0x0000001F;
- hr = m_pDD->CreateSurface(&ddsd, &m_pVideoSurface, nullptr);
- }
-
- if (FAILED(hr)) {
- return hr;
- }
- }
-
- if (r.iAPSurfaceUsage == VIDRNDT_AP_TEXTURE3D) {
- m_pVideoTexture = m_pVideoSurface;
- }
-
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurface->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- return S_OK;
-}
-
-void CDX7AllocatorPresenter::DeleteSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- m_pVideoTexture = nullptr;
- m_pVideoSurface = nullptr;
-}
-
-// ISubPicAllocatorPresenter
-
-STDMETHODIMP CDX7AllocatorPresenter::CreateRenderer(IUnknown** ppRenderer)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP_(bool) CDX7AllocatorPresenter::Paint(bool bAll)
-{
- if (m_bPendingResetDevice) {
- SendResetRequest();
- return false;
- }
-
- CAutoLock cAutoLock(this);
-
- if (m_windowRect.right <= m_windowRect.left || m_windowRect.bottom <= m_windowRect.top
- || m_nativeVideoSize.cx <= 0 || m_nativeVideoSize.cy <= 0
- || !m_pPrimary || !m_pBackBuffer || !m_pVideoSurface) {
- return false;
- }
-
- HRESULT hr;
-
- CRect rSrcVid(CPoint(0, 0), m_nativeVideoSize);
- CRect rDstVid(m_videoRect);
-
- CRect rSrcPri(CPoint(0, 0), m_windowRect.Size());
- CRect rDstPri(m_windowRect);
-
- // clear the backbuffer
- CRect rl(0, 0, rDstVid.left, rSrcPri.bottom);
- CRect rr(rDstVid.right, 0, rSrcPri.right, rSrcPri.bottom);
- CRect rt(0, 0, rSrcPri.right, rDstVid.top);
- CRect rb(0, rDstVid.bottom, rSrcPri.right, rSrcPri.bottom);
-
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- hr = m_pBackBuffer->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- // paint the video on the backbuffer
- if (!rDstVid.IsRectEmpty()) {
- if (m_pVideoTexture) {
- Vector v[4];
- Transform(rDstVid, v);
- hr = TextureBlt(m_pD3DDev, m_pVideoTexture, v, rSrcVid);
- } else {
- hr = m_pBackBuffer->Blt(rDstVid, m_pVideoSurface, rSrcVid, DDBLT_WAIT, nullptr);
- }
- }
-
- // paint the text on the backbuffer
- AlphaBltSubPic(rDstPri, rDstVid);
-
- // wait vsync
- if (bAll) {
- m_pDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN, nullptr);
- }
-
- // blt to the primary surface
- MapWindowRect(m_hWnd, HWND_DESKTOP, &rDstPri);
- hr = m_pPrimary->Blt(rDstPri, m_pBackBuffer, rSrcPri, DDBLT_WAIT, nullptr);
-
- if (hr == DDERR_SURFACELOST) {
- m_bPendingResetDevice = true;
- SendResetRequest();
- return false;
- }
-
- return true;
-}
-
-void CDX7AllocatorPresenter::SendResetRequest()
-{
- if (!m_bDeviceResetRequested) {
- m_bDeviceResetRequested = true;
- AfxGetApp()->m_pMainWnd->PostMessage(WM_RESET_DEVICE);
- }
-}
-
-STDMETHODIMP_(bool) CDX7AllocatorPresenter::ResetDevice()
-{
- HRESULT hr;
- DeleteSurfaces();
- if (FAILED(hr = CreateDevice()) || FAILED(hr = AllocSurfaces())) {
- //DDERR_UNSUPPORTEDMODE - 0x8876024e
- TRACE(_T("ResetDevice failed: 0x%08x\n"), (LONG)hr);
- m_bDeviceResetRequested = false;
- return false;
- }
- TRACE(_T("ResetDevice\n"));
- m_bPendingResetDevice = false;
- m_bDeviceResetRequested = false;
- return true;
-}
-
-STDMETHODIMP_(bool) CDX7AllocatorPresenter::DisplayChange()
-{
- return true;
-}
-
-STDMETHODIMP CDX7AllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
-{
- CheckPointer(size, E_POINTER);
-
- // Keep a reference so that we can safely work on the surface
- // without having to lock everything
- CComPtr<IDirectDrawSurface7> pVideoSurface;
- {
- CAutoLock cAutoLock(this);
- CheckPointer(m_pVideoSurface, E_FAIL);
- pVideoSurface = m_pVideoSurface;
- }
-
- HRESULT hr;
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- if (FAILED(pVideoSurface->GetSurfaceDesc(&ddsd))) {
- return E_FAIL;
- }
-
- if (ddsd.ddpfPixelFormat.dwRGBBitCount != 16 && ddsd.ddpfPixelFormat.dwRGBBitCount != 32) {
- return E_FAIL;
- }
-
- DWORD required = sizeof(BITMAPINFOHEADER) + (ddsd.dwWidth * ddsd.dwHeight * 32 >> 3);
- if (!lpDib) {
- *size = required;
- return S_OK;
- }
- if (*size < required) {
- return E_OUTOFMEMORY;
- }
- *size = required;
-
- INITDDSTRUCT(ddsd);
- if (FAILED(hr = pVideoSurface->Lock(nullptr, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_READONLY | DDLOCK_NOSYSLOCK, nullptr))) {
- return hr;
- }
-
- BITMAPINFOHEADER* bih = (BITMAPINFOHEADER*)lpDib;
- ZeroMemory(bih, sizeof(BITMAPINFOHEADER));
- bih->biSize = sizeof(BITMAPINFOHEADER);
- bih->biWidth = ddsd.dwWidth;
- bih->biHeight = ddsd.dwHeight;
- bih->biBitCount = 32;
- bih->biPlanes = 1;
- bih->biSizeImage = bih->biWidth * bih->biHeight * bih->biBitCount >> 3;
-
- BitBltFromRGBToRGB(bih->biWidth, bih->biHeight,
- (BYTE*)(bih + 1), bih->biWidth * bih->biBitCount >> 3, bih->biBitCount,
- (BYTE*)ddsd.lpSurface + ddsd.lPitch * (ddsd.dwHeight - 1), -(int)ddsd.lPitch, ddsd.ddpfPixelFormat.dwRGBBitCount);
-
- pVideoSurface->Unlock(nullptr);
-
- return S_OK;
-}
diff --git a/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.h
deleted file mode 100644
index 42a8de644..000000000
--- a/src/filters/renderer/VideoRenderers/DX7AllocatorPresenter.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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
-
-#include "AllocatorCommon7.h"
-#include <ddraw.h>
-#include "dx/d3d.h"
-#include "../SubPic/SubPicAllocatorPresenterImpl.h"
-
-namespace DSObjects
-{
- class CDX7AllocatorPresenter
- : public CSubPicAllocatorPresenterImpl
- {
- protected:
- CSize m_ScreenSize;
-
- HMODULE m_hDDrawLib;
- CComPtr<IDirectDraw7> m_pDD;
- CComQIPtr<IDirect3D7, &IID_IDirect3D7> m_pD3D;
- CComPtr<IDirect3DDevice7> m_pD3DDev;
-
- CComPtr<IDirectDrawSurface7> m_pPrimary;
- CComPtr<IDirectDrawSurface7> m_pBackBuffer;
- CComPtr<IDirectDrawSurface7> m_pVideoTexture;
- CComPtr<IDirectDrawSurface7> m_pVideoSurface;
-
- virtual HRESULT CreateDevice();
- virtual HRESULT AllocSurfaces();
- virtual void DeleteSurfaces();
-
- void SendResetRequest();
-
- bool m_bIsRendering;
-
- public:
- CDX7AllocatorPresenter(HWND hWnd, HRESULT& hr);
- ~CDX7AllocatorPresenter();
-
- // ISubPicAllocatorPresenter
- STDMETHODIMP CreateRenderer(IUnknown** ppRenderer);
- STDMETHODIMP_(bool) Paint(bool bAll);
- STDMETHODIMP GetDIB(BYTE* lpDib, DWORD* size);
- STDMETHODIMP_(bool) ResetDevice();
- STDMETHODIMP_(bool) DisplayChange();
-
- // ISubPicAllocatorPresenter2
- STDMETHODIMP_(bool) IsRendering() {
- return m_bIsRendering;
- }
- };
-}
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
index b49a0364b..151235b29 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -23,13 +23,14 @@
#include <algorithm>
#include "RenderersSettings.h"
#include "DX9AllocatorPresenter.h"
-#include <InitGuid.h>
#include <utility>
#include "../../../SubPic/DX9SubPic.h"
#include "../../../SubPic/SubPicQueueImpl.h"
#include "IPinHook.h"
-#include "version.h"
#include "FocusThread.h"
+#include "../../../DSUtil/SysVersion.h"
+#include "../../../DSUtil/vd.h"
+#include <mpc-hc_config.h>
CCritSec g_ffdshowReceive;
bool queue_ffdshow_support = false;
@@ -39,6 +40,13 @@ bool queue_ffdshow_support = false;
#define FRAMERATE_MAX_DELTA 3000
+#define REFERENCE_WIDTH 1920
+#define FONT_HEIGHT 21
+#define BOLD_THRESHOLD 11
+#define TEXT_PADDING 2
+#define GRAPH_HEIGHT 360
+#define GRAPH_WIDTH 1000
+
using namespace DSObjects;
#pragma warning(push)
@@ -108,7 +116,6 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRES
, m_DetectedFrameTimePos(0)
, m_bInterlaced(false)
, m_nFrameType(PICT_NONE)
- , m_TextScale(1.0)
, m_VBlankEndWait(0)
, m_VBlankStartWait(0)
, m_VBlankWaitTime(0)
@@ -231,14 +238,8 @@ CDX9AllocatorPresenter::~CDX9AllocatorPresenter()
m_pD3D = nullptr;
m_pD3DEx = nullptr;
- if (m_hDWMAPI) {
- FreeLibrary(m_hDWMAPI);
- m_hDWMAPI = nullptr;
- }
- if (m_hD3D9) {
- FreeLibrary(m_hD3D9);
- m_hD3D9 = nullptr;
- }
+ m_pSubPicQueue = nullptr;
+ m_pAllocator = nullptr;
if (m_FocusThread) {
m_FocusThread->PostThreadMessage(WM_QUIT, 0, 0);
@@ -247,6 +248,15 @@ CDX9AllocatorPresenter::~CDX9AllocatorPresenter()
TerminateThread(m_FocusThread->m_hThread, 0xDEAD);
}
}
+
+ if (m_hDWMAPI) {
+ FreeLibrary(m_hDWMAPI);
+ m_hDWMAPI = nullptr;
+ }
+ if (m_hD3D9) {
+ FreeLibrary(m_hD3D9);
+ m_hD3D9 = nullptr;
+ }
}
void ModerateFloat(double& Value, double Target, double& ValuePrim, double ChangeSpeed);
@@ -687,7 +697,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
m_hFocusWindow = hFocusWindow;
if (m_pD3DEx) {
- m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr);
+ CHECK_HR(m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr));
DisplayMode.Format = pp.BackBufferFormat;
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
@@ -719,7 +729,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
}
}
if (!m_pD3DDev) {
- m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
+ CHECK_HR(m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm));
d3ddm.Format = pp.BackBufferFormat;
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
pp.FullScreen_RefreshRateInHz = m_refreshRate = d3ddm.RefreshRate;
@@ -753,7 +763,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
m_hFocusWindow = m_hWnd;
if (m_pD3DEx) {
- m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr);
+ CHECK_HR(m_pD3DEx->GetAdapterDisplayModeEx(m_CurrentAdapter, &DisplayMode, nullptr));
m_ScreenSize.SetSize(DisplayMode.Width, DisplayMode.Height);
m_refreshRate = DisplayMode.RefreshRate;
pp.BackBufferWidth = szDesktopSize.cx;
@@ -782,7 +792,7 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
}
}
if (!m_pD3DDev) {
- m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm);
+ CHECK_HR(m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm));
m_ScreenSize.SetSize(d3ddm.Width, d3ddm.Height);
m_refreshRate = d3ddm.RefreshRate;
pp.BackBufferWidth = szDesktopSize.cx;
@@ -823,6 +833,11 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
ASSERT(m_pD3DDev);
+ if (m_ScreenSize.cx <= 0 || m_ScreenSize.cy <= 0) {
+ _Error += L"Invalid screen size\n";
+ return E_FAIL;
+ }
+
m_MainThreadId = GetCurrentThreadId();
// Get the device caps
@@ -865,34 +880,6 @@ HRESULT CDX9AllocatorPresenter::CreateDevice(CString& _Error)
m_pSubPicQueue->SetSubPicProvider(pSubPicProvider);
}
- if (m_pD3DXCreateFont) {
- long MinSize = 1600;
- long CurrentSize = std::min(m_ScreenSize.cx, MinSize);
- double Scale = double(CurrentSize) / double(MinSize);
- m_TextScale = Scale;
- m_pD3DXCreateFont(m_pD3DDev, // D3D device
- (int)(-24.0 * Scale), // Height
- (UINT)(-11.0 * Scale), // Width
- CurrentSize < 800 ? FW_NORMAL : FW_BOLD, // Weight
- 0, // MipLevels, 0 = autogen mipmaps
- FALSE, // Italic
- DEFAULT_CHARSET, // CharSet
- OUT_DEFAULT_PRECIS, // OutputPrecision
- ANTIALIASED_QUALITY, // Quality
- FIXED_PITCH | FF_DONTCARE, // PitchAndFamily
- L"Lucida Console", // pFaceName
- &m_pFont); // ppFont
- }
-
- if (m_pD3DXCreateSprite) {
- m_pD3DXCreateSprite(m_pD3DDev, // D3D device
- &m_pSprite);
- }
-
- if (m_pD3DXCreateLine) {
- m_pD3DXCreateLine(m_pD3DDev, &m_pLine);
- }
-
m_LastAdapterCheck = rd->GetPerfCounter();
return S_OK;
@@ -1740,24 +1727,6 @@ STDMETHODIMP_(bool) CDX9AllocatorPresenter::DisplayChange()
return true;
}
-void CDX9AllocatorPresenter::DrawText(const RECT& rc, const CString& strText, int _Priority)
-{
- if (_Priority < 1) {
- return;
- }
-
- D3DXCOLOR Color1(1.0f, 0.2f, 0.2f, 1.0f);
- D3DXCOLOR Color0(0.0f, 0.0f, 0.0f, 1.0f);
- RECT Rect1 = rc;
- RECT Rect2 = rc;
- OffsetRect(&Rect2 , 2, 2);
-
- // Draw shadow
- m_pFont->DrawText(m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
- // Draw text
- m_pFont->DrawText(m_pSprite, strText, -1, &Rect1, DT_NOCLIP, Color1);
-}
-
void CDX9AllocatorPresenter::ResetStats()
{
CRenderersData* rd = GetRenderersData();
@@ -1779,12 +1748,38 @@ void CDX9AllocatorPresenter::ResetStats()
CalculateJitter(Time);
}
+void CDX9AllocatorPresenter::InitStats()
+{
+ ASSERT(m_pD3DDev);
+ static LONG currentHeight = 0;
+ int newHeight = lround(FONT_HEIGHT * (double(m_windowRect.Width()) / REFERENCE_WIDTH));
+
+ if (m_pD3DXCreateFont && (!m_pFont || currentHeight != newHeight)) {
+ m_pFont = nullptr;
+ if (newHeight <= 0) {
+ ASSERT(FALSE);
+ }
+ m_pD3DXCreateFont(m_pD3DDev, newHeight, 0, newHeight < BOLD_THRESHOLD ? FW_NORMAL : FW_BOLD,
+ 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
+ SysVersion::IsXPOrLater() ? CLEARTYPE_NATURAL_QUALITY : ANTIALIASED_QUALITY,
+ FIXED_PITCH | FF_DONTCARE, L"Lucida Console", &m_pFont);
+ currentHeight = newHeight;
+ }
+
+ if (m_pD3DXCreateSprite && !m_pSprite) {
+ m_pD3DXCreateSprite(m_pD3DDev, &m_pSprite);
+ }
+
+ if (m_pD3DXCreateLine && !m_pLine) {
+ m_pD3DXCreateLine(m_pD3DDev, &m_pLine);
+ }
+}
+
void CDX9AllocatorPresenter::DrawStats()
{
- const CRenderersSettings& r = GetRenderersSettings();
const CRenderersData* rd = GetRenderersData();
- int iDetailedStats = 2;
+ int iDetailedStats;
switch (rd->m_iDisplayStats) {
case 1:
iDetailedStats = 2;
@@ -1795,151 +1790,187 @@ void CDX9AllocatorPresenter::DrawStats()
case 3:
iDetailedStats = 0;
break;
+ default:
+ ASSERT(FALSE);
+ return;
}
- LONGLONG llMaxJitter = m_MaxJitter;
- LONGLONG llMinJitter = m_MinJitter;
- LONGLONG llMaxSyncOffset = m_MaxSyncOffset;
- LONGLONG llMinSyncOffset = m_MinSyncOffset;
- RECT rc = {40, 40, 0, 0 };
+ InitStats();
+ const float textScale = float(m_windowRect.Width()) / REFERENCE_WIDTH;
+ const int lineHeight = lround((FONT_HEIGHT + TEXT_PADDING) * textScale);
+
if (m_pFont && m_pSprite) {
+ auto drawText = [&](CRect & rc, const CString & strText) {
+ D3DXCOLOR Color1(1.0f, 0.2f, 0.2f, 1.0f);
+ D3DXCOLOR Color0(0.0f, 0.0f, 0.0f, 1.0f);
+
+ RECT shadowRect = rc;
+ OffsetRect(&shadowRect, 2, 2);
+
+ // Draw shadow
+ m_pFont->DrawText(m_pSprite, strText, -1, &shadowRect, DT_NOCLIP, Color0);
+ // Draw text
+ m_pFont->DrawText(m_pSprite, strText, -1, rc, DT_NOCLIP, Color1);
+ rc.OffsetRect(0, lineHeight);
+ };
+
+ const CRenderersSettings& r = GetRenderersSettings();
+ LONGLONG llMaxJitter = m_MaxJitter;
+ LONGLONG llMinJitter = m_MinJitter;
+ LONGLONG llMaxSyncOffset = m_MaxSyncOffset;
+ LONGLONG llMinSyncOffset = m_MinSyncOffset;
+ CRect rc(lineHeight, lineHeight, 0, 0);
+
m_pSprite->Begin(D3DXSPRITE_ALPHABLEND);
CString strText;
- int TextHeight = int(25.0 * m_TextScale + 0.5);
- //strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s) Clock: %7.3f ms %+1.4f %% %+1.9f %+1.9f", m_fAvrFps, double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame), m_bInterlaced ? L"I" : L"P", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_ClockDiff/10000.0, m_ModeratedTimeSpeed*100.0 - 100.0, m_ModeratedTimeSpeedDiff, m_ClockDiffCalc/10000.0);
if (iDetailedStats > 1) {
if (m_bIsEVR) {
if (m_nFrameType != PICT_NONE) {
- strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%", m_fAvrFps, double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame), m_nFrameType == PICT_FRAME ? L"P" : L"I", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0, m_ModeratedTimeSpeed * 100.0);
+ strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%",
+ m_fAvrFps,
+ double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame),
+ m_nFrameType == PICT_FRAME ? L"P" : L"I", GetFrameTime() * 1000.0, GetFrameRate(),
+ m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0,
+ m_ModeratedTimeSpeed * 100.0);
} else {
- strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%", m_fAvrFps, double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame), m_bInterlaced ? L"I" : L"P", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0, m_ModeratedTimeSpeed * 100.0);
+ strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev) Clock: %1.4f %%",
+ m_fAvrFps,
+ double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame),
+ m_bInterlaced ? L"I" : L"P", GetFrameTime() * 1000.0, GetFrameRate(),
+ m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0,
+ m_ModeratedTimeSpeed * 100.0);
}
} else {
- strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s)", m_fAvrFps, double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame), m_bInterlaced ? L"I" : L"P");
+ strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s)",
+ m_fAvrFps,
+ double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame),
+ m_bInterlaced ? L"I" : L"P");
}
- }
- //strText.Format(L"Frame rate : %7.03f (%7.3f ms = %.03f, %s) (%7.3f ms = %.03f%s, %2.03f StdDev)", m_fAvrFps, double(m_rtTimePerFrame) / 10000.0, 10000000.0 / (double)(m_rtTimePerFrame), m_bInterlaced ? L"I" : L"P", GetFrameTime() * 1000.0, GetFrameRate(), m_DetectedLock ? L" L" : L"", m_DetectedFrameTimeStdDev / 10000.0);
- else {
+ } else {
strText.Format(L"Frame rate : %7.03f (%.03f%s)", m_fAvrFps, GetFrameRate(), m_DetectedLock ? L" L" : L"");
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
if (m_nFrameType != PICT_NONE) {
- strText.Format(L"Frame type : %s", m_nFrameType == PICT_FRAME ? L"Progressive" : m_nFrameType == PICT_BOTTOM_FIELD ? L"Interlaced : Bottom field first" : L"Interlaced : Top field first");
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(L"Frame type : %s",
+ m_nFrameType == PICT_FRAME ? L"Progressive" :
+ m_nFrameType == PICT_BOTTOM_FIELD ? L"Interlaced : Bottom field first" :
+ L"Interlaced : Top field first");
+ drawText(rc, strText);
}
if (iDetailedStats > 1) {
- strText = L"Settings : ";
+ strText = _T("Settings : ");
if (m_bIsEVR) {
- strText += "EVR ";
+ strText += _T("EVR ");
} else {
- strText += "VMR9 ";
+ strText += _T("VMR9 ");
}
if (m_bIsFullscreen) {
- strText += "FS ";
+ strText += _T("FS ");
}
if (r.m_AdvRendSets.bVMR9FullscreenGUISupport) {
- strText += "FSGui ";
+ strText += _T("FSGui ");
}
if (r.m_AdvRendSets.bVMRDisableDesktopComposition) {
- strText += "DisDC ";
+ strText += _T("DisDC ");
}
if (m_bColorManagement) {
- strText += "ColorMan ";
+ strText += _T("ColorMan ");
}
if (r.m_AdvRendSets.bVMRFlushGPUBeforeVSync) {
- strText += "GPUFlushBV ";
+ strText += _T("GPUFlushBV ");
}
if (r.m_AdvRendSets.bVMRFlushGPUAfterPresent) {
- strText += "GPUFlushAP ";
+ strText += _T("GPUFlushAP ");
}
if (r.m_AdvRendSets.bVMRFlushGPUWait) {
- strText += "GPUFlushWt ";
+ strText += _T("GPUFlushWt ");
}
if (r.m_AdvRendSets.bVMR9VSync) {
- strText += "VS ";
+ strText += _T("VS ");
}
if (r.m_AdvRendSets.bVMR9AlterativeVSync) {
- strText += "AltVS ";
+ strText += _T("AltVS ");
}
if (r.m_AdvRendSets.bVMR9VSyncAccurate) {
- strText += "AccVS ";
+ strText += _T("AccVS ");
}
if (r.m_AdvRendSets.iVMR9VSyncOffset) {
- strText.AppendFormat(L"VSOfst(%d)", r.m_AdvRendSets.iVMR9VSyncOffset);
+ strText.AppendFormat(_T("VSOfst(%d)"), r.m_AdvRendSets.iVMR9VSyncOffset);
}
if (m_bFullFloatingPointProcessing) {
- strText += "FullFP ";
+ strText += _T("FullFP ");
}
if (m_bHalfFloatingPointProcessing) {
- strText += "HalfFP ";
+ strText += _T("HalfFP ");
}
if (m_bIsEVR) {
if (m_bHighColorResolution) {
- strText += "10bitOut ";
+ strText += _T("10bitOut ");
}
if (m_bForceInputHighColorResolution) {
- strText += "For10bitIn ";
+ strText += _T("For10bitIn ");
}
if (r.m_AdvRendSets.bEVREnableFrameTimeCorrection) {
- strText += "FTC ";
+ strText += _T("FTC ");
}
if (r.m_AdvRendSets.iEVROutputRange == 0) {
- strText += "0-255 ";
+ strText += _T("0-255 ");
} else if (r.m_AdvRendSets.iEVROutputRange == 1) {
- strText += "16-235 ";
+ strText += _T("16-235 ");
}
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
strText.Format(L"Formats : Surface %s Backbuffer %s Display %s Device %s %s",
- GetD3DFormatStr(m_SurfaceType), GetD3DFormatStr(m_BackbufferType), GetD3DFormatStr(m_DisplayType),
- m_pD3DDevEx ? L"D3DDevEx" : L"D3DDev", m_D3DDevExError.IsEmpty() ? _T("") : _T("D3DExError: ") + m_D3DDevExError);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ GetD3DFormatStr(m_SurfaceType), GetD3DFormatStr(m_BackbufferType),
+ GetD3DFormatStr(m_DisplayType), m_pD3DDevEx ? L"D3DDevEx" : L"D3DDev",
+ m_D3DDevExError.IsEmpty() ? _T("") : _T("D3DExError: ") + m_D3DDevExError);
+ drawText(rc, strText);
if (m_bIsEVR) {
if (r.m_AdvRendSets.bVMR9VSync) {
- strText.Format(L"Refresh rate : %.05f Hz SL: %4d (%3u Hz) ", m_DetectedRefreshRate, int(m_DetectedScanlinesPerFrame + 0.5), m_refreshRate);
+ strText.Format(_T("Refresh rate : %.05f Hz SL: %4d (%3u Hz) "),
+ m_DetectedRefreshRate, int(m_DetectedScanlinesPerFrame + 0.5), m_refreshRate);
} else {
- strText.Format(L"Refresh rate : %3u Hz ", m_refreshRate);
+ strText.Format(_T("Refresh rate : %3u Hz "), m_refreshRate);
}
- strText.AppendFormat(L"Last Duration: %10.6f Corrected Frame Time: %s", double(m_LastFrameDuration) / 10000.0, m_bCorrectedFrameTime ? L"Yes" : L"No");
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.AppendFormat(_T("Last Duration: %10.6f Corrected Frame Time: %s"),
+ double(m_LastFrameDuration) / 10000.0, m_bCorrectedFrameTime ? _T("Yes") : _T("No"));
+ drawText(rc, strText);
}
}
if (m_bSyncStatsAvailable) {
if (iDetailedStats > 1) {
- strText.Format(L"Sync offset : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms, Avr = %7.3f ms, Mode = %d", (double(llMinSyncOffset) / 10000.0), (double(llMaxSyncOffset) / 10000.0), m_fSyncOffsetStdDev / 10000.0, m_fSyncOffsetAvr / 10000.0, m_VSyncMode);
+ strText.Format(_T("Sync offset : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms, Avr = %7.3f ms, Mode = %d"),
+ (double(llMinSyncOffset) / 10000.0), (double(llMaxSyncOffset) / 10000.0),
+ m_fSyncOffsetStdDev / 10000.0, m_fSyncOffsetAvr / 10000.0, m_VSyncMode);
} else {
- strText.Format(L"Sync offset : Mode = %d", m_VSyncMode);
+ strText.Format(_T("Sync offset : Mode = %d"), m_VSyncMode);
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
}
if (iDetailedStats > 1) {
- strText.Format(L"Jitter : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms", (double(llMinJitter) / 10000.0), (double(llMaxJitter) / 10000.0), m_fJitterStdDev / 10000.0);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Jitter : Min = %+8.3f ms, Max = %+8.3f ms, StdDev = %7.3f ms"),
+ (double(llMinJitter) / 10000.0),
+ (double(llMaxJitter) / 10000.0),
+ m_fJitterStdDev / 10000.0);
+ drawText(rc, strText);
}
if (m_pAllocator && iDetailedStats > 1) {
@@ -1956,76 +1987,101 @@ void CDX9AllocatorPresenter::DrawStats()
}
pAlloc->GetStats(nFree, nAlloc);
- strText.Format(L"Subtitles : Free %d Allocated %d Buffered %d QueueStart %7.3f QueueEnd %7.3f",
- nFree, nAlloc, nSubPic, (double(rtQueueStart) / 10000000.0), (double(rtQueueEnd) / 10000000.0));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Subtitles : Free %d Allocated %d Buffered %d QueueStart %7.3f QueueEnd %7.3f"),
+ nFree, nAlloc, nSubPic, (double(rtQueueStart) / 10000000.0),
+ (double(rtQueueEnd) / 10000000.0));
+ drawText(rc, strText);
}
if (iDetailedStats > 1) {
if (m_VBlankEndPresent == -100000) {
- strText.Format(L"VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d", m_VBlankStartWait, m_VBlankEndWait, (double(m_VBlankWaitTime) / 10000.0), (double(m_VBlankLockTime) / 10000.0), m_VBlankMin, m_VBlankMax - m_VBlankMin);
+ strText.Format(_T("VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d"),
+ m_VBlankStartWait, m_VBlankEndWait,
+ (double(m_VBlankWaitTime) / 10000.0),
+ (double(m_VBlankLockTime) / 10000.0),
+ m_VBlankMin, m_VBlankMax - m_VBlankMin);
} else {
- strText.Format(L"VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d EndPresent %4d", m_VBlankStartWait, m_VBlankEndWait, (double(m_VBlankWaitTime) / 10000.0), (double(m_VBlankLockTime) / 10000.0), m_VBlankMin, m_VBlankMax - m_VBlankMin, m_VBlankEndPresent);
+ strText.Format(_T("VBlank Wait : Start %4d End %4d Wait %7.3f ms Lock %7.3f ms Offset %4d Max %4d EndPresent %4d"),
+ m_VBlankStartWait, m_VBlankEndWait,
+ (double(m_VBlankWaitTime) / 10000.0),
+ (double(m_VBlankLockTime) / 10000.0),
+ m_VBlankMin,
+ m_VBlankMax - m_VBlankMin,
+ m_VBlankEndPresent);
}
} else {
if (m_VBlankEndPresent == -100000) {
- strText.Format(L"VBlank Wait : Start %4d End %4d", m_VBlankStartWait, m_VBlankEndWait);
+ strText.Format(_T("VBlank Wait : Start %4d End %4d"), m_VBlankStartWait, m_VBlankEndWait);
} else {
- strText.Format(L"VBlank Wait : Start %4d End %4d EP %4d", m_VBlankStartWait, m_VBlankEndWait, m_VBlankEndPresent);
+ strText.Format(_T("VBlank Wait : Start %4d End %4d EP %4d"), m_VBlankStartWait, m_VBlankEndWait,
+ m_VBlankEndPresent);
}
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
BOOL bCompositionEnabled = m_bCompositionEnabled;
bool bDoVSyncInPresent = (!bCompositionEnabled && !m_bAlternativeVSync) || !r.m_AdvRendSets.bVMR9VSync;
if (iDetailedStats > 1 && bDoVSyncInPresent) {
- strText.Format(L"Present Wait : Wait %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_PresentWaitTime) / 10000.0), (double(m_PresentWaitTimeMin) / 10000.0), (double(m_PresentWaitTimeMax) / 10000.0));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Present Wait : Wait %7.3f ms Min %7.3f ms Max %7.3f ms"),
+ (double(m_PresentWaitTime) / 10000.0),
+ (double(m_PresentWaitTimeMin) / 10000.0),
+ (double(m_PresentWaitTimeMax) / 10000.0));
+ drawText(rc, strText);
}
if (iDetailedStats > 1) {
if (m_WaitForGPUTime) {
- strText.Format(L"Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms GPU %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime) / 10000.0), (double(m_PaintTimeMin) / 10000.0), (double(m_PaintTimeMax) / 10000.0), (double(m_WaitForGPUTime) / 10000.0));
+ strText.Format(_T("Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms GPU %7.3f ms"),
+ (double(m_PaintTime - m_WaitForGPUTime) / 10000.0),
+ (double(m_PaintTimeMin) / 10000.0),
+ (double(m_PaintTimeMax) / 10000.0),
+ (double(m_WaitForGPUTime) / 10000.0));
} else {
- strText.Format(L"Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime) / 10000.0), (double(m_PaintTimeMin) / 10000.0), (double(m_PaintTimeMax) / 10000.0));
+ strText.Format(_T("Paint Time : Draw %7.3f ms Min %7.3f ms Max %7.3f ms"),
+ (double(m_PaintTime - m_WaitForGPUTime) / 10000.0),
+ (double(m_PaintTimeMin) / 10000.0),
+ (double(m_PaintTimeMax) / 10000.0));
}
} else {
if (m_WaitForGPUTime) {
- strText.Format(L"Paint Time : Draw %7.3f ms GPU %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime) / 10000.0), (double(m_WaitForGPUTime) / 10000.0));
+ strText.Format(_T("Paint Time : Draw %7.3f ms GPU %7.3f ms"),
+ (double(m_PaintTime - m_WaitForGPUTime) / 10000.0),
+ (double(m_WaitForGPUTime) / 10000.0));
} else {
- strText.Format(L"Paint Time : Draw %7.3f ms", (double(m_PaintTime - m_WaitForGPUTime) / 10000.0));
+ strText.Format(_T("Paint Time : Draw %7.3f ms"),
+ (double(m_PaintTime - m_WaitForGPUTime) / 10000.0));
}
}
- DrawText(rc, strText, 2);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
if (iDetailedStats > 1 && r.m_AdvRendSets.bVMR9VSync) {
- strText.Format(L"Raster Status: Wait %7.3f ms Min %7.3f ms Max %7.3f ms", (double(m_RasterStatusWaitTime) / 10000.0), (double(m_RasterStatusWaitTimeMin) / 10000.0), (double(m_RasterStatusWaitTimeMax) / 10000.0));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Raster Status: Wait %7.3f ms Min %7.3f ms Max %7.3f ms"),
+ (double(m_RasterStatusWaitTime) / 10000.0),
+ (double(m_RasterStatusWaitTimeMin) / 10000.0),
+ (double(m_RasterStatusWaitTimeMax) / 10000.0));
+ drawText(rc, strText);
}
if (iDetailedStats > 1) {
if (m_bIsEVR) {
- strText.Format(L"Buffering : Buffered %3ld Free %3d Current Surface %3d", m_nUsedBuffer, m_nNbDXSurface - m_nUsedBuffer, m_nCurSurface);
+ strText.Format(_T("Buffering : Buffered %3ld Free %3ld Current Surface %3d"),
+ m_nUsedBuffer, m_nNbDXSurface - m_nUsedBuffer, m_nCurSurface);
} else {
- strText.Format(L"Buffering : VMR9Surfaces %3d VMR9Surface %3d", m_nVMR9Surfaces, m_iVMR9Surface);
+ strText.Format(_T("Buffering : VMR9Surfaces %3d VMR9Surface %3d"),
+ m_nVMR9Surfaces, m_iVMR9Surface);
}
} else {
- strText.Format(L"Buffered : %3ld", m_nUsedBuffer);
+ strText.Format(_T("Buffered : %3ld"), m_nUsedBuffer);
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
+
if (iDetailedStats > 1) {
- strText.Format(L"Video size : %ld x %ld (AR = %ld : %ld)", m_nativeVideoSize.cx, m_nativeVideoSize.cy, m_aspectRatio.cx, m_aspectRatio.cy);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Video size : %ld x %ld (AR = %ld : %ld)"),
+ m_nativeVideoSize.cx, m_nativeVideoSize.cy, m_aspectRatio.cx, m_aspectRatio.cy);
+ drawText(rc, strText);
if (m_pVideoTexture[0] || m_pVideoSurface[0]) {
D3DSURFACE_DESC desc;
ZeroMemory(&desc, sizeof(desc));
@@ -2036,104 +2092,106 @@ void CDX9AllocatorPresenter::DrawStats()
}
if (desc.Width != (UINT)m_nativeVideoSize.cx || desc.Height != (UINT)m_nativeVideoSize.cy) {
- strText.Format(L"Texture size : %u x %u", desc.Width, desc.Height);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Texture size : %u x %u"), desc.Width, desc.Height);
+ drawText(rc, strText);
}
}
- DrawText(rc, rd->m_strDXVAInfo, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, rd->m_strDXVAInfo);
- strText.Format(L"DirectX SDK : %u", rd->GetDXSdkRelease());
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("DirectX SDK : %u"), rd->GetDXSdkRelease());
+ drawText(rc, strText);
if (!m_D3D9Device.IsEmpty()) {
- strText = "Render device: " + m_D3D9Device;
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText = _T("Render device: ") + m_D3D9Device;
+ drawText(rc, strText);
}
if (!m_Decoder.IsEmpty()) {
- strText = "Decoder : " + m_Decoder;
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText = _T("Decoder : ") + m_Decoder;
+ drawText(rc, strText);
}
for (int i = 0; i < 6; i++) {
if (m_strStatsMsg[i][0]) {
- DrawText(rc, m_strStatsMsg[i], 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, m_strStatsMsg[i]);
}
}
}
m_pSprite->End();
- OffsetRect(&rc, 0, TextHeight); // Extra "line feed"
}
if (m_pLine && iDetailedStats) {
- D3DXVECTOR2 Points[NB_JITTER];
-
- int ScaleX = 1;
- int ScaleY = 1;
- int DrawWidth = 625 * ScaleX + 50;
- int DrawHeight = 250 * ScaleY;
- int Alpha = 80;
- int StartX = m_windowRect.Width() - (DrawWidth + 20);
- int StartY = m_windowRect.Height() - (DrawHeight + 20);
-
- DrawRect(RGB(0, 0, 0), Alpha, CRect(StartX, StartY, StartX + DrawWidth, StartY + DrawHeight));
- // === Jitter Graduation
- //m_pLine->SetWidth(2.2); // Width
- //m_pLine->SetAntialias(1);
- m_pLine->SetWidth(2.5); // Width
- m_pLine->SetAntialias(1);
- //m_pLine->SetGLLines(1);
+ D3DXVECTOR2 points[NB_JITTER];
+ const float graphWidth = GRAPH_WIDTH * textScale;
+ const float graphHeight = GRAPH_HEIGHT * textScale;
+ const float topLeftX = m_windowRect.Width() - (graphWidth + lineHeight);
+ const float topLeftY = m_windowRect.Height() - (graphHeight + lineHeight);
+ const float gridStepY = graphHeight / 24.0f;
+ const float gridStepX = graphWidth / NB_JITTER;
+
+ // Draw background
+ DrawRect(RGB(0, 0, 0), 80, CRect(int(topLeftX),
+ int(topLeftY),
+ int(topLeftX + graphWidth),
+ int(topLeftY + graphHeight)));
+
+ m_pLine->SetWidth(2.5f * textScale);
+ m_pLine->SetAntialias(TRUE);
m_pLine->Begin();
- for (int i = 10; i < 250 * ScaleY; i += 10 * ScaleY) {
- Points[0].x = (float)StartX;
- Points[0].y = (float)(StartY + i);
- Points[1].x = (float)(StartX + (((i - 10) % 40) ? 50 : 625 * ScaleX));
- Points[1].y = (float)(StartY + i);
- if (i == 130) {
- Points[1].x += 50;
+ // Draw grid lines
+ for (int i = 1; i < 24; ++i) {
+ points[0].x = topLeftX;
+ points[0].y = topLeftY + i * gridStepY;
+ points[1].y = points[0].y;
+
+ float lineLength;
+ D3DCOLOR color;
+ if (i % 12 == 0) {
+ lineLength = 1.0f;
+ color = D3DCOLOR_XRGB(100, 100, 255);
+ } else if (i % 4 == 0) {
+ lineLength = 0.96f;
+ color = D3DCOLOR_XRGB(100, 100, 180);
+ } else {
+ lineLength = 0.04f;
+ color = D3DCOLOR_XRGB(100, 100, 140);
}
- m_pLine->Draw(Points, 2, D3DCOLOR_XRGB(100, 100, 255));
+ points[1].x = topLeftX + graphWidth * lineLength;
+ m_pLine->Draw(points, 2, color);
}
- // === Jitter curve
if (m_rtTimePerFrame) {
- for (int i = 0; i < NB_JITTER; i++) {
- int nIndex = (m_nNextJitter + 1 + i) % NB_JITTER;
+ // Draw jitter
+ for (int i = 1; i <= NB_JITTER; ++i) {
+ int nIndex = (m_nNextJitter + i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
+ ASSERT(FALSE);
}
- double Jitter = m_pllJitter[nIndex] - m_fJitterMean;
- Points[i].x = (float)(StartX + (i * 5 * ScaleX + 5));
- Points[i].y = (float)(StartY + ((Jitter * ScaleY) / 5000.0 + 125.0 * ScaleY));
+ float jitter = float(m_pllJitter[nIndex] - m_fJitterMean);
+ points[i - 1].x = topLeftX + i * gridStepX;
+ points[i - 1].y = topLeftY + (jitter * textScale / 2000.0f + graphHeight / 2.0f);
}
- m_pLine->Draw(Points, NB_JITTER, D3DCOLOR_XRGB(255, 100, 100));
+ m_pLine->Draw(points, NB_JITTER, D3DCOLOR_XRGB(255, 100, 100));
if (m_bSyncStatsAvailable) {
- for (int i = 0; i < NB_JITTER; i++) {
- int nIndex = (m_nNextSyncOffset + 1 + i) % NB_JITTER;
+ // Draw sync offset
+ for (int i = 1; i <= NB_JITTER; ++i) {
+ int nIndex = (m_nNextSyncOffset + i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
}
- Points[i].x = (float)(StartX + (i * 5 * ScaleX + 5));
- Points[i].y = (float)(StartY + ((m_pllSyncOffset[nIndex] * ScaleY) / 5000 + 125 * ScaleY));
+ points[i - 1].x = topLeftX + i * gridStepX;
+ points[i - 1].y = topLeftY + (m_pllSyncOffset[nIndex] * textScale / 2000.0f + graphHeight / 2.0f);
}
- m_pLine->Draw(Points, NB_JITTER, D3DCOLOR_XRGB(100, 200, 100));
+ m_pLine->Draw(points, NB_JITTER, D3DCOLOR_XRGB(100, 200, 100));
}
}
m_pLine->End();
}
-
- // === Text
-
}
STDMETHODIMP CDX9AllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
@@ -2189,22 +2247,11 @@ STDMETHODIMP CDX9AllocatorPresenter::GetDIB(BYTE* lpDib, DWORD* size)
}
}
- BITMAPINFOHEADER* bih = (BITMAPINFOHEADER*)lpDib;
- ZeroMemory(bih, sizeof(BITMAPINFOHEADER));
- bih->biSize = sizeof(BITMAPINFOHEADER);
- bih->biWidth = desc.Width;
- bih->biHeight = desc.Height;
- bih->biBitCount = 32;
- bih->biPlanes = 1;
- bih->biSizeImage = bih->biWidth * bih->biHeight * bih->biBitCount >> 3;
-
- BitBltFromRGBToRGB(bih->biWidth, bih->biHeight,
- (BYTE*)(bih + 1), bih->biWidth * bih->biBitCount >> 3, bih->biBitCount,
- (BYTE*)r.pBits + r.Pitch * (desc.Height - 1), -(int)r.Pitch, 32);
+ hr = CreateDIBFromSurfaceData(desc, r, lpDib);
pSurface->UnlockRect();
- return S_OK;
+ return hr;
}
STDMETHODIMP CDX9AllocatorPresenter::SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget)
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
index a7eefc80e..4f7215c95 100644
--- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.h
@@ -155,8 +155,7 @@ namespace DSObjects
LPCWSTR pFaceName,
LPD3DXFONT* ppFont);
-
- void DrawText(const RECT& rc, const CString& strText, int _Priority);
+ void InitStats();
void ResetStats();
void DrawStats();
virtual void OnResetDevice() {};
@@ -237,8 +236,6 @@ namespace DSObjects
int m_bInterlaced;
FF_FIELD_TYPE m_nFrameType;
- double m_TextScale;
-
int m_VBlankEndWait;
int m_VBlankStartWait;
LONGLONG m_VBlankWaitTime;
diff --git a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
index f831f5d42..ab56932d0 100644
--- a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
+++ b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.h
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -69,6 +69,7 @@ namespace DSObjects
bool m_bColorManagement;
CDX9RenderingEngine(HWND hWnd, HRESULT& hr, CString* _pError);
+ virtual ~CDX9RenderingEngine() = default;
void InitRenderingEngine();
void CleanupRenderingEngine();
diff --git a/src/filters/renderer/VideoRenderers/DXRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DXRAllocatorPresenter.cpp
index c25c3728b..b5638f322 100644
--- a/src/filters/renderer/VideoRenderers/DXRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/DXRAllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -88,6 +88,7 @@ HRESULT CDXRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
// release all resources
m_pSubPicQueue = nullptr;
m_pAllocator = nullptr;
+ __super::SetPosition(CRect(), CRect());
return hr;
}
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
index 1842bd5d2..acae83ba3 100644
--- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -105,13 +105,13 @@ CEVRAllocatorPresenter::CEVRAllocatorPresenter(HWND hWnd, bool bFullscreen, HRES
, m_bSignaledStarvation(false)
, m_StarvationClock(0)
, m_SampleFreeCallback(this, &CEVRAllocatorPresenter::OnSampleFree)
- , fnDXVA2CreateDirect3DDeviceManager9("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9")
- , fnMFCreateDXSurfaceBuffer("evr.dll", "MFCreateDXSurfaceBuffer")
- , fnMFCreateVideoSampleFromSurface("evr.dll", "MFCreateVideoSampleFromSurface")
- , fnMFCreateMediaType("mfplat.dll", "MFCreateMediaType")
- , fnAvSetMmThreadCharacteristicsW("avrt.dll", "AvSetMmThreadCharacteristicsW")
- , fnAvSetMmThreadPriority("avrt.dll", "AvSetMmThreadPriority")
- , fnAvRevertMmThreadCharacteristics("avrt.dll", "AvRevertMmThreadCharacteristics")
+ , fnDXVA2CreateDirect3DDeviceManager9(_T("dxva2.dll"), "DXVA2CreateDirect3DDeviceManager9")
+ , fnMFCreateDXSurfaceBuffer(_T("evr.dll"), "MFCreateDXSurfaceBuffer")
+ , fnMFCreateVideoSampleFromSurface(_T("evr.dll"), "MFCreateVideoSampleFromSurface")
+ , fnMFCreateMediaType(_T("mfplat.dll"), "MFCreateMediaType")
+ , fnAvSetMmThreadCharacteristicsW(_T("avrt.dll"), "AvSetMmThreadCharacteristicsW")
+ , fnAvSetMmThreadPriority(_T("avrt.dll"), "AvSetMmThreadPriority")
+ , fnAvRevertMmThreadCharacteristics(_T("avrt.dll"), "AvRevertMmThreadCharacteristics")
{
const CRenderersSettings& r = GetRenderersSettings();
@@ -1197,27 +1197,33 @@ STDMETHODIMP CEVRAllocatorPresenter::GetCurrentMediaType(__deref_out IMFVideoMe
// IMFTopologyServiceLookupClient
STDMETHODIMP CEVRAllocatorPresenter::InitServicePointers(/* [in] */ __in IMFTopologyServiceLookup* pLookup)
{
+ HRESULT hr = S_OK;
DWORD dwObjects = 1;
+ CAutoLock cThreadsLock(&m_ThreadsLock);
+
TRACE_EVR("EVR: CEVRAllocatorPresenter::InitServicePointers\n");
- pLookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_MIXER_SERVICE,
- IID_PPV_ARGS(&m_pMixer), &dwObjects);
+ CHECK_HR(pLookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_MIXER_SERVICE,
+ IID_PPV_ARGS(&m_pMixer), &dwObjects));
- pLookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_RENDER_SERVICE,
- IID_PPV_ARGS(&m_pSink), &dwObjects);
+ CHECK_HR(pLookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_RENDER_SERVICE,
+ IID_PPV_ARGS(&m_pSink), &dwObjects));
pLookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0, MR_VIDEO_RENDER_SERVICE,
IID_PPV_ARGS(&m_pClock), &dwObjects);
StartWorkerThreads();
- return S_OK;
+ return hr;
}
STDMETHODIMP CEVRAllocatorPresenter::ReleaseServicePointers()
{
TRACE_EVR("EVR: CEVRAllocatorPresenter::ReleaseServicePointers\n");
+ CAutoLock cThreadsLock(&m_ThreadsLock);
+
StopWorkerThreads();
+
m_pMixer = nullptr;
m_pSink = nullptr;
m_pClock = nullptr;
@@ -1904,6 +1910,8 @@ void CEVRAllocatorPresenter::OnVBlankFinished(bool bAll, LONGLONG PerformanceCou
STDMETHODIMP_(bool) CEVRAllocatorPresenter::ResetDevice()
{
+ CAutoLock cThreadsLock(&m_ThreadsLock);
+
StopWorkerThreads();
CAutoLock lock(this);
diff --git a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
index cbb8f22d9..afd74191a 100644
--- a/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/EVRAllocatorPresenter.h
@@ -194,6 +194,7 @@ namespace DSObjects
CCritSec m_SampleQueueLock;
CCritSec m_ImageProcessingLock;
CCritSec m_MediaTypeLock;
+ CCritSec m_ThreadsLock;
UINT32 m_nCurrentGroupId;
CInterfaceList<IMFSample> m_FreeSamples;
diff --git a/src/filters/renderer/VideoRenderers/PixelShaderCache.cpp b/src/filters/renderer/VideoRenderers/PixelShaderCache.cpp
new file mode 100644
index 000000000..481d96bd5
--- /dev/null
+++ b/src/filters/renderer/VideoRenderers/PixelShaderCache.cpp
@@ -0,0 +1,242 @@
+/*
+* (C) 2016 see Authors.txt
+*
+* This file is part of MPC-HC.
+*
+* MPC-HC 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.
+*
+* MPC-HC 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 "PixelShaderCache.h"
+#include "RenderersSettings.h"
+#include <d3d9.h>
+
+CPixelShaderCache::CPixelShaderCache(IDirect3DDevice9* pD3DDev)
+ : m_pD3DDev(pD3DDev)
+{
+ if (IsEnabled()) {
+ LoadCache();
+ } else {
+ DestroyCache();
+ }
+}
+
+HRESULT CPixelShaderCache::CreatePixelShader(
+ LPCSTR pProfile,
+ LPCSTR pSourceData,
+ SIZE_T SourceDataSize,
+ IDirect3DPixelShader9** ppPixelShader)
+{
+ if (!IsEnabled()) {
+ return E_FAIL;
+ }
+
+ uint64_t hash = Hash(pProfile, pSourceData, SourceDataSize);
+ auto pixelShader = m_PixelShaders.PLookup(hash);
+
+ if (pixelShader) {
+ HRESULT res = m_pD3DDev->CreatePixelShader(pixelShader->value.m_p, ppPixelShader);
+
+ if (FAILED(res)) {
+ DeleteCache(hash);
+ } else {
+ CString file_path;
+ if (GetCacheFilePath(file_path, hash)) {
+ TouchFile(file_path);
+ }
+ }
+ return res;
+ }
+
+ return E_FAIL;
+}
+
+void CPixelShaderCache::SavePixelShader(
+ LPCSTR pProfile,
+ LPCSTR pSourceData,
+ SIZE_T SourceDataSize,
+ void* pCompiledData,
+ SIZE_T CompiledDataSize)
+{
+ if (!IsEnabled()) {
+ return;
+ }
+
+ uint64_t hash = Hash(pProfile, pSourceData, SourceDataSize);
+
+ CAutoVectorPtr<DWORD> buffer;
+ if (buffer.Allocate(CompiledDataSize)) {
+ memcpy(buffer.m_p, pCompiledData, CompiledDataSize);
+ m_PixelShaders.SetAt(hash, buffer);
+ }
+
+ CString cacheFilePath;
+ if (GetCacheFilePath(cacheFilePath, hash)) {
+ CFile file;
+ if (file.Open(cacheFilePath, CFile::modeWrite | CFile::typeBinary)) {
+ file.SetLength(0);
+ } else if (!file.Open(cacheFilePath, CFile::modeWrite | CFile::typeBinary | CFile::modeCreate)) {
+ return;
+ }
+
+ file.Write(&m_Version, sizeof(m_Version));
+ file.Write(&CompiledDataSize, sizeof(CompiledDataSize));
+ file.Write(pCompiledData, UINT(CompiledDataSize));
+
+ bool res = file.GetLength() == (sizeof(m_Version) + sizeof(CompiledDataSize) + CompiledDataSize);
+
+ file.Close();
+
+ if (!res) {
+ CFile::Remove(cacheFilePath);
+ }
+ }
+}
+
+void CPixelShaderCache::LoadCache()
+{
+ CString cacheFolder;
+ if (GetCacheFolder(cacheFolder)) {
+ CFileFind finder;
+ BOOL working = finder.FindFile(cacheFolder + _T("\\*"));
+
+ while (working) {
+ working = finder.FindNextFile();
+ if (!finder.IsDirectory() && !finder.IsDots()) {
+ if (!LoadCache(finder.GetFileName(), finder.GetFilePath())) {
+ CFile::Remove(finder.GetFilePath());
+ }
+ }
+ }
+ }
+}
+
+void CPixelShaderCache::DestroyCache()
+{
+ CString cacheFolder;
+ if (GetCacheFolder(cacheFolder)) {
+ SHFILEOPSTRUCT fileop = {};
+ fileop.wFunc = FO_DELETE;
+ // The last file name is terminated with a double NULL character ("\0\0") to indicate the end of the buffer.
+ // We add one char to CString. GetBufferSetLength adds NULL at the end and since previous end was also NULL
+ // returned buffer have double NULL character at the end in result.
+ fileop.pFrom = cacheFolder.GetBufferSetLength(cacheFolder.GetLength() + 1);
+ fileop.fFlags = FOF_NOCONFIRMATION | FOF_SILENT;
+ VERIFY(SHFileOperation(&fileop) == 0);
+ }
+}
+
+bool CPixelShaderCache::IsEnabled()
+{
+ return GetRenderersSettings().m_AdvRendSets.bCacheShaders;
+}
+
+void CPixelShaderCache::TouchFile(const CString& FileName) const
+{
+ CFileStatus status;
+ if (CFile::GetStatus(FileName, status)) {
+ status.m_mtime = CTime::GetCurrentTime();
+ CFile::SetStatus(FileName, status);
+ }
+}
+
+bool CPixelShaderCache::IsFileOutdated(const CString& FileName) const
+{
+ CFileStatus status;
+ if (CFile::GetStatus(FileName, status)) {
+ CTimeSpan timespan(m_CachedDaysLimit, 0, 0, 0);
+ return CTime::GetCurrentTime() - status.m_mtime > timespan;
+ }
+
+ return true;
+}
+
+bool CPixelShaderCache::LoadCache(const CString& FileName, const CString& FilePath)
+{
+ if (IsFileOutdated(FilePath)) {
+ return false;
+ }
+
+ CPath path(FileName);
+ path.RemoveExtension();
+ uint64_t hash = _tcstoui64(path, NULL, 10);
+ CFile file;
+ if (file.Open(FilePath, CFile::modeRead | CFile::typeBinary)) {
+ unsigned int version;
+ bool ret = false;
+
+ if ((file.Read(&version, sizeof(version)) == sizeof(version)) && (version == m_Version)) {
+ SIZE_T size;
+ if (file.Read(&size, sizeof(size)) == sizeof(size)) {
+ CAutoVectorPtr<DWORD> buffer;
+ if (buffer.Allocate(size)) {
+ ret = (file.Read(buffer.m_p, UINT(size)) == size);
+
+ m_PixelShaders.SetAt(hash, buffer);
+ }
+ }
+ }
+
+ file.Close();
+
+ return ret;
+ }
+ return false;
+}
+
+void CPixelShaderCache::DeleteCache(uint64_t Hash)
+{
+ m_PixelShaders.RemoveKey(Hash);
+
+ CString cacheFilePath;
+ if (GetCacheFilePath(cacheFilePath, Hash)) {
+ CFile::Remove(cacheFilePath);
+ }
+}
+
+bool CPixelShaderCache::GetCacheFilePath(CString& CacheFilePath, uint64_t Hash) const
+{
+ CString cacheFolder;
+ if (GetCacheFolder(cacheFolder)) {
+ CacheFilePath.Format(_T("\\%020llu"), Hash);
+ CacheFilePath = cacheFolder + CacheFilePath + m_Extension;
+ return true;
+ }
+ return false;
+}
+
+bool CPixelShaderCache::GetCacheFolder(CString& CacheFolder)
+{
+ CacheFolder = GetRenderersSettings().m_AdvRendSets.sShaderCachePath;
+
+ return !CacheFolder.IsEmpty() && (PathFileExists(CacheFolder) || (IsEnabled() && CreateDirectory(CacheFolder, nullptr)));
+}
+
+uint64_t CPixelShaderCache::Hash(LPCSTR pProfile, LPCSTR pSourceData, SIZE_T SourceDataSize) const
+{
+ return Hash(pProfile) + Hash(pSourceData) + (uint64_t)SourceDataSize;
+}
+
+uint64_t CPixelShaderCache::Hash(LPCSTR pStr) const
+{
+ uint64_t hash = 3074457345618258791ull;
+ LPCSTR p = pStr;
+
+ while (p && *p != 0) {
+ hash = (hash + *p) * 3074457345618258799ull;
+ ++p;
+ }
+ return hash;
+}
diff --git a/src/filters/renderer/VideoRenderers/PixelShaderCache.h b/src/filters/renderer/VideoRenderers/PixelShaderCache.h
new file mode 100644
index 000000000..37c9c020c
--- /dev/null
+++ b/src/filters/renderer/VideoRenderers/PixelShaderCache.h
@@ -0,0 +1,67 @@
+/*
+* (C) 2016 see Authors.txt
+*
+* This file is part of MPC-HC.
+*
+* MPC-HC 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.
+*
+* MPC-HC 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
+
+#include <cstdint>
+
+interface IDirect3DDevice9;
+interface IDirect3DPixelShader9;
+
+class CPixelShaderCache
+{
+ const unsigned int m_Version = 1;
+ const LONG m_CachedDaysLimit = 30;
+ const CString m_Extension = _T(".cso");
+
+ CComPtr<IDirect3DDevice9> m_pD3DDev;
+
+ CMap<uint64_t, uint64_t, CAutoVectorPtr<DWORD>, CAutoVectorPtr<DWORD>> m_PixelShaders;
+
+public:
+ CPixelShaderCache(IDirect3DDevice9* pD3DDev);
+
+ HRESULT CreatePixelShader(
+ LPCSTR pProfile,
+ LPCSTR pSourceData,
+ SIZE_T SourceDataSize,
+ IDirect3DPixelShader9** ppPixelShader);
+
+ void SavePixelShader(
+ LPCSTR pProfile,
+ LPCSTR pSourceData,
+ SIZE_T SourceDataSize,
+ void* pCompiledData,
+ SIZE_T CompiledDataSize);
+
+private:
+ void LoadCache();
+ static void DestroyCache();
+ static bool IsEnabled();
+ void TouchFile(const CString& FileName) const;
+ bool IsFileOutdated(const CString& FileName) const;
+ bool LoadCache(const CString& FileName, const CString& FilePath);
+ void DeleteCache(uint64_t Hash);
+ bool GetCacheFilePath(CString& CacheFilePath, uint64_t Hash) const;
+ static bool GetCacheFolder(CString& CacheFolder);
+
+ uint64_t Hash(LPCSTR pProfile, LPCSTR pSourceData, SIZE_T SourceDataSize) const;
+ uint64_t Hash(LPCSTR pStr) const;
+};
diff --git a/src/filters/renderer/VideoRenderers/PixelShaderCompiler.cpp b/src/filters/renderer/VideoRenderers/PixelShaderCompiler.cpp
index 0a3caaf96..164730b83 100644
--- a/src/filters/renderer/VideoRenderers/PixelShaderCompiler.cpp
+++ b/src/filters/renderer/VideoRenderers/PixelShaderCompiler.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -22,13 +22,14 @@
#include "stdafx.h"
#include "PixelShaderCompiler.h"
#include "../../../mpc-hc/resource.h"
-#include <share.h>
+#include <d3d9.h>
CPixelShaderCompiler::CPixelShaderCompiler(IDirect3DDevice9* pD3DDev, bool fStaySilent)
: m_hDll(nullptr)
, m_pD3DCompile(nullptr)
, m_pD3DDisassemble(nullptr)
, m_pD3DDev(pD3DDev)
+ , m_Cache(pD3DDev)
{
m_hDll = LoadLibrary(D3DCOMPILER_DLL);
@@ -120,6 +121,11 @@ HRESULT CPixelShaderCompiler::InternalCompile(
} else {
defProfileVal = "-1";
}
+
+ if (ppPixelShader && SUCCEEDED(m_Cache.CreatePixelShader(defProfileVal, pSrcData, SrcDataSize, ppPixelShader))) {
+ return S_OK;
+ }
+
D3D_SHADER_MACRO macros[] = { { defProfile, defProfileVal }, { 0 } };
CComPtr<ID3DBlob> pShaderBlob, pErrorBlob;
@@ -145,6 +151,9 @@ HRESULT CPixelShaderCompiler::InternalCompile(
if (FAILED(hr)) {
return hr;
}
+
+ m_Cache.SavePixelShader(defProfileVal, pSrcData, SrcDataSize,
+ (void*)pShaderBlob->GetBufferPointer(), pShaderBlob->GetBufferSize());
}
if (pDisasm) {
diff --git a/src/filters/renderer/VideoRenderers/PixelShaderCompiler.h b/src/filters/renderer/VideoRenderers/PixelShaderCompiler.h
index fe9bd0e46..5aab64950 100644
--- a/src/filters/renderer/VideoRenderers/PixelShaderCompiler.h
+++ b/src/filters/renderer/VideoRenderers/PixelShaderCompiler.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,7 +21,7 @@
#pragma once
-#include <d3d9.h>
+#include "PixelShaderCache.h"
#include <D3Dcompiler.h>
class CPixelShaderCompiler
@@ -33,6 +33,8 @@ class CPixelShaderCompiler
CComPtr<IDirect3DDevice9> m_pD3DDev;
+ CPixelShaderCache m_Cache;
+
HRESULT InternalCompile(
LPCSTR pSrcData,
SIZE_T SrcDataSize,
diff --git a/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.cpp
deleted file mode 100644
index fe149a963..000000000
--- a/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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 "QT7AllocatorPresenter.h"
-
-using namespace DSObjects;
-
-//
-// CQT7AllocatorPresenter
-//
-
-CQT7AllocatorPresenter::CQT7AllocatorPresenter(HWND hWnd, HRESULT& hr)
- : CDX7AllocatorPresenter(hWnd, hr)
-{
-}
-
-STDMETHODIMP CQT7AllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
-{
- CheckPointer(ppv, E_POINTER);
-
- return
- QI(IQTVideoSurface)
- __super::NonDelegatingQueryInterface(riid, ppv);
-}
-
-HRESULT CQT7AllocatorPresenter::AllocSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- CheckPointer(m_pDD, E_POINTER);
-
- m_pVideoSurfaceOff = nullptr;
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- ddsd.dwWidth = m_nativeVideoSize.cx;
- ddsd.dwHeight = m_nativeVideoSize.cy;
- ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
- ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
- ddsd.ddpfPixelFormat.dwRGBBitCount = 32;
- ddsd.ddpfPixelFormat.dwRGBAlphaBitMask = 0xFF000000;
- ddsd.ddpfPixelFormat.dwRBitMask = 0x00FF0000;
- ddsd.ddpfPixelFormat.dwGBitMask = 0x0000FF00;
- ddsd.ddpfPixelFormat.dwBBitMask = 0x000000FF;
-
- HRESULT hr = m_pDD->CreateSurface(&ddsd, &m_pVideoSurfaceOff, nullptr);
- if (FAILED(hr)) {
- return E_FAIL;
- }
-
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurfaceOff->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- return __super::AllocSurfaces();
-}
-
-void CQT7AllocatorPresenter::DeleteSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- m_pVideoSurfaceOff = nullptr;
-
- __super::DeleteSurfaces();
-}
-
-// IQTVideoSurface
-
-STDMETHODIMP CQT7AllocatorPresenter::BeginBlt(const BITMAP& bm)
-{
- CAutoLock cAutoLock(this);
-
- DeleteSurfaces();
-
- SetVideoSize(CSize(bm.bmWidth, abs(bm.bmHeight)));
-
- HRESULT hr;
- if (FAILED(hr = AllocSurfaces())) {
- return hr;
- }
-
- return S_OK;
-}
-
-STDMETHODIMP CQT7AllocatorPresenter::DoBlt(const BITMAP& bm)
-{
- if (!m_pVideoSurface || !m_pVideoSurfaceOff) {
- return E_FAIL;
- }
-
- bool fOk = false;
-
- DDSURFACEDESC2 ddsd;
- INITDDSTRUCT(ddsd);
- if (FAILED(m_pVideoSurfaceOff->GetSurfaceDesc(&ddsd))) {
- return E_FAIL;
- }
-
- UINT w = (UINT)bm.bmWidth;
- UINT h = abs(bm.bmHeight);
- int bpp = bm.bmBitsPixel;
-
- if ((bpp == 16 || bpp == 24 || bpp == 32) && w == ddsd.dwWidth && h == ddsd.dwHeight) {
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceOff->Lock(nullptr, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BitBltFromRGBToRGB(
- w, h,
- (BYTE*)ddsd.lpSurface, ddsd.lPitch, ddsd.ddpfPixelFormat.dwRGBBitCount,
- (BYTE*)bm.bmBits, bm.bmWidthBytes, bm.bmBitsPixel);
- m_pVideoSurfaceOff->Unlock(nullptr);
- fOk = true;
- }
- }
-
- if (!fOk) {
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurfaceOff->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- HDC hDC;
- if (SUCCEEDED(m_pVideoSurfaceOff->GetDC(&hDC))) {
- CString str;
- str.Format(_T("Sorry, this format is not supported"));
-
- SetBkColor(hDC, 0);
- SetTextColor(hDC, 0x404040);
- TextOut(hDC, 10, 10, str, str.GetLength());
-
- m_pVideoSurfaceOff->ReleaseDC(hDC);
- }
- }
-
- m_pVideoSurface->Blt(nullptr, m_pVideoSurfaceOff, nullptr, DDBLT_WAIT, nullptr);
-
- Paint(true);
-
- return S_OK;
-}
diff --git a/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.h
deleted file mode 100644
index 5760fcd76..000000000
--- a/src/filters/renderer/VideoRenderers/QT7AllocatorPresenter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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
-
-#include "DX7AllocatorPresenter.h"
-#include "IQTVideoSurface.h"
-
-namespace DSObjects
-{
-
- class CQT7AllocatorPresenter
- : public CDX7AllocatorPresenter
- , public IQTVideoSurface
- {
- CComPtr<IDirectDrawSurface7> m_pVideoSurfaceOff;
-
- protected:
- HRESULT AllocSurfaces();
- void DeleteSurfaces();
-
- public:
- CQT7AllocatorPresenter(HWND hWnd, HRESULT& hr);
-
- DECLARE_IUNKNOWN
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- // ISubPicAllocatorPresenter2
- STDMETHODIMP SetIsRendering(bool bIsRendering) {
- m_bIsRendering = bIsRendering;
- return S_OK;
- }
-
- // IQTVideoSurface
- STDMETHODIMP BeginBlt(const BITMAP& bm);
- STDMETHODIMP DoBlt(const BITMAP& bm);
- };
-
-}
diff --git a/src/filters/renderer/VideoRenderers/QT9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/QT9AllocatorPresenter.cpp
index e39af0c01..bd74d8d8d 100644
--- a/src/filters/renderer/VideoRenderers/QT9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/QT9AllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -20,6 +20,7 @@
#include "stdafx.h"
#include "QT9AllocatorPresenter.h"
+#include "../../../DSUtil/vd.h"
using namespace DSObjects;
diff --git a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp
deleted file mode 100644
index 98a943d5a..000000000
--- a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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 "RM7AllocatorPresenter.h"
-
-using namespace DSObjects;
-
-//
-// CRM7AllocatorPresenter
-//
-
-CRM7AllocatorPresenter::CRM7AllocatorPresenter(HWND hWnd, HRESULT& hr)
- : CDX7AllocatorPresenter(hWnd, hr)
-{
- ZeroMemory(&m_bitmapInfo, sizeof(m_bitmapInfo));
- ZeroMemory(&m_lastBitmapInfo, sizeof(m_lastBitmapInfo));
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
-{
- CheckPointer(ppv, E_POINTER);
-
- return
- QI2(IRMAVideoSurface)
- __super::NonDelegatingQueryInterface(riid, ppv);
-}
-
-HRESULT CRM7AllocatorPresenter::AllocSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- CheckPointer(m_pDD, E_POINTER);
-
- m_pVideoSurfaceOff = nullptr;
- m_pVideoSurfaceYUY2 = nullptr;
-
- DDSURFACEDESC2 ddsd;
- DDBLTFX fx;
-
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- ddsd.dwWidth = m_nativeVideoSize.cx;
- ddsd.dwHeight = m_nativeVideoSize.cy;
- ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
- ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB;
- ddsd.ddpfPixelFormat.dwRGBBitCount = 32;
- ddsd.ddpfPixelFormat.dwRGBAlphaBitMask = 0xFF000000;
- ddsd.ddpfPixelFormat.dwRBitMask = 0x00FF0000;
- ddsd.ddpfPixelFormat.dwGBitMask = 0x0000FF00;
- ddsd.ddpfPixelFormat.dwBBitMask = 0x000000FF;
-
- if (FAILED(m_pDD->CreateSurface(&ddsd, &m_pVideoSurfaceOff, nullptr))) {
- return E_FAIL;
- }
-
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurfaceOff->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- INITDDSTRUCT(ddsd);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
- ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- ddsd.dwWidth = m_nativeVideoSize.cx;
- ddsd.dwHeight = m_nativeVideoSize.cy;
- ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
- ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC;
- ddsd.ddpfPixelFormat.dwYUVBitCount = 16;
- ddsd.ddpfPixelFormat.dwFourCC = '2YUY';
-
- if (FAILED(m_pDD->CreateSurface(&ddsd, &m_pVideoSurfaceYUY2, nullptr)) ||
- FAILED(m_pVideoSurfaceOff->Blt(nullptr, m_pVideoSurfaceYUY2, nullptr, DDBLT_WAIT, nullptr))) {
- m_pVideoSurfaceYUY2 = nullptr;
- }
-
- if (m_pVideoSurfaceYUY2) {
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0x80108010;
- m_pVideoSurfaceYUY2->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
- }
-
- return __super::AllocSurfaces();
-}
-
-void CRM7AllocatorPresenter::DeleteSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- m_pVideoSurfaceOff = nullptr;
- m_pVideoSurfaceYUY2 = nullptr;
-
- __super::DeleteSurfaces();
-}
-
-// IRMAVideoSurface
-
-STDMETHODIMP CRM7AllocatorPresenter::Blt(UCHAR* pImageData, RMABitmapInfoHeader* pBitmapInfo, REF(PNxRect) inDestRect, REF(PNxRect) inSrcRect)
-{
- if (!m_pVideoSurface || !m_pVideoSurfaceOff) {
- return E_FAIL;
- }
-
- bool fRGB = false;
- bool fYUY2 = false;
-
- CRect src((RECT*)&inSrcRect), dst((RECT*)&inDestRect), src2(CPoint(0, 0), src.Size());
- if (src.Width() > dst.Width() || src.Height() > dst.Height()) {
- return E_FAIL;
- }
-
- DDSURFACEDESC2 ddsd;
-
- if (pBitmapInfo->biCompression == '024I') {
- DWORD pitch = pBitmapInfo->biWidth;
- DWORD size = pitch * abs(pBitmapInfo->biHeight);
-
- BYTE* y = pImageData + src.top * pitch + src.left;
- BYTE* u = pImageData + size + src.top * (pitch / 2) + src.left / 2;
- BYTE* v = pImageData + size + size / 4 + src.top * (pitch / 2) + src.left / 2;
-
- if (m_pVideoSurfaceYUY2) {
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceYUY2->Lock(src2, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BitBltFromI420ToYUY2(src.Width(), src.Height(), (BYTE*)ddsd.lpSurface, ddsd.lPitch, y, u, v, pitch);
- m_pVideoSurfaceYUY2->Unlock(src2);
- fYUY2 = true;
- }
- } else {
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceOff->Lock(src2, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BitBltFromI420ToRGB(src.Width(), src.Height(), (BYTE*)ddsd.lpSurface, ddsd.lPitch, ddsd.ddpfPixelFormat.dwRGBBitCount, y, u, v, pitch);
- m_pVideoSurfaceOff->Unlock(src2);
- fRGB = true;
- }
- }
- } else if (pBitmapInfo->biCompression == '2YUY') {
- DWORD w = pBitmapInfo->biWidth;
- DWORD h = abs(pBitmapInfo->biHeight);
- DWORD pitch = pBitmapInfo->biWidth * 2;
- UNREFERENCED_PARAMETER(w);
- UNREFERENCED_PARAMETER(h);
-
- BYTE* yvyu = pImageData + src.top * pitch + src.left * 2;
-
- if (m_pVideoSurfaceYUY2) {
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceYUY2->Lock(src2, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BitBltFromYUY2ToYUY2(src.Width(), src.Height(), (BYTE*)ddsd.lpSurface, ddsd.lPitch, yvyu, pitch);
- m_pVideoSurfaceYUY2->Unlock(src2);
- fYUY2 = true;
- }
- } else {
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceOff->Lock(src2, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BitBltFromYUY2ToRGB(src.Width(), src.Height(), (BYTE*)ddsd.lpSurface, ddsd.lPitch, ddsd.ddpfPixelFormat.dwRGBBitCount, yvyu, pitch);
- m_pVideoSurfaceOff->Unlock(src2);
- fRGB = true;
- }
- }
- } else if (pBitmapInfo->biCompression == 0 || pBitmapInfo->biCompression == 3
- || pBitmapInfo->biCompression == 'BGRA') {
- DWORD w = pBitmapInfo->biWidth;
- DWORD h = abs(pBitmapInfo->biHeight);
- DWORD pitch = pBitmapInfo->biWidth * pBitmapInfo->biBitCount >> 3;
- UNREFERENCED_PARAMETER(w);
- UNREFERENCED_PARAMETER(h);
-
- BYTE* rgb = pImageData + src.top * pitch + src.left * (pBitmapInfo->biBitCount >> 3);
-
- INITDDSTRUCT(ddsd);
- if (SUCCEEDED(m_pVideoSurfaceOff->Lock(src2, &ddsd, DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR | DDLOCK_WRITEONLY, nullptr))) {
- BYTE* lpSurface = (BYTE*)ddsd.lpSurface;
- if (pBitmapInfo->biHeight > 0) {
- lpSurface += ddsd.lPitch * (src.Height() - 1);
- ddsd.lPitch = -ddsd.lPitch;
- }
- BitBltFromRGBToRGB(src.Width(), src.Height(), lpSurface, ddsd.lPitch, ddsd.ddpfPixelFormat.dwRGBBitCount, rgb, pitch, pBitmapInfo->biBitCount);
- fRGB = true;
- m_pVideoSurfaceOff->Unlock(src2);
- }
- }
-
- if (!fRGB && !fYUY2) {
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurfaceOff->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- HDC hDC;
- if (SUCCEEDED(m_pVideoSurfaceOff->GetDC(&hDC))) {
- CString str;
- str.Format(_T("Sorry, this format is not supported"));
-
- SetBkColor(hDC, 0);
- SetTextColor(hDC, 0x404040);
- TextOut(hDC, 10, 10, str, str.GetLength());
-
- m_pVideoSurfaceOff->ReleaseDC(hDC);
-
- fRGB = true;
- }
- }
-
- if (fRGB) {
- m_pVideoSurface->Blt(dst, m_pVideoSurfaceOff, src2, DDBLT_WAIT, nullptr);
- }
- if (fYUY2) {
- m_pVideoSurface->Blt(dst, m_pVideoSurfaceYUY2, src2, DDBLT_WAIT, nullptr);
- }
-
- Paint(true);
-
- return PNR_OK;
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::BeginOptimizedBlt(RMABitmapInfoHeader* pBitmapInfo)
-{
- CAutoLock cAutoLock(this);
- DeleteSurfaces();
- SetVideoSize(CSize(pBitmapInfo->biWidth, abs(pBitmapInfo->biHeight)));
- if (FAILED(AllocSurfaces())) {
- return E_FAIL;
- }
- return PNR_NOTIMPL;
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::OptimizedBlt(UCHAR* pImageBits, REF(PNxRect) rDestRect, REF(PNxRect) rSrcRect)
-{
- return PNR_NOTIMPL;
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::EndOptimizedBlt()
-{
- return PNR_NOTIMPL;
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::GetOptimizedFormat(REF(RMA_COMPRESSION_TYPE) ulType)
-{
- return PNR_NOTIMPL;
-}
-
-STDMETHODIMP CRM7AllocatorPresenter::GetPreferredFormat(REF(RMA_COMPRESSION_TYPE) ulType)
-{
- ulType = RMA_I420;
- return PNR_OK;
-}
diff --git a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.h
deleted file mode 100644
index 14627fab6..000000000
--- a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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
-
-#include "DX7AllocatorPresenter.h"
-#include "realmedia/pntypes.h"
-#include "realmedia/pnwintyp.h"
-#include "realmedia/pncom.h"
-#include "realmedia/rmavsurf.h"
-
-namespace DSObjects
-{
-
- class CRM7AllocatorPresenter
- : public CDX7AllocatorPresenter
- , public IRMAVideoSurface
- {
- CComPtr<IDirectDrawSurface7> m_pVideoSurfaceOff;
- CComPtr<IDirectDrawSurface7> m_pVideoSurfaceYUY2;
-
- RMABitmapInfoHeader m_bitmapInfo;
- RMABitmapInfoHeader m_lastBitmapInfo;
-
- protected:
- HRESULT AllocSurfaces();
- void DeleteSurfaces();
-
- public:
- CRM7AllocatorPresenter(HWND hWnd, HRESULT& hr);
-
- DECLARE_IUNKNOWN
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- // ISubPicAllocatorPresenter2
- STDMETHODIMP SetIsRendering(bool bIsRendering) {
- m_bIsRendering = bIsRendering;
- return S_OK;
- }
-
- // IRMAVideoSurface
- STDMETHODIMP Blt(UCHAR* pImageData, RMABitmapInfoHeader* pBitmapInfo, REF(PNxRect) inDestRect, REF(PNxRect) inSrcRect);
- STDMETHODIMP BeginOptimizedBlt(RMABitmapInfoHeader* pBitmapInfo);
- STDMETHODIMP OptimizedBlt(UCHAR* pImageBits, REF(PNxRect) rDestRect, REF(PNxRect) rSrcRect);
- STDMETHODIMP EndOptimizedBlt();
- STDMETHODIMP GetOptimizedFormat(REF(RMA_COMPRESSION_TYPE) ulType);
- STDMETHODIMP GetPreferredFormat(REF(RMA_COMPRESSION_TYPE) ulType);
- };
-
-}
diff --git a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp
index b3c1ead15..7f80106b9 100644
--- a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -20,6 +20,7 @@
#include "stdafx.h"
#include "RM9AllocatorPresenter.h"
+#include "../../../DSUtil/vd.h"
using namespace DSObjects;
diff --git a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.h
index 35dc040cc..dac5c7b76 100644
--- a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.h
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -21,11 +21,9 @@
#pragma once
#include "DX9AllocatorPresenter.h"
-#include "realmedia/pntypes.h"
-#include "realmedia/pnwintyp.h"
#include "realmedia/pncom.h"
+#include "realmedia/pnwintyp.h"
#include "realmedia/rmavsurf.h"
-#include "IQTVideoSurface.h"
namespace DSObjects
{
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
index 461eb5175..1866d029b 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -24,7 +24,6 @@
#include "../../../mpc-hc/AppSettings.h"
#include "../../../mpc-hc/mplayerc.h"
#include "../../../DSUtil/SysVersion.h"
-#include "version.h"
#include <d3dx9.h>
void CRenderersSettings::UpdateData(bool fSave)
@@ -61,6 +60,7 @@ void CRenderersSettings::CAdvRendererSettings::SetDefault()
fCycleDelta = 0.0012;
fTargetSyncOffset = 12.0;
fControlLimit = 2.0;
+ bCacheShaders = false;
}
void CRenderersSettings::CAdvRendererSettings::SetOptimal()
@@ -92,6 +92,7 @@ void CRenderersSettings::CAdvRendererSettings::SetOptimal()
fCycleDelta = 0.0012;
fTargetSyncOffset = 12.0;
fControlLimit = 2.0;
+ bCacheShaders = false;
}
/////////////////////////////////////////////////////////////////////////////
@@ -99,7 +100,7 @@ void CRenderersSettings::CAdvRendererSettings::SetOptimal()
CRenderersData::CRenderersData()
: m_hD3DX9Dll(nullptr)
- , m_nDXSdkRelease(0)
+ , m_nDXSdkRelease(D3DX_SDK_VERSION)
, m_bTearingTest(false)
, m_iDisplayStats(0)
, m_bResetStats(false)
@@ -121,22 +122,11 @@ LONGLONG CRenderersData::GetPerfCounter() const
HINSTANCE CRenderersData::GetD3X9Dll()
{
-#if D3DX_SDK_VERSION < MPC_DX_SDK_NUMBER
-#pragma message("ERROR: DirectX SDK " MPC_DX_SDK_MONTH " " MAKE_STR(MPC_DX_SDK_YEAR) " (v" MAKE_STR(MPC_DX_SDK_NUMBER) ") or newer is required to build MPC-HC")
-#endif
-
+ // D3DX9 v43 is the latest available and will not get any update. We support only this specific version.
+ static_assert(D3DX_SDK_VERSION == 43, "Different D3DX9 version?");
if (m_hD3DX9Dll == nullptr) {
- m_nDXSdkRelease = 0;
-
- // load latest compatible version of the DLL that is available
- for (UINT i = D3DX_SDK_VERSION; i >= MPC_DX_SDK_NUMBER; i--) {
- m_strD3DX9Version.Format(_T("d3dx9_%u.dll"), i);
- m_hD3DX9Dll = LoadLibrary(m_strD3DX9Version);
- if (m_hD3DX9Dll) {
- m_nDXSdkRelease = i;
- break;
- }
- }
+ m_strD3DX9Version.Format(_T("d3dx9_%u.dll"), D3DX_SDK_VERSION);
+ m_hD3DX9Dll = LoadLibrary(m_strD3DX9Version);
}
return m_hD3DX9Dll;
diff --git a/src/filters/renderer/VideoRenderers/RenderersSettings.h b/src/filters/renderer/VideoRenderers/RenderersSettings.h
index 9f658cba4..8a74fe118 100644
--- a/src/filters/renderer/VideoRenderers/RenderersSettings.h
+++ b/src/filters/renderer/VideoRenderers/RenderersSettings.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -32,14 +32,12 @@ enum {
enum {
VIDRNDT_RM_DEFAULT,
- VIDRNDT_RM_DX7,
- VIDRNDT_RM_DX9
+ VIDRNDT_RM_DX9 = 2
};
enum {
VIDRNDT_QT_DEFAULT,
- VIDRNDT_QT_DX7,
- VIDRNDT_QT_DX9
+ VIDRNDT_QT_DX9 = 2
};
enum {
@@ -111,6 +109,10 @@ public:
double fTargetSyncOffset;
double fControlLimit;
+ // Other settings
+ bool bCacheShaders;
+ CString sShaderCachePath;
+
void SetDefault();
void SetOptimal();
};
@@ -132,7 +134,7 @@ public:
class CRenderersData
{
HINSTANCE m_hD3DX9Dll;
- UINT m_nDXSdkRelease;
+ const UINT m_nDXSdkRelease;
LARGE_INTEGER llPerfFrequency;
public:
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
index ecb328db6..f688ac6e0 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2010-2015 see Authors.txt
+ * (C) 2010-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -28,12 +28,10 @@
#include "../../../DSUtil/WinAPIUtils.h"
#include <strsafe.h> // Required in CGenlock
#include <videoacc.h>
-#include <InitGuid.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <vmr9.h>
#include <evr.h>
-#include <mfapi.h>
#include <Mferror.h>
#include <vector>
#include "../../../SubPic/DX9SubPic.h"
@@ -42,10 +40,22 @@
#include "MacrovisionKicker.h"
#include "IPinHook.h"
#include "PixelShaderCompiler.h"
-#include "SyncRenderer.h"
-#include "version.h"
#include "FocusThread.h"
#include "../../../DSUtil/ArrayUtils.h"
+#include "../../../DSUtil/SysVersion.h"
+#include "../../../DSUtil/vd.h"
+#include <mpc-hc_config.h>
+
+#include <initguid.h>
+#include <mfapi.h>
+#include "SyncRenderer.h"
+
+#define REFERENCE_WIDTH 1920
+#define FONT_HEIGHT 21
+#define BOLD_THRESHOLD 11
+#define TEXT_PADDING 2
+#define GRAPH_HEIGHT 360
+#define GRAPH_WIDTH 1000
// only for debugging
//#define DISABLE_USING_D3D9EX
@@ -213,19 +223,17 @@ CBaseAP::~CBaseAP()
m_pFont = nullptr;
m_pLine = nullptr;
+ m_pSprite = nullptr;
+ m_pOSDTexture = nullptr;
+ m_pOSDSurface = nullptr;
m_pD3DDev = nullptr;
m_pD3DDevEx = nullptr;
m_pPSC.Free();
m_pD3D = nullptr;
m_pD3DEx = nullptr;
- if (m_hDWMAPI) {
- FreeLibrary(m_hDWMAPI);
- m_hDWMAPI = nullptr;
- }
- if (m_hD3D9) {
- FreeLibrary(m_hD3D9);
- m_hD3D9 = nullptr;
- }
+ m_pSubPicQueue = nullptr;
+ m_pAllocator = nullptr;
+
m_pAudioStats = nullptr;
SAFE_DELETE(m_pGenlock);
@@ -236,6 +244,15 @@ CBaseAP::~CBaseAP()
TerminateThread(m_FocusThread->m_hThread, 0xDEAD);
}
}
+
+ if (m_hDWMAPI) {
+ FreeLibrary(m_hDWMAPI);
+ m_hDWMAPI = nullptr;
+ }
+ if (m_hD3D9) {
+ FreeLibrary(m_hD3D9);
+ m_hD3D9 = nullptr;
+ }
}
template<int texcoords>
@@ -462,7 +479,8 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
D3DDISPLAYMODE d3ddm;
ZeroMemory(&d3ddm, sizeof(d3ddm));
- if (FAILED(m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm))) {
+ if (FAILED(m_pD3D->GetAdapterDisplayMode(m_CurrentAdapter, &d3ddm))
+ || d3ddm.Width <= 0 || d3ddm.Height <= 0) {
_Error += L"Can not retrieve display mode data\n";
return E_UNEXPECTED;
}
@@ -683,20 +701,6 @@ HRESULT CBaseAP::CreateDXDevice(CString& _Error)
m_pSubPicQueue->SetSubPicProvider(pSubPicProvider);
}
- if (m_pD3DXCreateFont) {
- LONG MinSize = 1600;
- LONG CurrentSize = std::min(m_ScreenSize.cx, MinSize);
- double Scale = double(CurrentSize) / double(MinSize);
- m_TextScale = Scale;
- m_pD3DXCreateFont(m_pD3DDev, (int)(-24.0 * Scale), (UINT)(-11.0 * Scale), CurrentSize < 800 ? FW_NORMAL : FW_BOLD, 0, FALSE,
- DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FIXED_PITCH | FF_DONTCARE, L"Lucida Console", &m_pFont);
- }
- if (m_pD3DXCreateSprite) {
- m_pD3DXCreateSprite(m_pD3DDev, &m_pSprite);
- }
- if (m_pD3DXCreateLine) {
- m_pD3DXCreateLine(m_pD3DDev, &m_pLine);
- }
m_LastAdapterCheck = GetRenderersData()->GetPerfCounter();
return S_OK;
}
@@ -774,7 +778,8 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
D3DDISPLAYMODE d3ddm;
ZeroMemory(&d3ddm, sizeof(d3ddm));
- if (FAILED(m_pD3D->GetAdapterDisplayMode(GetAdapter(m_pD3D, m_hWnd), &d3ddm))) {
+ if (FAILED(m_pD3D->GetAdapterDisplayMode(GetAdapter(m_pD3D, m_hWnd), &d3ddm))
+ || d3ddm.Width <= 0 || d3ddm.Height <= 0) {
_Error += L"Can not retrieve display mode data\n";
return E_UNEXPECTED;
}
@@ -913,22 +918,9 @@ HRESULT CBaseAP::ResetDXDevice(CString& _Error)
}
m_pFont = nullptr;
- if (m_pD3DXCreateFont) {
- LONG MinSize = 1600;
- LONG CurrentSize = std::min(m_ScreenSize.cx, MinSize);
- double Scale = double(CurrentSize) / double(MinSize);
- m_TextScale = Scale;
- m_pD3DXCreateFont(m_pD3DDev, (int)(-24.0 * Scale), (UINT)(-11.0 * Scale), CurrentSize < 800 ? FW_NORMAL : FW_BOLD, 0, FALSE,
- DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FIXED_PITCH | FF_DONTCARE, L"Lucida Console", &m_pFont);
- }
m_pSprite = nullptr;
- if (m_pD3DXCreateSprite) {
- m_pD3DXCreateSprite(m_pD3DDev, &m_pSprite);
- }
m_pLine = nullptr;
- if (m_pD3DXCreateLine) {
- m_pD3DXCreateLine(m_pD3DDev, &m_pLine);
- }
+
return S_OK;
}
@@ -1946,70 +1938,97 @@ STDMETHODIMP_(bool) CBaseAP::DisplayChange()
return true;
}
-void CBaseAP::DrawText(const RECT& rc, const CString& strText, int _Priority)
+void CBaseAP::InitStats()
{
- if (_Priority < 1) {
- return;
+ ASSERT(m_pD3DDev);
+ static LONG currentHeight = 0;
+ int newHeight = lround(FONT_HEIGHT * (double(m_windowRect.Width()) / REFERENCE_WIDTH));
+
+ if (m_pD3DXCreateFont && (!m_pFont || currentHeight != newHeight)) {
+ m_pFont = nullptr;
+ if (newHeight <= 0) {
+ ASSERT(FALSE);
+ }
+ m_pD3DXCreateFont(m_pD3DDev, newHeight, 0, newHeight < BOLD_THRESHOLD ? FW_NORMAL : FW_BOLD,
+ 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
+ SysVersion::IsXPOrLater() ? CLEARTYPE_NATURAL_QUALITY : ANTIALIASED_QUALITY,
+ FIXED_PITCH | FF_DONTCARE, L"Lucida Console", &m_pFont);
+ currentHeight = newHeight;
}
- D3DXCOLOR Color1(1.0f, 0.2f, 0.2f, 1.0f);
- D3DXCOLOR Color0(0.0f, 0.0f, 0.0f, 1.0f);
- RECT Rect1 = rc;
- RECT Rect2 = rc;
- OffsetRect(&Rect2, 2, 2);
+ if (m_pD3DXCreateSprite && !m_pSprite) {
+ m_pD3DXCreateSprite(m_pD3DDev, &m_pSprite);
+ }
- // Draw shadow
- m_pFont->DrawText(m_pSprite, strText, -1, &Rect2, DT_NOCLIP, Color0);
- // Draw text
- m_pFont->DrawText(m_pSprite, strText, -1, &Rect1, DT_NOCLIP, Color1);
+ if (m_pD3DXCreateLine && !m_pLine) {
+ m_pD3DXCreateLine(m_pD3DDev, &m_pLine);
+ }
}
void CBaseAP::DrawStats()
{
- const CRenderersSettings& r = GetRenderersSettings();
const CRenderersData* rd = GetRenderersData();
- LONGLONG llMaxJitter = m_MaxJitter;
- LONGLONG llMinJitter = m_MinJitter;
+ InitStats();
+ const float textScale = float(m_windowRect.Width()) / REFERENCE_WIDTH;
+ const int lineHeight = lround((FONT_HEIGHT + TEXT_PADDING) * textScale);
- RECT rc = {20, 20, 520, 520 };
// pApp->m_iDisplayStats = 1 for full stats, 2 for little less, 3 for basic, 0 for no stats
if (m_pFont && m_pSprite) {
+ auto drawText = [&](CRect & rc, const CString & strText) {
+ D3DXCOLOR Color1(1.0f, 0.2f, 0.2f, 1.0f);
+ D3DXCOLOR Color0(0.0f, 0.0f, 0.0f, 1.0f);
+
+ RECT shadowRect = rc;
+ OffsetRect(&shadowRect, 2, 2);
+
+ // Draw shadow
+ m_pFont->DrawText(m_pSprite, strText, -1, &shadowRect, DT_NOCLIP, Color0);
+ // Draw text
+ m_pFont->DrawText(m_pSprite, strText, -1, rc, DT_NOCLIP, Color1);
+ rc.OffsetRect(0, lineHeight);
+ };
+
+ const CRenderersSettings& r = GetRenderersSettings();
+ LONGLONG llMaxJitter = m_MaxJitter;
+ LONGLONG llMinJitter = m_MinJitter;
+ CRect rc(lineHeight, lineHeight, 0, 0);
+
m_pSprite->Begin(D3DXSPRITE_ALPHABLEND);
CString strText;
- int TextHeight = (int)(25.0 * m_TextScale + 0.5);
- strText.Format(L"Frames drawn from stream start: %u | Sample time stamp: %ld ms", m_pcFramesDrawn, (LONG)(m_llSampleTime / 10000));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Frames drawn from stream start: %u | Sample time stamp: %ld ms"),
+ m_pcFramesDrawn, (LONG)(m_llSampleTime / 10000));
+ drawText(rc, strText);
if (rd->m_iDisplayStats == 1) {
- strText.Format(L"Frame cycle : %.3f ms [%.3f ms, %.3f ms] Actual %+5.3f ms [%+.3f ms, %+.3f ms]", m_dFrameCycle, m_pGenlock->minFrameCycle, m_pGenlock->maxFrameCycle, m_fJitterMean / 10000.0, (double(llMinJitter) / 10000.0), (double(llMaxJitter) / 10000.0));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Frame cycle : %.3f ms [%.3f ms, %.3f ms] Actual %+5.3f ms [%+.3f ms, %+.3f ms]"),
+ m_dFrameCycle, m_pGenlock->minFrameCycle, m_pGenlock->maxFrameCycle,
+ m_fJitterMean / 10000.0, (double(llMinJitter) / 10000.0),
+ (double(llMaxJitter) / 10000.0));
+ drawText(rc, strText);
- strText.Format(L"Display cycle: Measured closest match %.3f ms Measured base %.3f ms", m_dOptimumDisplayCycle, m_dEstRefreshCycle);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Display cycle: Measured closest match %.3f ms Measured base %.3f ms"),
+ m_dOptimumDisplayCycle, m_dEstRefreshCycle);
+ drawText(rc, strText);
- strText.Format(L"Frame rate : %.3f fps Actual frame rate: %.3f fps", 1000.0 / m_dFrameCycle, 10000000.0 / m_fJitterMean);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Frame rate : %.3f fps Actual frame rate: %.3f fps"),
+ 1000.0 / m_dFrameCycle, 10000000.0 / m_fJitterMean);
+ drawText(rc, strText);
- strText.Format(L"Windows : Display cycle %.3f ms Display refresh rate %u Hz", m_dD3DRefreshCycle, m_refreshRate);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Windows : Display cycle %.3f ms Display refresh rate %u Hz"),
+ m_dD3DRefreshCycle, m_refreshRate);
+ drawText(rc, strText);
if (m_pGenlock->powerstripTimingExists) {
- strText.Format(L"Powerstrip : Display cycle %.3f ms Display refresh rate %.3f Hz", 1000.0 / m_pGenlock->curDisplayFreq, m_pGenlock->curDisplayFreq);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Powerstrip : Display cycle %.3f ms Display refresh rate %.3f Hz"),
+ 1000.0 / m_pGenlock->curDisplayFreq, m_pGenlock->curDisplayFreq);
+ drawText(rc, strText);
}
if ((m_caps.Caps & D3DCAPS_READ_SCANLINE) == 0) {
- strText = L"Scan line err: Graphics device does not support scan line access. No sync is possible";
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText = _T("Scan line err: Graphics device does not support scan line access. No sync is possible");
+ drawText(rc, strText);
}
#ifdef _DEBUG
@@ -2021,175 +2040,184 @@ void CBaseAP::DrawStats()
D3DPRESENTSTATS stats;
hr = pSCEx->GetPresentStats(&stats);
if (SUCCEEDED(hr)) {
- strText = L"Graphics device present stats:";
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText = _T("Graphics device present stats:");
+ drawText(rc, strText);
- strText.Format(L" PresentCount %u PresentRefreshCount %u SyncRefreshCount %u",
+ strText.Format(_T(" PresentCount %u PresentRefreshCount %u SyncRefreshCount %u"),
stats.PresentCount, stats.PresentRefreshCount, stats.SyncRefreshCount);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
LARGE_INTEGER Freq;
QueryPerformanceFrequency(&Freq);
Freq.QuadPart /= 1000;
- strText.Format(L" SyncQPCTime %dms SyncGPUTime %dms",
- stats.SyncQPCTime.QuadPart / Freq.QuadPart, stats.SyncGPUTime.QuadPart / Freq.QuadPart);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T(" SyncQPCTime %dms SyncGPUTime %dms"),
+ stats.SyncQPCTime.QuadPart / Freq.QuadPart,
+ stats.SyncGPUTime.QuadPart / Freq.QuadPart);
+ drawText(rc, strText);
} else {
strText = L"Graphics device does not support present stats";
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
}
}
}
#endif
- strText.Format(L"Video size : %ld x %ld (AR = %ld : %ld) Display resolution %ld x %ld ", m_nativeVideoSize.cx, m_nativeVideoSize.cy, m_aspectRatio.cx, m_aspectRatio.cy, m_ScreenSize.cx, m_ScreenSize.cy);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Video size : %ld x %ld (AR = %ld : %ld) Display resolution %ld x %ld "),
+ m_nativeVideoSize.cx, m_nativeVideoSize.cy, m_aspectRatio.cx, m_aspectRatio.cy,
+ m_ScreenSize.cx, m_ScreenSize.cy);
+ drawText(rc, strText);
if (r.m_AdvRendSets.bSynchronizeDisplay || r.m_AdvRendSets.bSynchronizeVideo) {
if (r.m_AdvRendSets.bSynchronizeDisplay && !m_pGenlock->PowerstripRunning()) {
- strText = L"Sync error : PowerStrip is not running. No display sync is possible.";
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText = _T("Sync error : PowerStrip is not running. No display sync is possible.");
+ drawText(rc, strText);
} else {
- strText.Format(L"Sync adjust : %d | # of adjustments: %u", m_pGenlock->adjDelta, (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Sync adjust : %d | # of adjustments: %u"),
+ m_pGenlock->adjDelta,
+ (m_pGenlock->clockAdjustmentsMade + m_pGenlock->displayAdjustmentsMade) / 2);
+ drawText(rc, strText);
}
}
}
- strText.Format(L"Sync offset : Average %3.1f ms [%.1f ms, %.1f ms] Target %3.1f ms", m_pGenlock->syncOffsetAvg, m_pGenlock->minSyncOffset, m_pGenlock->maxSyncOffset, r.m_AdvRendSets.fTargetSyncOffset);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Sync offset : Average %3.1f ms [%.1f ms, %.1f ms] Target %3.1f ms"),
+ m_pGenlock->syncOffsetAvg, m_pGenlock->minSyncOffset,
+ m_pGenlock->maxSyncOffset, r.m_AdvRendSets.fTargetSyncOffset);
+ drawText(rc, strText);
- strText.Format(L"Sync status : glitches %u, display-frame cycle mismatch: %7.3f %%, dropped frames %u", m_uSyncGlitches, 100 * m_dCycleDifference, m_pcFramesDropped);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Sync status : glitches %u, display-frame cycle mismatch: %7.3f %%, dropped frames %u"),
+ m_uSyncGlitches, 100 * m_dCycleDifference, m_pcFramesDropped);
+ drawText(rc, strText);
if (rd->m_iDisplayStats == 1) {
if (m_pAudioStats && r.m_AdvRendSets.bSynchronizeVideo) {
- strText.Format(L"Audio lag : %3lu ms [%ld ms, %ld ms] | %s", m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax, (m_lAudioSlaveMode == 4) ? _T("Audio renderer is matching rate (for analog sound output)") : _T("Audio renderer is not matching rate"));
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Audio lag : %3lu ms [%ld ms, %ld ms] | %s"),
+ m_lAudioLag, m_lAudioLagMin, m_lAudioLagMax,
+ (m_lAudioSlaveMode == 4) ?
+ _T("Audio renderer is matching rate (for analog sound output)") :
+ _T("Audio renderer is not matching rate"));
+ drawText(rc, strText);
}
- strText.Format(L"Sample time : waiting %3ld ms", m_lNextSampleWait);
+ strText.Format(_T("Sample time : waiting %3ld ms"), m_lNextSampleWait);
if (r.m_AdvRendSets.bSynchronizeNearest) {
CString temp;
- temp.Format(L" paint time correction: %3ld ms Hysteresis: %I64d", m_lShiftToNearest, m_llHysteresis / 10000);
+ temp.Format(_T(" paint time correction: %3ld ms Hysteresis: %I64d"),
+ m_lShiftToNearest, m_llHysteresis / 10000);
strText += temp;
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
- strText.Format(L"Buffering : Buffered %3ld Free %3d Current Surface %3d", m_nUsedBuffer, m_nDXSurface - m_nUsedBuffer, m_nCurSurface);
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ strText.Format(_T("Buffering : Buffered %3ld Free %3ld Current Surface %3d"),
+ m_nUsedBuffer, m_nDXSurface - m_nUsedBuffer, m_nCurSurface);
+ drawText(rc, strText);
- strText = L"Settings : ";
+ strText = _T("Settings : ");
if (m_bIsFullscreen) {
- strText += "D3DFS ";
+ strText += _T("D3DFS ");
}
if (r.m_AdvRendSets.bVMRDisableDesktopComposition) {
- strText += "DisDC ";
+ strText += _T("DisDC ");
}
if (r.m_AdvRendSets.bSynchronizeVideo) {
- strText += "SyncVideo ";
+ strText += _T("SyncVideo ");
}
if (r.m_AdvRendSets.bSynchronizeDisplay) {
- strText += "SyncDisplay ";
+ strText += _T("SyncDisplay ");
}
if (r.m_AdvRendSets.bSynchronizeNearest) {
- strText += "SyncNearest ";
+ strText += _T("SyncNearest ");
}
if (m_bHighColorResolution) {
- strText += "10 bit ";
+ strText += _T("10 bit ");
}
if (r.m_AdvRendSets.iEVROutputRange == 0) {
- strText += "0-255 ";
+ strText += _T("0-255 ");
} else if (r.m_AdvRendSets.iEVROutputRange == 1) {
- strText += "16-235 ";
+ strText += _T("16-235 ");
}
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
-
- DrawText(rc, rd->m_strDXVAInfo, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
+ drawText(rc, rd->m_strDXVAInfo);
strText.Format(L"DirectX SDK : %u", rd->GetDXSdkRelease());
- DrawText(rc, strText, 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, strText);
for (int i = 0; i < 6; i++) {
if (m_strStatsMsg[i][0]) {
- DrawText(rc, m_strStatsMsg[i], 1);
- OffsetRect(&rc, 0, TextHeight);
+ drawText(rc, m_strStatsMsg[i]);
}
}
}
- OffsetRect(&rc, 0, TextHeight); // Extra "line feed"
m_pSprite->End();
}
if (m_pLine && (rd->m_iDisplayStats < 3)) {
- D3DXVECTOR2 Points[NB_JITTER];
- int nIndex;
-
- int DrawWidth = 625;
- int DrawHeight = 250;
- int Alpha = 80;
- int StartX = m_windowRect.Width() - (DrawWidth + 20);
- int StartY = m_windowRect.Height() - (DrawHeight + 20);
-
- DrawRect(RGB(0, 0, 0), Alpha, CRect(StartX, StartY, StartX + DrawWidth, StartY + DrawHeight));
- m_pLine->SetWidth(2.5);
- m_pLine->SetAntialias(1);
+ D3DXVECTOR2 points[NB_JITTER];
+ const float graphWidth = GRAPH_WIDTH * textScale;
+ const float graphHeight = GRAPH_HEIGHT * textScale;
+ const float topLeftX = m_windowRect.Width() - (graphWidth + lineHeight);
+ const float topLeftY = m_windowRect.Height() - (graphHeight + lineHeight);
+ const float gridStepY = graphHeight / 24.0f;
+ const float gridStepX = graphWidth / NB_JITTER;
+
+ // Draw background
+ DrawRect(RGB(0, 0, 0), 80, CRect(int(topLeftX),
+ int(topLeftY),
+ int(topLeftX + graphWidth),
+ int(topLeftY + graphHeight)));
+
+ m_pLine->SetWidth(2.5f * textScale);
+ m_pLine->SetAntialias(TRUE);
m_pLine->Begin();
- for (int i = 0; i <= DrawHeight; i += 5) {
- Points[0].x = (float)StartX;
- Points[0].y = (float)(StartY + i);
- Points[1].x = (float)(StartX + (((i + 25) % 25) ? 50 : 625));
- Points[1].y = (float)(StartY + i);
- m_pLine->Draw(Points, 2, D3DCOLOR_XRGB(100, 100, 255));
- }
-
- for (int i = 0; i < DrawWidth; i += 125) { // Every 25:th sample
- Points[0].x = (float)(StartX + i);
- Points[0].y = (float)(StartY + DrawHeight / 2);
- Points[1].x = (float)(StartX + i);
- Points[1].y = (float)(StartY + DrawHeight / 2 + 10);
- m_pLine->Draw(Points, 2, D3DCOLOR_XRGB(100, 100, 255));
+ // Draw grid lines
+ for (int i = 1; i < 24; ++i) {
+ points[0].x = topLeftX;
+ points[0].y = topLeftY + i * gridStepY;
+ points[1].y = points[0].y;
+
+ float lineLength;
+ D3DCOLOR color;
+ if (i % 12 == 0) {
+ lineLength = 1.0f;
+ color = D3DCOLOR_XRGB(100, 100, 255);
+ } else if (i % 4 == 0) {
+ lineLength = 0.96f;
+ color = D3DCOLOR_XRGB(100, 100, 180);
+ } else {
+ lineLength = 0.04f;
+ color = D3DCOLOR_XRGB(100, 100, 140);
+ }
+ points[1].x = topLeftX + graphWidth * lineLength;
+ m_pLine->Draw(points, 2, color);
}
- for (int i = 0; i < NB_JITTER; i++) {
- nIndex = (m_nNextJitter + 1 + i) % NB_JITTER;
+ // Draw jitter
+ for (int i = 1; i <= NB_JITTER; ++i) {
+ int nIndex = (m_nNextJitter + i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
+ ASSERT(FALSE);
}
- double Jitter = m_pllJitter[nIndex] - m_fJitterMean;
- Points[i].x = (float)(StartX + (i * 5));
- Points[i].y = (float)(StartY + (Jitter / 2000.0 + 125.0));
+ float jitter = float(m_pllJitter[nIndex] - m_fJitterMean);
+ points[i - 1].x = topLeftX + i * gridStepX;
+ points[i - 1].y = topLeftY + (jitter * textScale / 2000.0f + graphHeight / 2.0f);
}
- m_pLine->Draw(Points, NB_JITTER, D3DCOLOR_XRGB(255, 100, 100));
+ m_pLine->Draw(points, NB_JITTER, D3DCOLOR_XRGB(255, 100, 100));
if (rd->m_iDisplayStats == 1) { // Full on-screen statistics
- for (int i = 0; i < NB_JITTER; i++) {
- nIndex = (m_nNextSyncOffset + 1 + i) % NB_JITTER;
+ // Draw sync offset
+ for (int i = 1; i <= NB_JITTER; ++i) {
+ int nIndex = (m_nNextSyncOffset + i) % NB_JITTER;
if (nIndex < 0) {
nIndex += NB_JITTER;
}
- Points[i].x = (float)(StartX + (i * 5));
- Points[i].y = (float)(StartY + ((m_pllSyncOffset[nIndex]) / 2000 + 125));
+ points[i - 1].x = topLeftX + i * gridStepX;
+ points[i - 1].y = topLeftY + (m_pllSyncOffset[nIndex] * textScale / 2000.0f + graphHeight / 2.0f);
}
- m_pLine->Draw(Points, NB_JITTER, D3DCOLOR_XRGB(100, 200, 100));
+ m_pLine->Draw(points, NB_JITTER, D3DCOLOR_XRGB(100, 200, 100));
}
m_pLine->End();
}
@@ -2343,22 +2371,11 @@ STDMETHODIMP CBaseAP::GetDIB(BYTE* lpDib, DWORD* size)
}
}
- BITMAPINFOHEADER* bih = (BITMAPINFOHEADER*)lpDib;
- ZeroMemory(bih, sizeof(BITMAPINFOHEADER));
- bih->biSize = sizeof(BITMAPINFOHEADER);
- bih->biWidth = desc.Width;
- bih->biHeight = desc.Height;
- bih->biBitCount = 32;
- bih->biPlanes = 1;
- bih->biSizeImage = bih->biWidth * bih->biHeight * bih->biBitCount >> 3;
-
- BitBltFromRGBToRGB(bih->biWidth, bih->biHeight,
- (BYTE*)(bih + 1), bih->biWidth * bih->biBitCount >> 3, bih->biBitCount,
- (BYTE*)r.pBits + r.Pitch * (desc.Height - 1), -(int)r.Pitch, 32);
+ hr = CreateDIBFromSurfaceData(desc, r, lpDib);
pSurface->UnlockRect();
- return S_OK;
+ return hr;
}
STDMETHODIMP CBaseAP::SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget)
@@ -2428,13 +2445,13 @@ CSyncAP::CSyncAP(HWND hWnd, bool bFullscreen, HRESULT& hr, CString& _Error)
, m_nResetToken(0)
, m_nStepCount(0)
, m_SampleFreeCallback(this, &CSyncAP::OnSampleFree)
- , fnDXVA2CreateDirect3DDeviceManager9("dxva2.dll", "DXVA2CreateDirect3DDeviceManager9")
- , fnMFCreateDXSurfaceBuffer("evr.dll", "MFCreateDXSurfaceBuffer")
- , fnMFCreateVideoSampleFromSurface("evr.dll", "MFCreateVideoSampleFromSurface")
- , fnMFCreateMediaType("mfplat.dll", "MFCreateMediaType")
- , fnAvSetMmThreadCharacteristicsW("avrt.dll", "AvSetMmThreadCharacteristicsW")
- , fnAvSetMmThreadPriority("avrt.dll", "AvSetMmThreadPriority")
- , fnAvRevertMmThreadCharacteristics("avrt.dll", "AvRevertMmThreadCharacteristics")
+ , fnDXVA2CreateDirect3DDeviceManager9(_T("dxva2.dll"), "DXVA2CreateDirect3DDeviceManager9")
+ , fnMFCreateDXSurfaceBuffer(_T("evr.dll"), "MFCreateDXSurfaceBuffer")
+ , fnMFCreateVideoSampleFromSurface(_T("evr.dll"), "MFCreateVideoSampleFromSurface")
+ , fnMFCreateMediaType(_T("mfplat.dll"), "MFCreateMediaType")
+ , fnAvSetMmThreadCharacteristicsW(_T("avrt.dll"), "AvSetMmThreadCharacteristicsW")
+ , fnAvSetMmThreadPriority(_T("avrt.dll"), "AvSetMmThreadPriority")
+ , fnAvRevertMmThreadCharacteristics(_T("avrt.dll"), "AvRevertMmThreadCharacteristics")
{
const CRenderersSettings& r = GetRenderersSettings();
diff --git a/src/filters/renderer/VideoRenderers/SyncRenderer.h b/src/filters/renderer/VideoRenderers/SyncRenderer.h
index f10fcc8fb..44778e177 100644
--- a/src/filters/renderer/VideoRenderers/SyncRenderer.h
+++ b/src/filters/renderer/VideoRenderers/SyncRenderer.h
@@ -175,7 +175,7 @@ namespace GothSync
// Functions to trace timing performance
void SyncStats(LONGLONG syncTime);
void SyncOffsetStats(LONGLONG syncOffset);
- void DrawText(const RECT& rc, const CString& strText, int _Priority);
+ void InitStats();
void DrawStats();
template<int texcoords>
diff --git a/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.cpp
deleted file mode 100644
index ed2876070..000000000
--- a/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.cpp
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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 "VMR7AllocatorPresenter.h"
-#include "IPinHook.h"
-
-extern bool g_bNoDuration; // Defined in MainFrm.cpp
-extern bool g_bExternalSubtitleTime;
-
-using namespace DSObjects;
-
-//
-// CVMR7AllocatorPresenter
-//
-
-#define MY_USER_ID 0x6ABE51
-
-CVMR7AllocatorPresenter::CVMR7AllocatorPresenter(HWND hWnd, HRESULT& hr)
- : CDX7AllocatorPresenter(hWnd, hr)
- , m_fUseInternalTimer(false)
-{
- if (FAILED(hr)) {
- return;
- }
-
- if (FAILED(hr = m_pSA.CoCreateInstance(CLSID_AllocPresenter))) {
- hr = E_FAIL;
- return;
- }
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
-{
- CheckPointer(ppv, E_POINTER);
-
- return
- QI(IVMRSurfaceAllocator)
- QI(IVMRImagePresenter)
- QI(IVMRWindowlessControl)
- __super::NonDelegatingQueryInterface(riid, ppv);
-}
-
-HRESULT CVMR7AllocatorPresenter::CreateDevice()
-{
- HRESULT hr = __super::CreateDevice();
- if (FAILED(hr)) {
- return hr;
- }
-
- if (m_pIVMRSurfAllocNotify) {
- HMONITOR hMonitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
- if (FAILED(hr = m_pIVMRSurfAllocNotify->ChangeDDrawDevice(m_pDD, hMonitor))) {
- return hr; //return false;
- }
- }
-
- return hr;
-}
-
-void CVMR7AllocatorPresenter::DeleteSurfaces()
-{
- CAutoLock cAutoLock(this);
-
- m_pSA->FreeSurface(MY_USER_ID);
-
- __super::DeleteSurfaces();
-}
-
-// ISubPicAllocatorPresenter
-
-STDMETHODIMP CVMR7AllocatorPresenter::CreateRenderer(IUnknown** ppRenderer)
-{
- CheckPointer(ppRenderer, E_POINTER);
-
- *ppRenderer = nullptr;
- CComPtr<IBaseFilter> pBF;
-
- if (FAILED(pBF.CoCreateInstance(CLSID_VideoMixingRenderer))) {
- return E_FAIL;
- }
-
- CComQIPtr<IVMRFilterConfig> pConfig = pBF;
- if (!pConfig) {
- return E_FAIL;
- }
-
- if (FAILED(pConfig->SetRenderingMode(VMRMode_Renderless))) {
- return E_FAIL;
- }
-
- CComQIPtr<IVMRSurfaceAllocatorNotify> pSAN = pBF;
- if (!pSAN) {
- return E_FAIL;
- }
-
- if (FAILED(pSAN->AdviseSurfaceAllocator(MY_USER_ID, static_cast<IVMRSurfaceAllocator*>(this)))
- || FAILED(AdviseNotify(pSAN))) {
- return E_FAIL;
- }
-
- CComPtr<IPin> pPin = GetFirstPin(pBF);
- CComQIPtr<IMemInputPin> pMemInputPin = pPin;
- m_fUseInternalTimer = HookNewSegmentAndReceive((IPinC*)(IPin*)pPin, (IMemInputPinC*)(IMemInputPin*)pMemInputPin);
-
- *ppRenderer = (IUnknown*)pBF.Detach();
-
- return S_OK;
-}
-
-STDMETHODIMP_(void) CVMR7AllocatorPresenter::SetTime(REFERENCE_TIME rtNow)
-{
- __super::SetTime(rtNow);
- // m_fUseInternalTimer = false;
-}
-
-// IVMRSurfaceAllocator
-
-STDMETHODIMP CVMR7AllocatorPresenter::AllocateSurface(DWORD_PTR dwUserID, VMRALLOCATIONINFO* lpAllocInfo, DWORD* lpdwBuffer, LPDIRECTDRAWSURFACE7* lplpSurface)
-{
- if (!lpAllocInfo || !lpdwBuffer || !lplpSurface) {
- return E_POINTER;
- }
-
- if (!m_pIVMRSurfAllocNotify) {
- return E_FAIL;
- }
-
- HRESULT hr;
-
- DeleteSurfaces();
-
- // HACK: yv12 will fail to blt onto the backbuffer anyway, but if we first
- // allocate it and then let our FreeSurface callback call m_pSA->FreeSurface,
- // then that might stall for about 30 seconds because of some unknown buggy code
- // behind <ddraw surface>->Release()
-
- if (lpAllocInfo->lpHdr->biBitCount < 16) {
- return E_FAIL;
- }
-
- hr = m_pSA->AllocateSurface(dwUserID, lpAllocInfo, lpdwBuffer, lplpSurface);
- if (FAILED(hr)) {
- return hr;
- }
-
- CSize VideoSize(abs(lpAllocInfo->lpHdr->biWidth), abs(lpAllocInfo->lpHdr->biHeight));
- CSize AspectRatio(lpAllocInfo->szAspectRatio.cx, lpAllocInfo->szAspectRatio.cy);
- SetVideoSize(VideoSize, AspectRatio);
-
- if (FAILED(hr = AllocSurfaces())) {
- return hr;
- }
-
- // test if the colorspace is acceptable
- if (FAILED(hr = m_pVideoSurface->Blt(nullptr, *lplpSurface, nullptr, DDBLT_WAIT, nullptr))) {
- DeleteSurfaces();
- return hr;
- }
-
- DDBLTFX fx;
- INITDDSTRUCT(fx);
- fx.dwFillColor = 0;
- m_pVideoSurface->Blt(nullptr, nullptr, nullptr, DDBLT_WAIT | DDBLT_COLORFILL, &fx);
-
- return hr;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::FreeSurface(DWORD_PTR dwUserID)
-{
- DeleteSurfaces();
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::PrepareSurface(DWORD_PTR dwUserID, IDirectDrawSurface7* lpSurface, DWORD dwSurfaceFlags)
-{
- SetThreadName(DWORD(-1), "CVMR7AllocatorPresenter");
-
- CheckPointer(lpSurface, E_POINTER);
-
- // FIXME: sometimes the msmpeg4/divx3/wmv decoder wants to reuse our
- // surface (expects it to point to the same mem every time), and to avoid
- // problems we can't call m_pSA->PrepareSurface (flips? clears?).
- return S_OK;
- /*
- return m_pSA->PrepareSurface(dwUserID, lpSurface, dwSurfaceFlags);
- */
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::AdviseNotify(IVMRSurfaceAllocatorNotify* lpIVMRSurfAllocNotify)
-{
- CAutoLock cAutoLock(this);
-
- m_pIVMRSurfAllocNotify = lpIVMRSurfAllocNotify;
- HRESULT hr;
- HMONITOR hMonitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
-
- if (FAILED(hr = m_pIVMRSurfAllocNotify->SetDDrawDevice(m_pDD, hMonitor))) {
- return hr;
- }
-
- return m_pSA->AdviseNotify(lpIVMRSurfAllocNotify);
-}
-
-// IVMRImagePresenter
-
-STDMETHODIMP CVMR7AllocatorPresenter::StartPresenting(DWORD_PTR dwUserID)
-{
- if (!m_bPendingResetDevice) {
- ASSERT(m_pD3DDev);
- }
-
- CAutoLock cAutoLock(this);
-
- m_bIsRendering = true;
-
- return m_pD3DDev ? S_OK : E_FAIL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::StopPresenting(DWORD_PTR dwUserID)
-{
- m_bIsRendering = false;
-
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::PresentImage(DWORD_PTR dwUserID, VMRPRESENTATIONINFO* lpPresInfo)
-{
- if (!lpPresInfo || !lpPresInfo->lpSurf) {
- return E_POINTER;
- }
-
- CAutoLock cAutoLock(this);
-
- if (!m_bPendingResetDevice) {
- m_pVideoSurface->Blt(nullptr, lpPresInfo->lpSurf, nullptr, DDBLT_WAIT, nullptr);
- }
-
- if (lpPresInfo->rtEnd > lpPresInfo->rtStart) {
- REFERENCE_TIME rtTimePerFrame = lpPresInfo->rtEnd - lpPresInfo->rtStart;
- m_fps = 10000000.0 / rtTimePerFrame;
- } else {
- TRACE(_T("VMR7: Invalid frame timestamps (%s - %s), not setting the FPS. The timestamp from the pin hook will be used anyway (%s).\n"),
- ReftimeToString(lpPresInfo->rtStart), ReftimeToString(lpPresInfo->rtEnd), ReftimeToString(g_tSampleStart));
- }
-
- if (m_pSubPicQueue) {
- m_pSubPicQueue->SetFPS(m_fps);
-
- if (m_fUseInternalTimer && !g_bExternalSubtitleTime) {
- __super::SetTime(g_tSegmentStart + g_tSampleStart);
- }
- }
-
- CSize VideoSize = m_nativeVideoSize;
- int arx = lpPresInfo->szAspectRatio.cx, ary = lpPresInfo->szAspectRatio.cy;
- if (arx > 0 && ary > 0) {
- VideoSize.cx = VideoSize.cy * arx / ary;
- }
- if (VideoSize != GetVideoSize()) {
- SetVideoSize(m_nativeVideoSize, CSize(lpPresInfo->szAspectRatio));
- AfxGetApp()->m_pMainWnd->PostMessage(WM_REARRANGERENDERLESS);
- }
-
- Paint(true);
-
- return S_OK;
-}
-
-// IVMRWindowlessControl
-//
-// It is only implemented (partially) for the dvd navigator's
-// menu handling, which needs to know a few things about the
-// location of our window.
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetNativeVideoSize(LONG* lpWidth, LONG* lpHeight, LONG* lpARWidth, LONG* lpARHeight)
-{
- CSize VideoSize = GetVideoSize(); // DVD Nav. bug workaround fix
-
- if (lpWidth) {
- *lpWidth = VideoSize.cx;
- }
- if (lpHeight) {
- *lpHeight = VideoSize.cy;
- }
- if (lpARWidth) {
- *lpARWidth = m_aspectRatio.cx;
- }
- if (lpARHeight) {
- *lpARHeight = m_aspectRatio.cy;
- }
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetMinIdealVideoSize(LONG* lpWidth, LONG* lpHeight)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetMaxIdealVideoSize(LONG* lpWidth, LONG* lpHeight)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::SetVideoPosition(const LPRECT lpSRCRect, const LPRECT lpDSTRect)
-{
- return E_NOTIMPL; // we have our own method for this
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetVideoPosition(LPRECT lpSRCRect, LPRECT lpDSTRect)
-{
- CopyRect(lpSRCRect, CRect(CPoint(0, 0), m_nativeVideoSize));
- CopyRect(lpDSTRect, &m_videoRect);
- // DVD Nav. bug workaround fix
- GetNativeVideoSize(&lpSRCRect->right, &lpSRCRect->bottom, nullptr, nullptr);
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetAspectRatioMode(DWORD* lpAspectRatioMode)
-{
- if (lpAspectRatioMode) {
- *lpAspectRatioMode = AM_ARMODE_STRETCHED;
- }
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::SetAspectRatioMode(DWORD AspectRatioMode)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::SetVideoClippingWindow(HWND hwnd)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::RepaintVideo(HWND hwnd, HDC hdc)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::DisplayModeChanged()
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetCurrentImage(BYTE** lpDib)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::SetBorderColor(COLORREF Clr)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetBorderColor(COLORREF* lpClr)
-{
- if (lpClr) {
- *lpClr = 0;
- }
- return S_OK;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::SetColorKey(COLORREF Clr)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CVMR7AllocatorPresenter::GetColorKey(COLORREF* lpClr)
-{
- return E_NOTIMPL;
-}
diff --git a/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.h b/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.h
deleted file mode 100644
index fe9a8b7a1..000000000
--- a/src/filters/renderer/VideoRenderers/VMR7AllocatorPresenter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
- *
- * This file is part of MPC-HC.
- *
- * MPC-HC 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.
- *
- * MPC-HC 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
-
-#include "DX7AllocatorPresenter.h"
-
-namespace DSObjects
-{
-
- class CVMR7AllocatorPresenter
- : public CDX7AllocatorPresenter
- , public IVMRSurfaceAllocator
- , public IVMRImagePresenter
- , public IVMRWindowlessControl
- {
- CComPtr<IVMRSurfaceAllocatorNotify> m_pIVMRSurfAllocNotify;
- CComPtr<IVMRSurfaceAllocator> m_pSA;
-
- HRESULT CreateDevice();
- void DeleteSurfaces();
-
- bool m_fUseInternalTimer;
-
- public:
- CVMR7AllocatorPresenter(HWND hWnd, HRESULT& hr);
-
- DECLARE_IUNKNOWN
- STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
-
- // ISubPicAllocatorPresenter
- STDMETHODIMP CreateRenderer(IUnknown** ppRenderer);
- STDMETHODIMP_(void) SetTime(REFERENCE_TIME rtNow);
-
- // IVMRSurfaceAllocator
- STDMETHODIMP AllocateSurface(DWORD_PTR dwUserID, VMRALLOCATIONINFO* lpAllocInfo, DWORD* lpdwBuffer, LPDIRECTDRAWSURFACE7* lplpSurface);
- STDMETHODIMP FreeSurface(DWORD_PTR dwUserID);
- STDMETHODIMP PrepareSurface(DWORD_PTR dwUserID, IDirectDrawSurface7* lpSurface, DWORD dwSurfaceFlags);
- STDMETHODIMP AdviseNotify(IVMRSurfaceAllocatorNotify* lpIVMRSurfAllocNotify);
-
- // IVMRImagePresenter
- STDMETHODIMP StartPresenting(DWORD_PTR dwUserID);
- STDMETHODIMP StopPresenting(DWORD_PTR dwUserID);
- STDMETHODIMP PresentImage(DWORD_PTR dwUserID, VMRPRESENTATIONINFO* lpPresInfo);
-
- // IVMRWindowlessControl
- STDMETHODIMP GetNativeVideoSize(LONG* lpWidth, LONG* lpHeight, LONG* lpARWidth, LONG* lpARHeight);
- STDMETHODIMP GetMinIdealVideoSize(LONG* lpWidth, LONG* lpHeight);
- STDMETHODIMP GetMaxIdealVideoSize(LONG* lpWidth, LONG* lpHeight);
- STDMETHODIMP SetVideoPosition(const LPRECT lpSRCRect, const LPRECT lpDSTRect);
- STDMETHODIMP GetVideoPosition(LPRECT lpSRCRect, LPRECT lpDSTRect);
- STDMETHODIMP GetAspectRatioMode(DWORD* lpAspectRatioMode);
- STDMETHODIMP SetAspectRatioMode(DWORD AspectRatioMode);
- STDMETHODIMP SetVideoClippingWindow(HWND hwnd);
- STDMETHODIMP RepaintVideo(HWND hwnd, HDC hdc);
- STDMETHODIMP DisplayModeChanged();
- STDMETHODIMP GetCurrentImage(BYTE** lpDib);
- STDMETHODIMP SetBorderColor(COLORREF Clr);
- STDMETHODIMP GetBorderColor(COLORREF* lpClr);
- STDMETHODIMP SetColorKey(COLORREF Clr);
- STDMETHODIMP GetColorKey(COLORREF* lpClr);
- };
-
-}
diff --git a/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp
index a8b32264f..5a1e43c92 100644
--- a/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/VMR9AllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -422,14 +422,9 @@ STDMETHODIMP CVMR9AllocatorPresenter::PresentImage(DWORD_PTR dwUserID, VMR9Prese
}
}
- CSize VideoSize = GetVisibleVideoSize();
- int arx = lpPresInfo->szAspectRatio.cx;
- int ary = lpPresInfo->szAspectRatio.cy;
- if (arx > 0 && ary > 0) {
- VideoSize.cx = VideoSize.cy * arx / ary;
- }
- if (VideoSize != GetVideoSize()) {
- SetVideoSize(m_nativeVideoSize, CSize(arx, ary));
+ CSize ar(lpPresInfo->szAspectRatio.cx, lpPresInfo->szAspectRatio.cy);
+ if (ar != m_aspectRatio) {
+ SetVideoSize(m_nativeVideoSize, ar);
AfxGetApp()->m_pMainWnd->PostMessage(WM_REARRANGERENDERLESS);
}
diff --git a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
index 0c6973d05..a08743f1c 100644
--- a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
+++ b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,69 +34,26 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;NO_VERSION_REV_NEEDED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;NO_VERSION_REV_NEEDED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;NO_VERSION_REV_NEEDED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Lib>
- <AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;$(DXSDK_DIR)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;NO_VERSION_REV_NEEDED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Lib>
<AdditionalDependencies>d3d9.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="AllocatorCommon.cpp" />
- <ClCompile Include="AllocatorCommon7.cpp" />
<ClCompile Include="D3DFont.cpp" />
<ClCompile Include="Dither.cpp" />
- <ClCompile Include="DX7AllocatorPresenter.cpp" />
<ClCompile Include="DX9AllocatorPresenter.cpp" />
<ClCompile Include="DX9RenderingEngine.cpp" />
<ClCompile Include="DXRAllocatorPresenter.cpp" />
@@ -122,26 +64,22 @@
<ClCompile Include="madVRAllocatorPresenter.cpp" />
<ClCompile Include="OuterEVR.cpp" />
<ClCompile Include="OuterVMR.cpp" />
+ <ClCompile Include="PixelShaderCache.cpp" />
<ClCompile Include="PixelShaderCompiler.cpp" />
- <ClCompile Include="QT7AllocatorPresenter.cpp" />
<ClCompile Include="QT9AllocatorPresenter.cpp" />
<ClCompile Include="RenderersSettings.cpp" />
- <ClCompile Include="RM7AllocatorPresenter.cpp" />
<ClCompile Include="RM9AllocatorPresenter.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="SyncRenderer.cpp" />
- <ClCompile Include="VMR7AllocatorPresenter.cpp" />
<ClCompile Include="VMR9AllocatorPresenter.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AllocatorCommon.h" />
- <ClInclude Include="AllocatorCommon7.h" />
<ClInclude Include="AsyncCallback.h" />
<ClInclude Include="D3DFont.h" />
<ClInclude Include="Dither.h" />
- <ClInclude Include="DX7AllocatorPresenter.h" />
<ClInclude Include="DX9AllocatorPresenter.h" />
<ClInclude Include="DX9RenderingEngine.h" />
<ClInclude Include="DXRAllocatorPresenter.h" />
@@ -153,16 +91,14 @@
<ClInclude Include="madVRAllocatorPresenter.h" />
<ClInclude Include="OuterEVR.h" />
<ClInclude Include="OuterVMR.h" />
+ <ClInclude Include="PixelShaderCache.h" />
<ClInclude Include="PixelShaderCompiler.h" />
- <ClInclude Include="QT7AllocatorPresenter.h" />
<ClInclude Include="QT9AllocatorPresenter.h" />
<ClInclude Include="RenderersSettings.h" />
- <ClInclude Include="RM7AllocatorPresenter.h" />
<ClInclude Include="RM9AllocatorPresenter.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="SyncAllocatorPresenter.h" />
<ClInclude Include="SyncRenderer.h" />
- <ClInclude Include="VMR7AllocatorPresenter.h" />
<ClInclude Include="VMR9AllocatorPresenter.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
index 2c606a773..98c44fd6a 100644
--- a/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
+++ b/src/filters/renderer/VideoRenderers/VideoRenderers.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{91abd446-f660-4356-a9fe-c6f7f9dee6cb}</UniqueIdentifier>
@@ -14,15 +14,9 @@
<ClCompile Include="AllocatorCommon.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="AllocatorCommon7.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="D3DFont.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="DX7AllocatorPresenter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="DX9AllocatorPresenter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -44,18 +38,12 @@
<ClCompile Include="PixelShaderCompiler.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="QT7AllocatorPresenter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="QT9AllocatorPresenter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RenderersSettings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="RM7AllocatorPresenter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="RM9AllocatorPresenter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -65,9 +53,6 @@
<ClCompile Include="SyncRenderer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="VMR7AllocatorPresenter.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="VMR9AllocatorPresenter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -86,20 +71,17 @@
<ClCompile Include="FocusThread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="PixelShaderCache.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="AllocatorCommon.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="AllocatorCommon7.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="D3DFont.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="DX7AllocatorPresenter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="DX9AllocatorPresenter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -121,18 +103,12 @@
<ClInclude Include="PixelShaderCompiler.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="QT7AllocatorPresenter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="QT9AllocatorPresenter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RenderersSettings.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="RM7AllocatorPresenter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="RM9AllocatorPresenter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -145,9 +121,6 @@
<ClInclude Include="SyncRenderer.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="VMR7AllocatorPresenter.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="VMR9AllocatorPresenter.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -172,5 +145,8 @@
<ClInclude Include="AsyncCallback.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="PixelShaderCache.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
index 04eef572b..bce285688 100644
--- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
+++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -23,6 +23,7 @@
#include "../../../SubPic/DX9SubPic.h"
#include "../../../SubPic/SubPicQueueImpl.h"
#include "RenderersSettings.h"
+#include <initguid.h>
#include <mvrInterfaces.h>
@@ -60,6 +61,7 @@ STDMETHODIMP CmadVRAllocatorPresenter::NonDelegatingQueryInterface(REFIID riid,
return QI(ISubRenderCallback)
QI(ISubRenderCallback2)
QI(ISubRenderCallback3)
+ QI(ISubRenderCallback4)
__super::NonDelegatingQueryInterface(riid, ppv);
}
@@ -71,6 +73,7 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
// release all resources
m_pSubPicQueue = nullptr;
m_pAllocator = nullptr;
+ __super::SetPosition(CRect(), CRect());
return S_OK;
}
@@ -108,13 +111,14 @@ HRESULT CmadVRAllocatorPresenter::SetDevice(IDirect3DDevice9* pD3DDev)
// ISubRenderCallback3
-HRESULT CmadVRAllocatorPresenter::RenderEx2(REFERENCE_TIME rtStart,
+HRESULT CmadVRAllocatorPresenter::RenderEx3(REFERENCE_TIME rtStart,
REFERENCE_TIME /*rtStop*/,
REFERENCE_TIME atpf,
RECT croppedVideoRect,
RECT /*originalVideoRect*/,
RECT viewportRect,
- const double videoStretchFactor)
+ const double videoStretchFactor /*= 1.0*/,
+ int xOffsetInPixels /*= 0*/, DWORD flags /*= 0*/)
{
CheckPointer(m_pSubPicQueue, E_UNEXPECTED);
@@ -126,7 +130,7 @@ HRESULT CmadVRAllocatorPresenter::RenderEx2(REFERENCE_TIME rtStart,
m_fps = 10000000.0 / atpf;
m_pSubPicQueue->SetFPS(m_fps);
}
- AlphaBltSubPic(viewportRect, croppedVideoRect, nullptr, videoStretchFactor);
+ AlphaBltSubPic(viewportRect, croppedVideoRect, nullptr, videoStretchFactor, xOffsetInPixels);
return S_OK;
}
@@ -170,6 +174,8 @@ STDMETHODIMP_(SIZE) CmadVRAllocatorPresenter::GetVideoSize(bool bCorrectAR) cons
if (!bCorrectAR) {
if (CComQIPtr<IBasicVideo> pBV = m_pMVR) {
+ // Final size of the video, after all scaling and cropping operations
+ // This is also aspect ratio adjusted
pBV->GetVideoSize(&size.cx, &size.cy);
}
} else {
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
index 443f9fbf9..436fa635e 100644
--- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
+++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.h
@@ -1,5 +1,5 @@
/*
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -25,7 +25,7 @@
namespace DSObjects
{
- class CmadVRAllocatorPresenter : public CSubPicAllocatorPresenterImpl, ISubRenderCallback3
+ class CmadVRAllocatorPresenter : public CSubPicAllocatorPresenterImpl, ISubRenderCallback4
{
CComPtr<IUnknown> m_pMVR;
@@ -41,20 +41,30 @@ namespace DSObjects
STDMETHODIMP Render(REFERENCE_TIME rtStart, int left, int top, int right,
int bottom, int width, int height) override {
return RenderEx(rtStart, 0, 0, left, top, right, bottom, width, height);
- };
+ }
// ISubRenderCallback2
STDMETHODIMP RenderEx(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, REFERENCE_TIME atpf,
int left, int top, int right, int bottom, int width, int height) override {
return RenderEx2(rtStart, rtStop, atpf, { left, top, right, bottom },
{ left, top, right, bottom }, { 0, 0, width, height });
- };
+ }
// ISubRenderCallback3
STDMETHODIMP RenderEx2(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop,
REFERENCE_TIME atpf, RECT croppedVideoRect,
RECT originalVideoRect, RECT viewportRect,
- const double videoStretchFactor = 1.0) override;
+ const double videoStretchFactor = 1.0) override {
+ return RenderEx3(std::move(rtStart), std::move(rtStop), std::move(atpf), std::move(croppedVideoRect),
+ std::move(originalVideoRect), std::move(viewportRect), std::move(videoStretchFactor));
+ }
+
+ // ISubRenderCallback4
+ STDMETHODIMP RenderEx3(REFERENCE_TIME rtStart, REFERENCE_TIME rtStop,
+ REFERENCE_TIME atpf, RECT croppedVideoRect,
+ RECT originalVideoRect, RECT viewportRect,
+ const double videoStretchFactor = 1.0,
+ int xOffsetInPixels = 0, DWORD flags = 0) override;
// ISubPicAllocatorPresenter
STDMETHODIMP CreateRenderer(IUnknown** ppRenderer) override;
@@ -64,7 +74,7 @@ namespace DSObjects
STDMETHODIMP GetDIB(BYTE* lpDib, DWORD* size) override;
STDMETHODIMP SetPixelShader(LPCSTR pSrcData, LPCSTR pTarget) override {
return SetPixelShader2(pSrcData, pTarget, false);
- };
+ }
STDMETHODIMP SetPixelShader2(LPCSTR pSrcData, LPCSTR pTarget, bool bScreenSpace) override;
// ISubPicAllocatorPresenter2
diff --git a/src/filters/source/BaseSource/BaseSource.vcxproj b/src/filters/source/BaseSource/BaseSource.vcxproj
index 01dc2c798..22eb871f7 100644
--- a/src/filters/source/BaseSource/BaseSource.vcxproj
+++ b/src/filters/source/BaseSource/BaseSource.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/source/BaseSource/BaseSource.vcxproj.filters b/src/filters/source/BaseSource/BaseSource.vcxproj.filters
index 82f2cf98f..5bb15a894 100644
--- a/src/filters/source/BaseSource/BaseSource.vcxproj.filters
+++ b/src/filters/source/BaseSource/BaseSource.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{d55d7ca3-f025-4f7c-bfa1-01bb4db7f6cd}</UniqueIdentifier>
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
index 1c894b69c..ddb6d1b87 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
+++ b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,128 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>SubtitleSource.def</ModuleDefinitionFile>
@@ -172,30 +80,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
@@ -207,14 +91,14 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="SubtitleSource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="SubtitleSource.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
index b7c00be75..1e69995e6 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
+++ b/src/filters/source/SubtitleSource/SubtitleSource.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{02ec0f4b-6c0b-4d12-b1f0-0cbc16c2b813}</UniqueIdentifier>
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
index 655c87b8a..c3f3dde56 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,128 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<AdditionalDependencies>Vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>AudioSwitcher.def</ModuleDefinitionFile>
@@ -172,30 +80,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Audio.cpp" />
<ClCompile Include="AudioSwitcher.cpp" />
@@ -211,14 +95,14 @@
<ClInclude Include="Audio.h" />
<ClInclude Include="AudioSwitcher.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="StreamSwitcher.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="AudioSwitcher.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
index a1df243af..0e4f0567c 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{5d72cb26-7cb5-4089-8afe-a1675cca05bd}</UniqueIdentifier>
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
index 693d9bd47..c3ca52f5a 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,114 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
</Link>
@@ -157,41 +79,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>AVI2AC3Filter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="AVI2AC3Filter.cpp" />
<ClCompile Include="stdafx.cpp">
@@ -204,13 +91,13 @@
<ItemGroup>
<ClInclude Include="AVI2AC3Filter.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="AVI2AC3Filter.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
index 255fb9ad8..801dac214 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{00cf5f87-ccb3-495d-aa71-5c96741443af}</UniqueIdentifier>
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
index 0c20030da..4e309adc3 100644
--- a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
+++ b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -25,10 +25,10 @@
#include "../../../DSUtil/DSUtil.h"
#include "../../../DSUtil/MediaTypes.h"
-#include <InitGuid.h>
#include "moreuuids.h"
// Even if we don't use this, it is needed for mvrInterfaces.h
typedef interface IDirect3DDevice9* LPDIRECT3DDEVICE9;
+#include <initguid.h>
#include <mvrInterfaces.h>
//
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj
index 3ed0a834d..75ea8b02c 100644
--- a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj
+++ b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,42 +34,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj.filters b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj.filters
index 061e1cc2f..6a3df21c4 100644
--- a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj.filters
+++ b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{a11bf24b-08b5-4cf3-84cf-dcb0e13c32a9}</UniqueIdentifier>
diff --git a/src/filters/transform/BufferFilter/BufferFilter.vcxproj b/src/filters/transform/BufferFilter/BufferFilter.vcxproj
index 602005e99..e4b8547f3 100644
--- a/src/filters/transform/BufferFilter/BufferFilter.vcxproj
+++ b/src/filters/transform/BufferFilter/BufferFilter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,114 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
</Link>
@@ -157,41 +79,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>BufferFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="BufferFilter.cpp" />
<ClCompile Include="stdafx.cpp">
@@ -204,13 +91,13 @@
<ItemGroup>
<ClInclude Include="BufferFilter.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BufferFilter.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters b/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
index 35fe7ed0a..06d3f156d 100644
--- a/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
+++ b/src/filters/transform/BufferFilter/BufferFilter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{9b46af16-2931-44b3-981b-5a22b3ba715b}</UniqueIdentifier>
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp b/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp
index 8111c0ce5..d12772bd0 100644
--- a/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp
+++ b/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -28,6 +28,9 @@
#ifdef STANDALONE_FILTER
+#include <initguid.h>
+#include "moreuuids.h"
+
const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = {
{&MEDIATYPE_DVD_ENCRYPTED_PACK, &MEDIASUBTYPE_NULL},
};
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
index 8ee84325d..7b5f000b9 100644
--- a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
+++ b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -42,114 +42,36 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
+ <PropertyGroup Condition="$(Configuration.Contains('Filter'))" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">.ax</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">.ax</TargetExt>
+ <TargetExt Condition="$(Configuration.Contains('Filter'))">.ax</TargetExt>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
+ <ItemDefinitionGroup Condition="!$(Configuration.Contains('Filter'))">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <Link>
- <ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ItemDefinitionGroup Condition="$(Configuration.Contains('Filter'))">
<Link>
<ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
</Link>
@@ -157,41 +79,6 @@
<AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <ModuleDefinitionFile>DeCSSFilter.def</ModuleDefinitionFile>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="DeCSSFilter.cpp" />
<ClCompile Include="stdafx.cpp">
@@ -204,13 +91,13 @@
<ItemGroup>
<ClInclude Include="DeCSSFilter.h" />
<ClInclude Include="resource.h">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DeCSSFilter.rc">
- <ExcludedFromBuild Condition="'$(Configuration)'=='Debug' or '$(Configuration)'=='Release'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="!$(Configuration.Contains('Filter'))">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
index 39c10af14..f5eda4594 100644
--- a/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
+++ b/src/filters/transform/DeCSSFilter/DeCSSFilter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{8b808ee2-0f72-4075-8ecb-82a22d4466ae}</UniqueIdentifier>
diff --git a/src/filters/transform/VSFilter/Copy.cpp b/src/filters/transform/VSFilter/Copy.cpp
index b6c65e0d8..383c3f986 100644
--- a/src/filters/transform/VSFilter/Copy.cpp
+++ b/src/filters/transform/VSFilter/Copy.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -27,7 +27,6 @@
#include "../../../DSUtil/DSUtil.h"
#include "../../../DSUtil/MediaTypes.h"
-#include <InitGuid.h>
#include "moreuuids.h"
extern int c2y_yb[256];
@@ -184,10 +183,10 @@ void CDirectVobSubFilter::PrintMessages(BYTE* pOut)
bihOut.biWidth, bihOut.biHeight,
Subtype2String(m_pOutput->CurrentMediaType().subtype));
- msg.AppendFormat(_T("real fps: %.3f, current fps: %.3f\nmedia time: %d, subtitle time: %I64d [ms]\nframe number: %d (calculated)\nrate: %.4lf\n"),
+ msg.AppendFormat(_T("real fps: %.3f, current fps: %.3f\nmedia time: %I64d, subtitle time: %I64d [ms]\nframe number: %I64d (calculated)\nrate: %.4lf\n"),
m_fps, m_fMediaFPSEnabled ? m_MediaFPS : fabs(m_fps),
- m_tPrev.Millisecs(), CalcCurrentTime() / 10000,
- (int)(m_tPrev.m_time * m_fps / 10000000),
+ RT2MS(m_tPrev.GetUnits()), RT2MS(CalcCurrentTime()),
+ std::llround(m_tPrev.m_time * m_fps / UNITS_FLOAT),
m_pInput->CurrentRate());
CAutoLock cAutoLock(&m_csQueueLock);
@@ -196,11 +195,11 @@ void CDirectVobSubFilter::PrintMessages(BYTE* pOut)
int nSubPics = -1;
REFERENCE_TIME rtNow = -1, rtStart = -1, rtStop = -1;
m_pSubPicQueue->GetStats(nSubPics, rtNow, rtStart, rtStop);
- msg.AppendFormat(_T("queue stats: %I64d - %I64d [ms]\n"), rtStart / 10000, rtStop / 10000);
+ msg.AppendFormat(_T("queue stats: %I64d - %I64d [ms]\n"), RT2MS(rtStart), RT2MS(rtStop));
for (int i = 0; i < nSubPics; i++) {
m_pSubPicQueue->GetStats(i, rtStart, rtStop);
- msg.AppendFormat(_T("%d: %I64d - %I64d [ms]\n"), i, rtStart / 10000, rtStop / 10000);
+ msg.AppendFormat(_T("%d: %I64d - %I64d [ms]\n"), i, RT2MS(rtStart), RT2MS(rtStop));
}
}
diff --git a/src/filters/transform/VSFilter/DirectVobSub.cpp b/src/filters/transform/VSFilter/DirectVobSub.cpp
index f8cdc9b1c..e264644a2 100644
--- a/src/filters/transform/VSFilter/DirectVobSub.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSub.cpp
@@ -55,6 +55,10 @@ CDirectVobSub::CDirectVobSub()
m_fMediaFPSEnabled = !!theApp.GetProfileInt(ResStr(IDS_R_TIMING), ResStr(IDS_RTM_MEDIAFPSENABLED), FALSE);
m_ePARCompensationType = static_cast<CSimpleTextSubtitle::EPARCompensationType>(theApp.GetProfileInt(ResStr(IDS_R_TEXT), ResStr(IDS_RT_AUTOPARCOMPENSATION), 0));
+ int gcd = GCD(m_SubtitleSpeedMul, m_SubtitleSpeedDiv);
+ m_SubtitleSpeedNormalizedMul = m_SubtitleSpeedMul / gcd;
+ m_SubtitleSpeedNormalizedDiv = m_SubtitleSpeedDiv / gcd;
+
BYTE* pData = nullptr;
UINT nSize;
if (theApp.GetProfileBinary(ResStr(IDS_R_TIMING), ResStr(IDS_RTM_MEDIAFPS), &pData, &nSize) && pData) {
@@ -459,6 +463,10 @@ STDMETHODIMP CDirectVobSub::put_SubtitleTiming(int delay, int speedmul, int spee
m_SubtitleSpeedDiv = speeddiv;
}
+ int gcd = GCD(m_SubtitleSpeedMul, m_SubtitleSpeedDiv);
+ m_SubtitleSpeedNormalizedMul = m_SubtitleSpeedMul / gcd;
+ m_SubtitleSpeedNormalizedDiv = m_SubtitleSpeedDiv / gcd;
+
return S_OK;
}
diff --git a/src/filters/transform/VSFilter/DirectVobSub.h b/src/filters/transform/VSFilter/DirectVobSub.h
index 6282020c3..9321f6ae9 100644
--- a/src/filters/transform/VSFilter/DirectVobSub.h
+++ b/src/filters/transform/VSFilter/DirectVobSub.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -49,6 +49,9 @@ protected:
bool m_fOSD;
int m_nReloaderDisableCount;
int m_SubtitleDelay, m_SubtitleSpeedMul, m_SubtitleSpeedDiv;
+ // User could specify any values for m_SubtitleSpeedMul and m_SubtitleSpeedDiv.
+ // We want to normalize the user input to minimize the chance of overflow later when we do calculations.
+ int m_SubtitleSpeedNormalizedMul, m_SubtitleSpeedNormalizedDiv;
bool m_fMediaFPSEnabled;
double m_MediaFPS;
bool m_fSaveFullPath;
diff --git a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
index beefbdeac..9c22beab1 100644
--- a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
@@ -34,7 +34,6 @@
#include "../../../Subtitles/RLECodedSubtitle.h"
#include "../../../Subtitles/PGSSub.h"
-#include <InitGuid.h>
#include <d3d9.h>
#include <dxva2api.h>
#include "moreuuids.h"
@@ -518,7 +517,7 @@ HRESULT CDirectVobSubFilter::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tS
REFERENCE_TIME CDirectVobSubFilter::CalcCurrentTime()
{
REFERENCE_TIME rt = m_pSubClock ? m_pSubClock->GetTime() : m_tPrev;
- return (rt - 10000i64 * m_SubtitleDelay) * m_SubtitleSpeedMul / m_SubtitleSpeedDiv; // no, it won't overflow if we use normal parameters (__int64 is enough for about 2000 hours if we multiply it by the max: 65536 as m_SubtitleSpeedMul)
+ return (rt - 10000i64 * m_SubtitleDelay) * m_SubtitleSpeedNormalizedMul / m_SubtitleSpeedNormalizedDiv; // no, it won't overflow if we use normal parameters (__int64 is enough for about 2000 hours if we multiply it by the max: 65536 as m_SubtitleSpeedMul)
}
void CDirectVobSubFilter::InitSubPicQueue()
@@ -743,7 +742,7 @@ void CDirectVobSubFilter::UpdatePreferedLanguages(CString l)
// move "Hide subtitles" to the last position if it wasn't our selection
- CString hidesubs = ResStr(IDS_M_HIDESUBTITLES);
+ CString hidesubs(StrRes(IDS_M_HIDESUBTITLES));
for (k = 1; k < j; k++) {
if (!langs[k].CompareNoCase(hidesubs)) {
@@ -1355,18 +1354,22 @@ bool CDirectVobSubFilter2::IsAppBlackListed()
_T("wm8eutil."), // wmp8 encoder's dummy renderer releases the outputted media sample after calling Receive on its input pin (yes, even when dvobsub isn't registered at all)
_T("explorer."), // as some users reported thumbnail preview loads dvobsub, I've never experienced this yet...
_T("producer."), // this is real's producer
- _T("googledesktopindex."), // Google Desktop
- _T("googledesktopdisplay."), // Google Desktop
- _T("googledesktopcrawl."), // Google Desktop
- _T("subtitleworkshop."), // Subtitle Workshop
- _T("subtitleworkshop4."),
+ _T("googledesktop"), // Google Desktop
+ _T("subtitleworkshop"), // Subtitle Workshop
_T("darksouls."), // Dark Souls (Game)
_T("rometw."), // Rome Total War (Game)
_T("everquest2."), // EverQuest II (Game)
_T("yso_win."), // Ys Origin (Game)
_T("launcher_main."), // Logitech WebCam Software
- _T("webcamdell2."), // Dell WebCam Software
+ _T("webcamdell"), // Dell WebCam Software
_T("data."), // Dark Souls 1 (Game)
+ _T("unravel"), // Unravel (Game)
+ _T("mshta"), // MS Scripting Host
+#if WIN64
+ _T("ridex64.exe"), // Ride (Game)
+#else
+ _T("ride.exe"), // Ride (Game)
+#endif
};
for (size_t i = 0; i < _countof(blacklistedapps); i++) {
@@ -1592,10 +1595,10 @@ void CDirectVobSubFilter::UpdateSubtitle()
void CDirectVobSubFilter::SetSubtitle(ISubStream* pSubStream)
{
- CAutoLock cAutolock(&m_csQueueLock);
+ CAutoLock cQueueLock(&m_csQueueLock);
if (pSubStream) {
- CAutoLock cAutolock(&m_csSubLock);
+ CAutoLock cSubLock(&m_csSubLock);
CLSID clsid;
pSubStream->GetClassID(&clsid);
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
index 828b20bdf..ff115406a 100644
--- a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
diff --git a/src/filters/transform/VSFilter/VSFilter.cpp b/src/filters/transform/VSFilter/VSFilter.cpp
index 8da330ec3..b5e740b8e 100644
--- a/src/filters/transform/VSFilter/VSFilter.cpp
+++ b/src/filters/transform/VSFilter/VSFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -24,9 +24,7 @@
#include "DirectVobSubPropPage.h"
#include "VSFilter.h"
#include "../../../DSUtil/MediaTypes.h"
-#include "../../../MathLibFix/MathLibFix.h"
-#include <InitGuid.h>
#include "moreuuids.h"
/////////////////////////////////////////////////////////////////////////////
@@ -47,8 +45,6 @@ BOOL CVSFilterApp::InitInstance()
return FALSE;
}
- WorkAroundMathLibraryBug();
-
SetRegistryKey(_T("MPC-HC"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0); // "DllMain" of the dshow baseclasses
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj b/src/filters/transform/VSFilter/VSFilter.vcxproj
index c521cf4b7..f6667556a 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,73 +34,18 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
+ <!--
+ Remove /Zc:threadSafeInit- once Windows XP in no longer supported. TLS doesn't work on this system with dynamically loaded libraries.
+ And it will not be fixed. https://connect.microsoft.com/VisualStudio/feedback/details/1789709
+ -->
+ <AdditionalOptions>/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
@@ -180,9 +110,6 @@
<ProjectReference Include="..\..\..\DSUtil\DSUtil.vcxproj">
<Project>{fc70988b-1ae5-4381-866d-4f405e28ac42}</Project>
</ProjectReference>
- <ProjectReference Include="..\..\..\MathLibFix\MathLibFix.vcxproj">
- <Project>{fc9fc17f-70bf-4aca-8285-c24d1889bacb}</Project>
- </ProjectReference>
<ProjectReference Include="..\..\..\SubPic\SubPic.vcxproj">
<Project>{d514ea4d-eafb-47a9-a437-a582ca571251}</Project>
</ProjectReference>
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
index 0c975605b..e1d250d9e 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{6d1c2595-a734-4727-a302-743496e0d217}</UniqueIdentifier>
diff --git a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
index 96506b364..a78b9f5fc 100644
--- a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
+++ b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
@@ -1,4 +1,4 @@
-; (C) 2012-2015 see Authors.txt
+; (C) 2012-2017 see Authors.txt
;
; This file is part of MPC-HC.
;
@@ -20,8 +20,8 @@
; Inno Setup: http://www.jrsoftware.org/isdl.php
-#if VER < EncodeVer(5,5,4)
- #error Update your Inno Setup version (5.5.4 or newer)
+#if VER < EncodeVer(5,5,7)
+ #error Update your Inno Setup version (5.5.7 or newer)
#endif
; If you want to compile the 64-bit version define "x64Build" (uncomment the define below or use build.bat)
@@ -36,7 +36,7 @@
#include AddBackslash(top_dir) + "include\mpc-hc_config.h"
#include AddBackslash(top_dir) + "include\version.h"
-#define copyright_str "2001-2015"
+#define copyright_str "2001-2017"
#define app_name "VSFilter"
#define app_version str(VerMajor) + "." + str(VerMinor) + "." + str(MPC_VERSION_REV)
diff --git a/src/filters/transform/VSFilter/plugins.cpp b/src/filters/transform/VSFilter/plugins.cpp
index b42a46d67..c1d4ac0aa 100644
--- a/src/filters/transform/VSFilter/plugins.cpp
+++ b/src/filters/transform/VSFilter/plugins.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -571,7 +571,7 @@ namespace Plugin
bool FssProc(VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* buf, int buflen) {
CStringA fn(GetFileName());
fn.Replace("\\", "\\\\");
- _snprintf_s(buf, buflen, buflen, "Config(\"%s\")", fn);
+ _snprintf_s(buf, buflen, buflen, "Config(\"%s\")", fn.GetString());
return true;
}
};
@@ -610,7 +610,7 @@ namespace Plugin
void StringProc(const VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* str) {
if (!GetFileName().IsEmpty()) {
- sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (%s, %d)", CStringA(GetFileName()), GetCharSet());
+ sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (%s, %d)", CStringA(GetFileName()).GetString(), GetCharSet());
} else {
sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (empty)");
}
@@ -619,7 +619,7 @@ namespace Plugin
bool FssProc(VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* buf, int buflen) {
CStringA fn(GetFileName());
fn.Replace("\\", "\\\\");
- _snprintf_s(buf, buflen, buflen, "Config(\"%s\", %d)", fn, GetCharSet());
+ _snprintf_s(buf, buflen, buflen, "Config(\"%s\", %d)", fn.GetString(), GetCharSet());
return true;
}
};
@@ -1068,7 +1068,7 @@ UINT_PTR CALLBACK OpenHookProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lPar
for (ptrdiff_t i = 0; i < CharSetLen; i++) {
CString s;
- s.Format(_T("%s (%d)"), CharSetNames[i], CharSetList[i]);
+ s.Format(_T("%s (%u)"), CharSetNames[i], CharSetList[i]);
SendMessage(GetDlgItem(hDlg, IDC_COMBO1), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)s);
if (CharSetList[i] == (int)((OPENFILENAME*)lParam)->lCustData) {
SendMessage(GetDlgItem(hDlg, IDC_COMBO1), CB_SETCURSEL, i, 0);