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-08-19 22:05:22 +0300
committerKacper Michajłow <kasper93@gmail.com>2017-08-28 00:13:37 +0300
commitd22b7d800c629bc58d47369a8120c5be9e9800d4 (patch)
tree9a0686acef484228d62716d5f0d3ae141095cd07
parent5f707f1d732934abd466d18ee77b76d87253f04c (diff)
Constify strings to conform C++ standard.
-rw-r--r--include/vd2/plugin/vdvideofilt.h4
-rw-r--r--src/DSUtil/NullRenderers.cpp2
-rw-r--r--src/DSUtil/NullRenderers.h4
-rw-r--r--src/DeCSS/DeCSSInputPin.cpp4
-rw-r--r--src/DeCSS/DeCSSInputPin.h4
-rw-r--r--src/Subtitles/STS.cpp2
-rw-r--r--src/filters/muxer/DSMMuxer/DSMMuxer.cpp6
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp8
-rw-r--r--src/filters/muxer/MatroskaMuxer/MatroskaMuxer.h2
-rw-r--r--src/filters/muxer/WavDest/WavDest.cpp6
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.cpp4
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitter.h4
-rw-r--r--src/filters/parser/DSMSplitter/DSMSplitter.cpp4
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.cpp10
-rw-r--r--src/filters/parser/StreamDriveThru/StreamDriveThru.h6
-rw-r--r--src/filters/reader/CDDAReader/CDDAReader.cpp4
-rw-r--r--src/filters/reader/CDXAReader/CDXAReader.cpp6
-rw-r--r--src/filters/reader/VTSReader/VTSReader.cpp4
-rw-r--r--src/filters/source/SubtitleSource/SubtitleSource.cpp4
-rw-r--r--src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp6
-rw-r--r--src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp6
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp8
-rw-r--r--src/filters/transform/BaseVideoFilter/BaseVideoFilter.h8
-rw-r--r--src/filters/transform/BufferFilter/BufferFilter.cpp6
-rw-r--r--src/filters/transform/DeCSSFilter/DeCSSFilter.cpp8
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubFilter.cpp2
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubPropPage.cpp4
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubPropPage.h4
-rw-r--r--src/filters/transform/VSFilter/VSFilter.cpp8
-rw-r--r--src/filters/transform/VSFilter/plugins.cpp4
-rw-r--r--src/mpc-hc/EditListEditor.cpp4
-rw-r--r--src/mpc-hc/FGManagerBDA.cpp22
-rw-r--r--src/mpc-hc/FGManagerBDA.h8
-rw-r--r--src/mpc-hc/MainFrm.cpp6
-rw-r--r--src/mpc-hc/OpenDirHelper.cpp4
-rw-r--r--src/mpc-hc/OpenDirHelper.h4
-rw-r--r--src/mpc-hc/PPageExternalFilters.cpp4
-rw-r--r--src/thirdparty/AsyncReader/asyncrdr.cpp2
-rw-r--r--src/thirdparty/AsyncReader/asyncrdr.h2
-rw-r--r--src/thirdparty/BaseClasses/amvideo.cpp10
-rw-r--r--src/thirdparty/BaseClasses/videoctl.cpp6
-rw-r--r--src/thirdparty/BaseClasses/videoctl.h6
-rw-r--r--src/thirdparty/BaseClasses/wxdebug.cpp4
-rw-r--r--src/thirdparty/BaseClasses/wxdebug.h4
-rw-r--r--src/thirdparty/BaseClasses/wxutil.h4
45 files changed, 121 insertions, 121 deletions
diff --git a/include/vd2/plugin/vdvideofilt.h b/include/vd2/plugin/vdvideofilt.h
index aab8e023f..cf331b701 100644
--- a/include/vd2/plugin/vdvideofilt.h
+++ b/include/vd2/plugin/vdvideofilt.h
@@ -471,8 +471,8 @@ typedef int (*VDXScriptIntFunctionPtr)(IVDXScriptInterpreter *, void *, const VD
struct VDXScriptFunctionDef {
VDXScriptFunctionPtr func_ptr;
- char *name;
- char *arg_list;
+ const char *name;
+ const char *arg_list;
};
struct VDXScriptObject {
diff --git a/src/DSUtil/NullRenderers.cpp b/src/DSUtil/NullRenderers.cpp
index e906dc634..4ed1870f8 100644
--- a/src/DSUtil/NullRenderers.cpp
+++ b/src/DSUtil/NullRenderers.cpp
@@ -276,7 +276,7 @@ STDMETHODIMP CNullVideoRendererInputPin::GetVideoWindow(HWND* phwndVideo)
// CNullRenderer
//
-CNullRenderer::CNullRenderer(REFCLSID clsid, TCHAR* pName, LPUNKNOWN pUnk, HRESULT* phr)
+CNullRenderer::CNullRenderer(REFCLSID clsid, LPCTSTR pName, LPUNKNOWN pUnk, HRESULT* phr)
: CBaseRenderer(clsid, pName, pUnk, phr)
{
}
diff --git a/src/DSUtil/NullRenderers.h b/src/DSUtil/NullRenderers.h
index a6935995b..1437c20ae 100644
--- a/src/DSUtil/NullRenderers.h
+++ b/src/DSUtil/NullRenderers.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -30,7 +30,7 @@ protected:
virtual HRESULT DoRenderSample(IMediaSample* pSample) { return S_OK; }
public:
- CNullRenderer(REFCLSID clsid, TCHAR* pName, LPUNKNOWN pUnk, HRESULT* phr);
+ CNullRenderer(REFCLSID clsid, LPCTSTR pName, LPUNKNOWN pUnk, HRESULT* phr);
};
class __declspec(uuid("579883A0-4E2D-481F-9436-467AAFAB7DE8"))
diff --git a/src/DeCSS/DeCSSInputPin.cpp b/src/DeCSS/DeCSSInputPin.cpp
index 15fc5885a..96572e762 100644
--- a/src/DeCSS/DeCSSInputPin.cpp
+++ b/src/DeCSS/DeCSSInputPin.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013, 2015-2016 see Authors.txt
+ * (C) 2006-2013, 2015-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -37,7 +37,7 @@
// CDeCSSInputPin
//
-CDeCSSInputPin::CDeCSSInputPin(TCHAR* pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPWSTR pName)
+CDeCSSInputPin::CDeCSSInputPin(LPCTSTR pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPCWSTR pName)
: CTransformInputPin(pObjectName, pFilter, phr, pName)
, m_varient(-1)
{
diff --git a/src/DeCSS/DeCSSInputPin.h b/src/DeCSS/DeCSSInputPin.h
index 9b5c14d29..29c4b72c7 100644
--- a/src/DeCSS/DeCSSInputPin.h
+++ b/src/DeCSS/DeCSSInputPin.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2012, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -33,7 +33,7 @@ protected:
virtual HRESULT Transform(IMediaSample* pSample) { return S_OK; }
public:
- CDeCSSInputPin(TCHAR* pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPWSTR pName);
+ CDeCSSInputPin(LPCTSTR pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPCWSTR pName);
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp
index f872ec687..cd72c9888 100644
--- a/src/Subtitles/STS.cpp
+++ b/src/Subtitles/STS.cpp
@@ -32,7 +32,7 @@
struct htmlcolor {
- TCHAR* name;
+ LPCTSTR name;
DWORD color;
}
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.cpp b/src/filters/muxer/DSMMuxer/DSMMuxer.cpp
index 265bdd9bf..93ab38522 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-2016 see Authors.txt
+ * (C) 2006-2013, 2015-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -38,8 +38,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, 0, nullptr},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, 0, nullptr},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp
index 1d2946f62..81bd5e803 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-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -39,8 +39,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, 0, nullptr},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, 0, nullptr},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
@@ -1346,7 +1346,7 @@ STDMETHODIMP CMatroskaMuxerInputPin::EndOfStream()
// CMatroskaMuxerOutputPin
//
-CMatroskaMuxerOutputPin::CMatroskaMuxerOutputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
+CMatroskaMuxerOutputPin::CMatroskaMuxerOutputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
: CBaseOutputPin(pName, pFilter, pLock, phr, L"Output")
{
}
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.h b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.h
index 1be34109f..b6237e62f 100644
--- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.h
+++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.h
@@ -71,7 +71,7 @@ public:
class CMatroskaMuxerOutputPin : public CBaseOutputPin
{
public:
- CMatroskaMuxerOutputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
+ CMatroskaMuxerOutputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
virtual ~CMatroskaMuxerOutputPin();
DECLARE_IUNKNOWN;
diff --git a/src/filters/muxer/WavDest/WavDest.cpp b/src/filters/muxer/WavDest/WavDest.cpp
index 181b5cd47..f2f292e1d 100644
--- a/src/filters/muxer/WavDest/WavDest.cpp
+++ b/src/filters/muxer/WavDest/WavDest.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -36,8 +36,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp
index d80ed7061..28b12f23f 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-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -94,7 +94,7 @@ int CPacketQueue::GetSize()
// CBaseSplitterInputPin
//
-CBaseSplitterInputPin::CBaseSplitterInputPin(TCHAR* pName, CBaseSplitterFilter* pFilter, CCritSec* pLock, HRESULT* phr)
+CBaseSplitterInputPin::CBaseSplitterInputPin(LPCTSTR pName, CBaseSplitterFilter* pFilter, CCritSec* pLock, HRESULT* phr)
: CBasePin(pName, pFilter, pLock, phr, L"Input", PINDIR_INPUT)
{
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.h b/src/filters/parser/BaseSplitter/BaseSplitter.h
index 005737029..cce3ebad3 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitter.h
+++ b/src/filters/parser/BaseSplitter/BaseSplitter.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -88,7 +88,7 @@ protected:
CComQIPtr<IAsyncReader> m_pAsyncReader;
public:
- CBaseSplitterInputPin(TCHAR* pName, CBaseSplitterFilter* pFilter, CCritSec* pLock, HRESULT* phr);
+ CBaseSplitterInputPin(LPCTSTR pName, CBaseSplitterFilter* pFilter, CCritSec* pLock, HRESULT* phr);
virtual ~CBaseSplitterInputPin();
HRESULT GetAsyncReader(IAsyncReader** ppAsyncReader);
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.cpp b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
index d9a00b855..d67b3f29f 100644
--- a/src/filters/parser/DSMSplitter/DSMSplitter.cpp
+++ b/src/filters/parser/DSMSplitter/DSMSplitter.cpp
@@ -37,8 +37,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, 0, nullptr}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, 0, nullptr}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp b/src/filters/parser/StreamDriveThru/StreamDriveThru.cpp
index 3d4e7ba7f..29bf7ba75 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-2016 see Authors.txt
+ * (C) 2006-2013, 2015-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -35,8 +35,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
@@ -392,7 +392,7 @@ STDMETHODIMP CStreamDriveThruFilter::GetPreroll(LONGLONG* pllPreroll)
// CStreamDriveThruInputPin
//
-CStreamDriveThruInputPin::CStreamDriveThruInputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
+CStreamDriveThruInputPin::CStreamDriveThruInputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
: CBasePin(pName, pFilter, pLock, phr, L"Input", PINDIR_INPUT)
{
}
@@ -486,7 +486,7 @@ STDMETHODIMP CStreamDriveThruInputPin::EndFlush()
// CStreamDriveThruOutputPin
//
-CStreamDriveThruOutputPin::CStreamDriveThruOutputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
+CStreamDriveThruOutputPin::CStreamDriveThruOutputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr)
: CBaseOutputPin(pName, pFilter, pLock, phr, L"Output")
{
}
diff --git a/src/filters/parser/StreamDriveThru/StreamDriveThru.h b/src/filters/parser/StreamDriveThru/StreamDriveThru.h
index 2a735bfb4..ddf052ef8 100644
--- a/src/filters/parser/StreamDriveThru/StreamDriveThru.h
+++ b/src/filters/parser/StreamDriveThru/StreamDriveThru.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -31,7 +31,7 @@ class CStreamDriveThruInputPin : public CBasePin
CComQIPtr<IAsyncReader> m_pAsyncReader;
public:
- CStreamDriveThruInputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
+ CStreamDriveThruInputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
virtual ~CStreamDriveThruInputPin();
HRESULT GetAsyncReader(IAsyncReader** ppAsyncReader);
@@ -54,7 +54,7 @@ class CStreamDriveThruOutputPin : public CBaseOutputPin
CComQIPtr<IStream> m_pStream;
public:
- CStreamDriveThruOutputPin(TCHAR* pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
+ CStreamDriveThruOutputPin(LPCTSTR pName, CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr);
virtual ~CStreamDriveThruOutputPin();
HRESULT GetStream(IStream** ppStream);
diff --git a/src/filters/reader/CDDAReader/CDDAReader.cpp b/src/filters/reader/CDDAReader/CDDAReader.cpp
index 8a3cd1f35..e7da9c946 100644
--- a/src/filters/reader/CDDAReader/CDDAReader.cpp
+++ b/src/filters/reader/CDDAReader/CDDAReader.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -38,7 +38,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudOpPin[] = {
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/reader/CDXAReader/CDXAReader.cpp b/src/filters/reader/CDXAReader/CDXAReader.cpp
index 8eee77f33..bd042a1f1 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-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -31,7 +31,7 @@
/////////
-static DWORD EDC_crctable[256] = {
+static constexpr DWORD EDC_crctable[256] = {
0x00000000l, 0x90910101l, 0x91210201l, 0x01b00300l,
0x92410401l, 0x02d00500l, 0x03600600l, 0x93f10701l,
0x94810801l, 0x04100900l, 0x05a00a00l, 0x95310b01l,
@@ -119,7 +119,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudOpPin[] = {
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/reader/VTSReader/VTSReader.cpp b/src/filters/reader/VTSReader/VTSReader.cpp
index 672ea28ba..4337d3c62 100644
--- a/src/filters/reader/VTSReader/VTSReader.cpp
+++ b/src/filters/reader/VTSReader/VTSReader.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -32,7 +32,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudOpPin[] = {
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/source/SubtitleSource/SubtitleSource.cpp b/src/filters/source/SubtitleSource/SubtitleSource.cpp
index 0a8983818..f9f927ab7 100644
--- a/src/filters/source/SubtitleSource/SubtitleSource.cpp
+++ b/src/filters/source/SubtitleSource/SubtitleSource.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -42,7 +42,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudOpPin[] = {
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp b/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
index 8e6dd1c27..5a70b050a 100644
--- a/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
+++ b/src/filters/switcher/AudioSwitcher/AudioSwitcher.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -47,8 +47,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
index 513199edd..fd99fcda6 100644
--- a/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
+++ b/src/filters/transform/AVI2AC3Filter/AVI2AC3Filter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -42,8 +42,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.cpp
index 4e309adc3..7aceaca0b 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-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -36,7 +36,7 @@ typedef interface IDirect3DDevice9* LPDIRECT3DDEVICE9;
//
bool f_need_set_aspect;
-CBaseVideoFilter::CBaseVideoFilter(TCHAR* pName, LPUNKNOWN lpunk, HRESULT* phr, REFCLSID clsid, long cBuffers)
+CBaseVideoFilter::CBaseVideoFilter(LPCTSTR pName, LPUNKNOWN lpunk, HRESULT* phr, REFCLSID clsid, long cBuffers)
: CTransformFilter(pName, lpunk, clsid)
, m_cBuffers(cBuffers)
{
@@ -710,7 +710,7 @@ STDMETHODIMP CBaseVideoInputAllocator::GetBuffer(IMediaSample** ppBuffer, REFERE
// CBaseVideoInputPin
//
-CBaseVideoInputPin::CBaseVideoInputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName)
+CBaseVideoInputPin::CBaseVideoInputPin(LPCTSTR pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName)
: CTransformInputPin(pObjectName, pFilter, phr, pName)
, m_pAllocator(nullptr)
{
@@ -783,7 +783,7 @@ STDMETHODIMP CBaseVideoInputPin::ReceiveConnection(IPin* pConnector, const AM_ME
// CBaseVideoOutputPin
//
-CBaseVideoOutputPin::CBaseVideoOutputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName)
+CBaseVideoOutputPin::CBaseVideoOutputPin(LPCTSTR pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName)
: CTransformOutputPin(pObjectName, pFilter, phr, pName)
{
}
diff --git a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.h b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.h
index df78467db..2c8d7ffe5 100644
--- a/src/filters/transform/BaseVideoFilter/BaseVideoFilter.h
+++ b/src/filters/transform/BaseVideoFilter/BaseVideoFilter.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -54,7 +54,7 @@ protected:
bool ConnectionWhitelistedForExtendedFormat();
public:
- CBaseVideoFilter(TCHAR* pName, LPUNKNOWN lpunk, HRESULT* phr, REFCLSID clsid, long cBuffers = 1);
+ CBaseVideoFilter(LPCTSTR pName, LPUNKNOWN lpunk, HRESULT* phr, REFCLSID clsid, long cBuffers = 1);
virtual ~CBaseVideoFilter();
HRESULT ReconnectOutput(int w, int h, bool bSendSample = true, int realWidth = -1, int realHeight = -1);
@@ -86,7 +86,7 @@ class CBaseVideoInputPin : public CTransformInputPin
CBaseVideoInputAllocator* m_pAllocator;
public:
- CBaseVideoInputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName);
+ CBaseVideoInputPin(LPCTSTR pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName);
~CBaseVideoInputPin();
STDMETHODIMP GetAllocator(IMemAllocator** ppAllocator);
@@ -96,7 +96,7 @@ public:
class CBaseVideoOutputPin : public CTransformOutputPin
{
public:
- CBaseVideoOutputPin(TCHAR* pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName);
+ CBaseVideoOutputPin(LPCTSTR pObjectName, CBaseVideoFilter* pFilter, HRESULT* phr, LPCWSTR pName);
HRESULT CheckMediaType(const CMediaType* mtOut);
};
diff --git a/src/filters/transform/BufferFilter/BufferFilter.cpp b/src/filters/transform/BufferFilter/BufferFilter.cpp
index 2fe954fd8..1ccb79650 100644
--- a/src/filters/transform/BufferFilter/BufferFilter.cpp
+++ b/src/filters/transform/BufferFilter/BufferFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013 see Authors.txt
+ * (C) 2006-2013, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -35,8 +35,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
diff --git a/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp b/src/filters/transform/DeCSSFilter/DeCSSFilter.cpp
index d12772bd0..a3e01c5a1 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, 2016 see Authors.txt
+ * (C) 2006-2013, 2016-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -41,8 +41,8 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
@@ -78,7 +78,7 @@ CFilterApp theApp;
class CKsPSInputPin : public CDeCSSInputPin
{
public:
- CKsPSInputPin(TCHAR* pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPWSTR pName)
+ CKsPSInputPin(LPCTSTR pObjectName, CTransformFilter* pFilter, HRESULT* phr, LPCWSTR pName)
: CDeCSSInputPin(pObjectName, pFilter, phr, pName) {
}
diff --git a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
index 3d2d221bd..6ad1966af 100644
--- a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
@@ -1352,7 +1352,7 @@ HRESULT CDirectVobSubFilter2::CheckInputType(const CMediaType* mtIn)
bool CDirectVobSubFilter2::IsAppBlackListed()
{
// all entries must be lowercase!
- TCHAR* blacklistedapps[] = {
+ constexpr LPCTSTR blacklistedapps[] = {
_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
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
index ff115406a..9a7920f8a 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, 2016 see Authors.txt
+ * (C) 2006-2014, 2016-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -120,7 +120,7 @@ STDMETHODIMP CDVSBasePPage::Activate(HWND hwndParent, LPCRECT pRect, BOOL fModal
/* CDVSBasePPage */
-CDVSBasePPage::CDVSBasePPage(TCHAR* pName, LPUNKNOWN lpunk, int DialogId, int TitleId)
+CDVSBasePPage::CDVSBasePPage(LPCTSTR pName, LPUNKNOWN lpunk, int DialogId, int TitleId)
: CBasePropertyPage(pName, lpunk, DialogId, TitleId)
, m_fDisableInstantUpdate(false)
, m_bIsInitialized(FALSE)
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.h b/src/filters/transform/VSFilter/DirectVobSubPropPage.h
index b76ae5e1f..3f5e5d68b 100644
--- a/src/filters/transform/VSFilter/DirectVobSubPropPage.h
+++ b/src/filters/transform/VSFilter/DirectVobSubPropPage.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -39,7 +39,7 @@ protected:
virtual void UpdateControlData(bool fSave) {}
protected:
- CDVSBasePPage(TCHAR* pName, LPUNKNOWN lpunk, int DialogId, int TitleId);
+ CDVSBasePPage(LPCTSTR pName, LPUNKNOWN lpunk, int DialogId, int TitleId);
bool m_fDisableInstantUpdate;
diff --git a/src/filters/transform/VSFilter/VSFilter.cpp b/src/filters/transform/VSFilter/VSFilter.cpp
index b5e740b8e..483db0df1 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-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -94,9 +94,9 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
- {L"Input2", TRUE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn2), sudPinTypesIn2}
+ {const_cast<LPWSTR>(L"Input"), FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn), sudPinTypesIn},
+ {const_cast<LPWSTR>(L"Output"), FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut},
+ {const_cast<LPWSTR>(L"Input2"), TRUE, FALSE, FALSE, TRUE, &CLSID_NULL, nullptr, _countof(sudPinTypesIn2), sudPinTypesIn2}
};
/*const*/
diff --git a/src/filters/transform/VSFilter/plugins.cpp b/src/filters/transform/VSFilter/plugins.cpp
index c1d4ac0aa..e2ba144e0 100644
--- a/src/filters/transform/VSFilter/plugins.cpp
+++ b/src/filters/transform/VSFilter/plugins.cpp
@@ -424,7 +424,7 @@ namespace Plugin
}
ScriptFunctionDef vobsub_func_defs[] = {
- { (ScriptFunctionPtr)vobsubScriptConfig, "Config", "0s" },
+ { (ScriptFunctionPtr)vobsubScriptConfig, const_cast<char*>("Config"), const_cast<char*>("0s") },
{ nullptr },
};
@@ -452,7 +452,7 @@ namespace Plugin
};
ScriptFunctionDef textsub_func_defs[] = {
- { (ScriptFunctionPtr)textsubScriptConfig, "Config", "0si" },
+ { (ScriptFunctionPtr)textsubScriptConfig, const_cast<char*>("Config"), const_cast<char*>("0si") },
{ nullptr },
};
diff --git a/src/mpc-hc/EditListEditor.cpp b/src/mpc-hc/EditListEditor.cpp
index abdd56c59..3043d274b 100644
--- a/src/mpc-hc/EditListEditor.cpp
+++ b/src/mpc-hc/EditListEditor.cpp
@@ -1,5 +1,5 @@
/*
- * (C) 2009-2014, 2016 see Authors.txt
+ * (C) 2009-2014, 2016-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -320,7 +320,7 @@ POSITION CEditListEditor::InsertClip(POSITION pos, CClip& newClip)
lv.mask = LVIF_STATE | LVIF_TEXT;
lv.iItem = FindIndex(pos);
lv.iSubItem = 0;
- lv.pszText = _T("");
+ lv.pszText = const_cast<LPTSTR>(_T(""));
lv.state = m_list.GetItemCount() == 0 ? LVIS_SELECTED : 0;
m_list.InsertItem(&lv);
diff --git a/src/mpc-hc/FGManagerBDA.cpp b/src/mpc-hc/FGManagerBDA.cpp
index 22ed25a11..c144ed200 100644
--- a/src/mpc-hc/FGManagerBDA.cpp
+++ b/src/mpc-hc/FGManagerBDA.cpp
@@ -981,7 +981,7 @@ HRESULT CFGManagerBDA::CreateMicrosoftDemux(CComPtr<IBaseFilter>& pMpeg2Demux)
case DVB_PSI:
if (!Stream.GetFindExisting() ||
(pPin = FindPin(pMpeg2Demux, PINDIR_OUTPUT, Stream.GetMediaType())) == nullptr) {
- CheckNoLog(pDemux->CreateOutputPin((AM_MEDIA_TYPE*)Stream.GetMediaType(), Stream.GetName(), &pPin));
+ CheckNoLog(pDemux->CreateOutputPin(const_cast<AM_MEDIA_TYPE*>(Stream.GetMediaType()), const_cast<LPWSTR>(Stream.GetName()), &pPin));
}
CheckNoLog(Connect(pPin, nullptr, false));
Stream.SetPin(pPin);
@@ -994,7 +994,7 @@ HRESULT CFGManagerBDA::CreateMicrosoftDemux(CComPtr<IBaseFilter>& pMpeg2Demux)
if ((nType == m_nCurVideoType) || (m_nDVBRebuildFilterGraph == DVB_REBUILD_FG_NEVER)) {
if (!Stream.GetFindExisting() ||
(pPin = FindPin(pMpeg2Demux, PINDIR_OUTPUT, Stream.GetMediaType())) == nullptr) {
- CheckNoLog(pDemux->CreateOutputPin((AM_MEDIA_TYPE*)Stream.GetMediaType(), Stream.GetName(), &pPin));
+ CheckNoLog(pDemux->CreateOutputPin(const_cast<AM_MEDIA_TYPE*>(Stream.GetMediaType()), const_cast<LPWSTR>(Stream.GetName()), &pPin));
}
if (m_nCurVideoType == nType) {
CheckNoLog(Connect(pPin, nullptr, true));
@@ -1016,7 +1016,7 @@ HRESULT CFGManagerBDA::CreateMicrosoftDemux(CComPtr<IBaseFilter>& pMpeg2Demux)
(bAudioEAC3 && (nType == DVB_EAC3)) || (bAudioLATM && (nType == DVB_LATM))) {
if (!Stream.GetFindExisting() ||
(pPin = FindPin(pMpeg2Demux, PINDIR_OUTPUT, Stream.GetMediaType())) == nullptr) {
- CheckNoLog(pDemux->CreateOutputPin((AM_MEDIA_TYPE*)Stream.GetMediaType(), Stream.GetName(), &pPin));
+ CheckNoLog(pDemux->CreateOutputPin(const_cast<AM_MEDIA_TYPE*>(Stream.GetMediaType()), const_cast<LPWSTR>(Stream.GetName()), &pPin));
}
if (m_nCurAudioType == nType) {
CheckNoLog(Connect(pPin, nullptr, true));
@@ -1033,7 +1033,7 @@ HRESULT CFGManagerBDA::CreateMicrosoftDemux(CComPtr<IBaseFilter>& pMpeg2Demux)
case DVB_SUB:
if (!Stream.GetFindExisting() ||
(pPin = FindPin(pMpeg2Demux, PINDIR_OUTPUT, Stream.GetMediaType())) == nullptr) {
- CheckNoLog(pDemux->CreateOutputPin((AM_MEDIA_TYPE*)Stream.GetMediaType(), Stream.GetName(), &pPin));
+ CheckNoLog(pDemux->CreateOutputPin(const_cast<AM_MEDIA_TYPE*>(Stream.GetMediaType()), const_cast<LPWSTR>(Stream.GetName()), &pPin));
}
CheckNoLog(Connect(pPin, nullptr, false));
CComPtr<IPin> pPinTo;
@@ -1071,13 +1071,13 @@ HRESULT CFGManagerBDA::SetChannelInternal(CDVBChannel* pChannel)
if (pChannel->GetVideoType() == DVB_H264) {
UpdateMediaType(&vih2_H264, pChannel);
- hr = pDemux->SetOutputPinMediaType(L"h264", const_cast<AM_MEDIA_TYPE*>(&mt_H264));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"h264"), const_cast<AM_MEDIA_TYPE*>(&mt_H264));
} else if (pChannel->GetVideoType() == DVB_HEVC) {
UpdateMediaType(&vih2_HEVC, pChannel);
- hr = pDemux->SetOutputPinMediaType(L"HEVC", const_cast<AM_MEDIA_TYPE*>(&mt_HEVC));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"HEVC"), const_cast<AM_MEDIA_TYPE*>(&mt_HEVC));
} else {
UpdateMediaType(&sMpv_fmt, pChannel);
- hr = pDemux->SetOutputPinMediaType(L"mpv", const_cast<AM_MEDIA_TYPE*>(&mt_Mpv));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"mpv"), const_cast<AM_MEDIA_TYPE*>(&mt_Mpv));
}
if (m_nCurVideoType != pChannel->GetVideoType() || GetState() == State_Stopped) {
if (s.nDVBStopFilterGraph == DVB_STOP_FG_WHEN_SWITCHING && GetState() != State_Stopped) {
@@ -1186,16 +1186,16 @@ HRESULT CFGManagerBDA::SwitchStream(DVB_STREAM_TYPE nOldType, DVB_STREAM_TYPE nN
switch (nNewType) {
case DVB_MPA:
- hr = pDemux->SetOutputPinMediaType(L"mpa", const_cast<AM_MEDIA_TYPE*>(&mt_Mpa));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"mpa"), const_cast<AM_MEDIA_TYPE*>(&mt_Mpa));
break;
case DVB_AC3:
- hr = pDemux->SetOutputPinMediaType(L"ac3", const_cast<AM_MEDIA_TYPE*>(&mt_Ac3));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"ac3"), const_cast<AM_MEDIA_TYPE*>(&mt_Ac3));
break;
case DVB_EAC3:
- hr = pDemux->SetOutputPinMediaType(L"eac3", const_cast<AM_MEDIA_TYPE*>(&mt_Eac3));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"eac3"), const_cast<AM_MEDIA_TYPE*>(&mt_Eac3));
break;
case DVB_LATM:
- hr = pDemux->SetOutputPinMediaType(L"latm", const_cast<AM_MEDIA_TYPE*>(&mt_latm));
+ hr = pDemux->SetOutputPinMediaType(const_cast<LPWSTR>(L"latm"), const_cast<AM_MEDIA_TYPE*>(&mt_latm));
break;
}
}
diff --git a/src/mpc-hc/FGManagerBDA.h b/src/mpc-hc/FGManagerBDA.h
index 234e10286..117fa7e21 100644
--- a/src/mpc-hc/FGManagerBDA.h
+++ b/src/mpc-hc/FGManagerBDA.h
@@ -1,5 +1,5 @@
/*
- * (C) 2009-2016 see Authors.txt
+ * (C) 2009-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -38,7 +38,7 @@ public:
, m_ulMappedPID(0) {
}
- CDVBStream(LPWSTR strName, const AM_MEDIA_TYPE* pmt, bool bFindExisting = false, MEDIA_SAMPLE_CONTENT nMsc = MEDIA_ELEMENTARY_STREAM)
+ CDVBStream(LPCWSTR strName, const AM_MEDIA_TYPE* pmt, bool bFindExisting = false, MEDIA_SAMPLE_CONTENT nMsc = MEDIA_ELEMENTARY_STREAM)
: m_pmt(pmt)
, m_bFindExisting(bFindExisting)
, m_Name(strName)
@@ -46,7 +46,7 @@ public:
, m_ulMappedPID(0) {
}
- LPWSTR GetName() { return m_Name; };
+ LPCWSTR GetName() const { return m_Name; };
const AM_MEDIA_TYPE* GetMediaType() { return m_pmt; };
bool GetFindExisting() const { return m_bFindExisting; };
IBaseFilter* GetFilter() { return m_pFilter; };
@@ -83,7 +83,7 @@ private:
CComPtr<IBaseFilter> m_pFilter;
const AM_MEDIA_TYPE* m_pmt;
bool m_bFindExisting;
- LPWSTR m_Name;
+ LPCWSTR m_Name;
MEDIA_SAMPLE_CONTENT m_nMsc;
ULONG m_ulMappedPID;
diff --git a/src/mpc-hc/MainFrm.cpp b/src/mpc-hc/MainFrm.cpp
index 294f36bef..7794ed904 100644
--- a/src/mpc-hc/MainFrm.cpp
+++ b/src/mpc-hc/MainFrm.cpp
@@ -9825,7 +9825,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
ASSERT(videoRect.Height() == lround(dScaledVRHeight));
if (m_pMVRC) {
- static constexpr const LPWSTR madVRModesMap[] = {
+ static constexpr const LPCWSTR madVRModesMap[] = {
L"50%",
L"100%",
L"200%",
@@ -9836,7 +9836,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
L"touchInside"
};
- m_pMVRC->SendCommandString("setZoomMode", madVRModesMap[iDefaultVideoSize]);
+ m_pMVRC->SendCommandString("setZoomMode", const_cast<LPWSTR>(madVRModesMap[iDefaultVideoSize]));
m_pMVRC->SendCommandDouble("setZoomFactorX", madVRZoomFactor * m_ZoomX);
m_pMVRC->SendCommandDouble("setZoomFactorY", madVRZoomFactor * m_ZoomY);
m_pMVRC->SendCommandDouble("setZoomOffsetX", 2 * m_PosX - 1.0);
@@ -9849,7 +9849,7 @@ void CMainFrame::MoveVideoWindow(bool fShowStats/* = false*/, bool bSetStoppedVi
SendStatusMessage(info, 3000);
}
} else if (m_pMVRC) {
- m_pMVRC->SendCommandString("setZoomMode", L"autoDetect");
+ m_pMVRC->SendCommandString("setZoomMode", const_cast<LPWSTR>(L"autoDetect"));
}
windowRect.top -= nCompensateForMenubar;
diff --git a/src/mpc-hc/OpenDirHelper.cpp b/src/mpc-hc/OpenDirHelper.cpp
index 244ee9f81..5b18a31cc 100644
--- a/src/mpc-hc/OpenDirHelper.cpp
+++ b/src/mpc-hc/OpenDirHelper.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -29,7 +29,7 @@ WNDPROC COpenDirHelper::CBProc;
bool COpenDirHelper::m_incl_subdir;
CString COpenDirHelper::strLastOpenDir;
-void COpenDirHelper::SetFont(HWND hwnd, const LPTSTR FontName, int FontSize)
+void COpenDirHelper::SetFont(HWND hwnd, LPCTSTR FontName, int FontSize)
{
HFONT hf, hfOld;
LOGFONT lf;
diff --git a/src/mpc-hc/OpenDirHelper.h b/src/mpc-hc/OpenDirHelper.h
index d6d48e6d8..85311ff42 100644
--- a/src/mpc-hc/OpenDirHelper.h
+++ b/src/mpc-hc/OpenDirHelper.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2013, 2015 see Authors.txt
+ * (C) 2006-2013, 2015, 2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -28,7 +28,7 @@ public:
static bool m_incl_subdir;
static CString strLastOpenDir;
- static void SetFont(HWND hwnd, const LPTSTR FontName, int FontSize);
+ static void SetFont(HWND hwnd, LPCTSTR FontName, int FontSize);
// Subclass procedure
static LRESULT APIENTRY CheckBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
diff --git a/src/mpc-hc/PPageExternalFilters.cpp b/src/mpc-hc/PPageExternalFilters.cpp
index 485b6db0a..bf5a8ba29 100644
--- a/src/mpc-hc/PPageExternalFilters.cpp
+++ b/src/mpc-hc/PPageExternalFilters.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2016 see Authors.txt
+ * (C) 2006-2017 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -931,7 +931,7 @@ BOOL CPPageExternalFilters::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pRe
if (POSITION pos = (POSITION)m_filters.GetItemData(nIndex)) {
CAutoPtr<FilterOverride>& f = m_pFilters.GetAt(pos);
- pTTT->lpszText = (f->type == FilterOverride::EXTERNAL) ? (LPTSTR)(LPCTSTR)f->path : _T("Registered filter");
+ pTTT->lpszText = const_cast<LPTSTR>(f->type == FilterOverride::EXTERNAL ? f->path.GetString() : _T("Registered filter"));
} else {
ASSERT(FALSE);
}
diff --git a/src/thirdparty/AsyncReader/asyncrdr.cpp b/src/thirdparty/AsyncReader/asyncrdr.cpp
index ab7a9ec31..3213ba4e5 100644
--- a/src/thirdparty/AsyncReader/asyncrdr.cpp
+++ b/src/thirdparty/AsyncReader/asyncrdr.cpp
@@ -389,7 +389,7 @@ CAsyncOutputPin::Connect(
#pragma warning(disable:4355)
CAsyncReader::CAsyncReader(
- TCHAR *pName,
+ LPCTSTR pName,
LPUNKNOWN pUnk,
CAsyncStream *pStream,
HRESULT *phr,
diff --git a/src/thirdparty/AsyncReader/asyncrdr.h b/src/thirdparty/AsyncReader/asyncrdr.h
index 96f2ccb89..33f447ef6 100644
--- a/src/thirdparty/AsyncReader/asyncrdr.h
+++ b/src/thirdparty/AsyncReader/asyncrdr.h
@@ -196,7 +196,7 @@ public:
// construction / destruction
CAsyncReader(
- TCHAR *pName,
+ LPCTSTR pName,
LPUNKNOWN pUnk,
CAsyncStream *pStream,
HRESULT *phr,
diff --git a/src/thirdparty/BaseClasses/amvideo.cpp b/src/thirdparty/BaseClasses/amvideo.cpp
index f8e36c005..6af1a3fdd 100644
--- a/src/thirdparty/BaseClasses/amvideo.cpp
+++ b/src/thirdparty/BaseClasses/amvideo.cpp
@@ -23,8 +23,8 @@ const DWORD bits888[] = {0xFF0000,0x00FF00,0x0000FF};
const struct {
const GUID *pSubtype;
WORD BitCount;
- CHAR *pName;
- WCHAR *wszName;
+ LPCSTR pName;
+ LPCWSTR wszName;
} BitCountMap[] = { &MEDIASUBTYPE_RGB1, 1, "RGB Monochrome", L"RGB Monochrome",
&MEDIASUBTYPE_RGB4, 4, "RGB VGA", L"RGB VGA",
&MEDIASUBTYPE_RGB8, 8, "RGB 8", L"RGB 8",
@@ -173,12 +173,12 @@ int LocateSubtype(const GUID *pSubtype)
-STDAPI_(WCHAR *) GetSubtypeNameW(const GUID *pSubtype)
+STDAPI_(LPCWSTR) GetSubtypeNameW(const GUID *pSubtype)
{
return BitCountMap[LocateSubtype(pSubtype)].wszName;
}
-STDAPI_(CHAR *) GetSubtypeNameA(const GUID *pSubtype)
+STDAPI_(LPCSTR) GetSubtypeNameA(const GUID *pSubtype)
{
return BitCountMap[LocateSubtype(pSubtype)].pName;
}
@@ -190,7 +190,7 @@ STDAPI_(CHAR *) GetSubtypeNameA(const GUID *pSubtype)
// this is here for people that linked to it directly; most people
// would use the header file that picks the A or W version.
-STDAPI_(CHAR *) GetSubtypeName(const GUID *pSubtype)
+STDAPI_(LPCSTR) GetSubtypeName(const GUID *pSubtype)
{
return GetSubtypeNameA(pSubtype);
}
diff --git a/src/thirdparty/BaseClasses/videoctl.cpp b/src/thirdparty/BaseClasses/videoctl.cpp
index 85119d485..d8e293d32 100644
--- a/src/thirdparty/BaseClasses/videoctl.cpp
+++ b/src/thirdparty/BaseClasses/videoctl.cpp
@@ -15,7 +15,7 @@
// buffer in the property page class and use it for all string loading. It
// cannot be static as multiple property pages may be active simultaneously
-LPTSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPTSTR pBuffer, int iResourceID)
+LPCTSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPTSTR pBuffer, int iResourceID)
{
if (LoadString(g_hInst,iResourceID,pBuffer,STR_MAX_LENGTH) == 0) {
return TEXT("");
@@ -24,7 +24,7 @@ LPTSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPTSTR pBuffer, in
}
#ifdef UNICODE
-LPSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPSTR pBuffer, int iResourceID)
+LPCSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPSTR pBuffer, int iResourceID)
{
if (LoadStringA(g_hInst,iResourceID,pBuffer,STR_MAX_LENGTH) == 0) {
return "";
@@ -44,7 +44,7 @@ LPSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPSTR pBuffer, int
#ifndef UNICODE
-LPWSTR WINAPI WideStringFromResource(__out_ecount(STR_MAX_LENGTH) LPWSTR pBuffer, int iResourceID)
+LPCWSTR WINAPI WideStringFromResource(__out_ecount(STR_MAX_LENGTH) LPWSTR pBuffer, int iResourceID)
{
*pBuffer = 0;
diff --git a/src/thirdparty/BaseClasses/videoctl.h b/src/thirdparty/BaseClasses/videoctl.h
index 62770bd2d..aa74d79e8 100644
--- a/src/thirdparty/BaseClasses/videoctl.h
+++ b/src/thirdparty/BaseClasses/videoctl.h
@@ -17,13 +17,13 @@
// resource ID of a dialog box and returns the size of it in screen pixels
#define STR_MAX_LENGTH 256
-LPTSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPTSTR pBuffer, int iResourceID);
+LPCTSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPTSTR pBuffer, int iResourceID);
#ifdef UNICODE
#define WideStringFromResource StringFromResource
-LPSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPSTR pBuffer, int iResourceID);
+LPCSTR WINAPI StringFromResource(__out_ecount(STR_MAX_LENGTH) LPSTR pBuffer, int iResourceID);
#else
-LPWSTR WINAPI WideStringFromResource(__out_ecount(STR_MAX_LENGTH) LPWSTR pBuffer, int iResourceID);
+LPCWSTR WINAPI WideStringFromResource(__out_ecount(STR_MAX_LENGTH) LPWSTR pBuffer, int iResourceID);
#endif
diff --git a/src/thirdparty/BaseClasses/wxdebug.cpp b/src/thirdparty/BaseClasses/wxdebug.cpp
index 8c9971a2a..410900484 100644
--- a/src/thirdparty/BaseClasses/wxdebug.cpp
+++ b/src/thirdparty/BaseClasses/wxdebug.cpp
@@ -76,7 +76,7 @@ bool g_fAutoRefreshLevels = false;
LPCTSTR pBaseKey = TEXT("SOFTWARE\\Microsoft\\DirectShow\\Debug");
LPCTSTR pGlobalKey = TEXT("GLOBAL");
-static CHAR *pUnknownName = "UNKNOWN";
+static LPCSTR pUnknownName = "UNKNOWN";
LPCTSTR TimeoutName = TEXT("TIMEOUT");
@@ -1077,7 +1077,7 @@ void WINAPI DbgSetWaitTimeout(DWORD dwTimeout)
CGuidNameList GuidNames;
int g_cGuidNames = sizeof(g_GuidNames) / sizeof(g_GuidNames[0]);
- char *CGuidNameList::operator [] (const GUID &guid)
+ LPCSTR CGuidNameList::operator [] (const GUID &guid)
{
for (int i = 0; i < g_cGuidNames; i++) {
if (g_GuidNames[i].guid == guid) {
diff --git a/src/thirdparty/BaseClasses/wxdebug.h b/src/thirdparty/BaseClasses/wxdebug.h
index 34ceefeec..be80d128d 100644
--- a/src/thirdparty/BaseClasses/wxdebug.h
+++ b/src/thirdparty/BaseClasses/wxdebug.h
@@ -254,13 +254,13 @@ typedef struct tag_ObjectDesc {
// Returns the name defined in uuids.h as a string
typedef struct {
- CHAR *szName;
+ LPCSTR szName;
GUID guid;
} GUID_STRING_ENTRY;
class CGuidNameList {
public:
- CHAR *operator [] (const GUID& guid);
+ LPCSTR operator [] (const GUID& guid);
};
extern CGuidNameList GuidNames;
diff --git a/src/thirdparty/BaseClasses/wxutil.h b/src/thirdparty/BaseClasses/wxutil.h
index 1a44c255e..a1c1704bf 100644
--- a/src/thirdparty/BaseClasses/wxutil.h
+++ b/src/thirdparty/BaseClasses/wxutil.h
@@ -414,8 +414,8 @@ STDAPI_(WORD) GetBitCount(const GUID *pSubtype);
//
// STDAPI_(/* T */ CHAR *) GetSubtypeName(const GUID *pSubtype);
-STDAPI_(CHAR *) GetSubtypeNameA(const GUID *pSubtype);
-STDAPI_(WCHAR *) GetSubtypeNameW(const GUID *pSubtype);
+STDAPI_(LPCSTR) GetSubtypeNameA(const GUID *pSubtype);
+STDAPI_(LPCWSTR) GetSubtypeNameW(const GUID *pSubtype);
#ifdef UNICODE
#define GetSubtypeName GetSubtypeNameW