mirror of https://github.com/PCSX2/pcsx2.git
baseclasses|gsdx: Move code from baseclasses to GSdx
Moved code seems to be from Gabest. Only the code that is currently used has been kept.
This commit is contained in:
parent
7ea0273119
commit
b84b2808f4
|
@ -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
|
||||
//
|
||||
|
@ -332,15 +362,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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -182,68 +182,7 @@ typedef struct {
|
|||
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
|
||||
#endif
|
||||
|
||||
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 BeginEnumCachedFilters(pGraphConfig, pEnumFilters, pBaseFilter) \
|
||||
{CComPtr<IEnumFilters> pEnumFilters; \
|
||||
if(pGraphConfig && SUCCEEDED(pGraphConfig->EnumCacheFilter(&pEnumFilters))) \
|
||||
{ \
|
||||
for(CComPtr<IBaseFilter> pBaseFilter; S_OK == pEnumFilters->Next(1, &pBaseFilter, 0); pBaseFilter = NULL) \
|
||||
{ \
|
||||
|
||||
#define EndEnumCachedFilters }}}
|
||||
|
||||
#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 }}}
|
||||
|
||||
#define BeginEnumMediaTypes(pPin, pEnumMediaTypes, pMediaType) \
|
||||
{CComPtr<IEnumMediaTypes> pEnumMediaTypes; \
|
||||
if(pPin && SUCCEEDED(pPin->EnumMediaTypes(&pEnumMediaTypes))) \
|
||||
{ \
|
||||
AM_MEDIA_TYPE* pMediaType = NULL; \
|
||||
for(; S_OK == pEnumMediaTypes->Next(1, &pMediaType, NULL); DeleteMediaType(pMediaType), pMediaType = NULL) \
|
||||
{ \
|
||||
|
||||
#define EndEnumMediaTypes(pMediaType) } if(pMediaType) DeleteMediaType(pMediaType); }}
|
||||
|
||||
#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 }}}
|
||||
|
||||
#else
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Reference in New Issue