gsdx-legacy: Copy GSdx baseclasses changes

So it compiles. Bit of a pain though.
This commit is contained in:
Jonathan Li 2018-03-23 15:51:11 +00:00
parent ab9bdb009b
commit 17027c16cd
5 changed files with 45 additions and 17 deletions

View File

@ -26,6 +26,36 @@
#ifdef _WIN32
class CPinInfo : public PIN_INFO {
public:
CPinInfo() { pFilter = NULL; }
~CPinInfo() { if (pFilter) pFilter->Release(); }
};
class CFilterInfo : public FILTER_INFO {
public:
CFilterInfo() { pGraph = NULL; }
~CFilterInfo() { if (pGraph) pGraph->Release(); }
};
#define BeginEnumFilters(pFilterGraph, pEnumFilters, pBaseFilter) \
{CComPtr<IEnumFilters> pEnumFilters; \
if(pFilterGraph && SUCCEEDED(pFilterGraph->EnumFilters(&pEnumFilters))) \
{ \
for(CComPtr<IBaseFilter> pBaseFilter; S_OK == pEnumFilters->Next(1, &pBaseFilter, 0); pBaseFilter = NULL) \
{ \
#define EndEnumFilters }}}
#define BeginEnumPins(pBaseFilter, pEnumPins, pPin) \
{CComPtr<IEnumPins> pEnumPins; \
if(pBaseFilter && SUCCEEDED(pBaseFilter->EnumPins(&pEnumPins))) \
{ \
for(CComPtr<IPin> pPin; S_OK == pEnumPins->Next(1, &pPin, 0); pPin = NULL) \
{ \
#define EndEnumPins }}}
//
// GSSource
//
@ -341,15 +371,6 @@ public:
}
};
#define BeginEnumPins(pBaseFilter, pEnumPins, pPin) \
{CComPtr<IEnumPins> pEnumPins; \
if(pBaseFilter && SUCCEEDED(pBaseFilter->EnumPins(&pEnumPins))) \
{ \
for(CComPtr<IPin> pPin; S_OK == pEnumPins->Next(1, &pPin, 0); pPin = NULL) \
{ \
#define EndEnumPins }}}
static IPin* GetFirstPin(IBaseFilter* pBF, PIN_DIRECTION dir)
{
if(!pBF) return(NULL);
@ -467,11 +488,6 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recomendedResolution, float a
pPin->QueryPinInfo(&pi);
wstring s(pi.achName);
printf("- Pin [%p - %p]: %s (%s)\n", pPin.p, pPinTo.p, string(s.begin(), s.end()).c_str(), pi.dir ? "out" : "in");
BeginEnumMediaTypes(pPin, pEMT, pmt)
{
}
EndEnumMediaTypes(pmt)
}
EndEnumPins
}

View File

@ -23,6 +23,18 @@
#include "GSdx.h"
#include "GSCaptureDlg.h"
#define BeginEnumSysDev(clsid, pMoniker) \
{CComPtr<ICreateDevEnum> pDevEnum4$##clsid; \
pDevEnum4$##clsid.CoCreateInstance(CLSID_SystemDeviceEnum); \
CComPtr<IEnumMoniker> pClassEnum4$##clsid; \
if(SUCCEEDED(pDevEnum4$##clsid->CreateClassEnumerator(clsid, &pClassEnum4$##clsid, 0)) \
&& pClassEnum4$##clsid) \
{ \
for(CComPtr<IMoniker> pMoniker; pClassEnum4$##clsid->Next(1, &pMoniker, 0) == S_OK; pMoniker = NULL) \
{ \
#define EndEnumSysDev }}}
GSCaptureDlg::GSCaptureDlg()
: GSDialog(IDD_CAPTURE)
{

View File

@ -23,7 +23,7 @@
#include "GSDialog.h"
#include "resource.h"
#include "baseclasses/streams.h"
#include <streams.h>
class GSCaptureDlg : public GSDialog
{

View File

@ -937,7 +937,7 @@
<Project>{d80d4a75-c385-41bd-ae62-83d2e2b595a7}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\unfree\baseclasses\baseclasses.vcxproj">
<ProjectReference Include="..\..\3rdparty\baseclasses\baseclasses.vcxproj">
<Project>{27f17499-a372-4408-8afa-4f9f4584fbd3}</Project>
</ProjectReference>
</ItemGroup>

View File

@ -13,7 +13,7 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4456;4458;4996;4995;4324;4100;4101;4201;4556;4127;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(VTUNE_AMPLIFIER_XE_2015_DIR)include;$(SolutionDir)unfree;$(SolutionDir)3rdparty;$(SolutionDir)3rdparty\libpng;$(SolutionDir)3rdparty\opencl;$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(VTUNE_AMPLIFIER_XE_2015_DIR)include;$(SolutionDir)3rdparty\baseclasses;$(SolutionDir)3rdparty;$(SolutionDir)3rdparty\libpng;$(SolutionDir)3rdparty\opencl;$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>