summaryrefslogtreecommitdiffstats
path: root/loader/dshow/inputpin.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-21 19:12:39 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-21 19:12:39 +0000
commit6e718683eb5125bd8f41926a3c3acb5c68948f10 (patch)
treeedd9cd90f0d2881c4e53b3875ec31a867a7ae0e9 /loader/dshow/inputpin.h
parentd1abb9c4b3280dc3592470f3bda83aaecc240c97 (diff)
downloadmpv-6e718683eb5125bd8f41926a3c3acb5c68948f10.tar.bz2
mpv-6e718683eb5125bd8f41926a3c3acb5c68948f10.tar.xz
C++ -> C (import from avifile cvs)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3057 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/inputpin.h')
-rw-r--r--loader/dshow/inputpin.h237
1 files changed, 46 insertions, 191 deletions
diff --git a/loader/dshow/inputpin.h b/loader/dshow/inputpin.h
index 90d21af123..031823d7eb 100644
--- a/loader/dshow/inputpin.h
+++ b/loader/dshow/inputpin.h
@@ -2,215 +2,70 @@
#define DS_INPUTPIN_H
#include "interfaces.h"
-#include "guids.h"
-#include "iunk.h"
-class CBaseFilter2;
-class CBaseFilter: public IBaseFilter
+typedef struct _CBaseFilter2 CBaseFilter2;
+struct _CBaseFilter2
{
+ IBaseFilter_vt* vt;
+ IPin* pin;
+ GUID interfaces[5];
+ DECLARE_IUNKNOWN();
+
+ IPin* ( *GetPin )(CBaseFilter2* This);
+};
+
+CBaseFilter2* CBaseFilter2Create();
+
+
+typedef struct _CBaseFilter CBaseFilter;
+struct _CBaseFilter
+{
+ IBaseFilter_vt* vt;
IPin* pin;
IPin* unused_pin;
- static GUID interfaces[];
- DECLARE_IUNKNOWN(CBaseFilter)
-public:
- CBaseFilter(const AM_MEDIA_TYPE& vhdr, CBaseFilter2* parent);
- ~CBaseFilter(){delete vt;pin->vt->Release((IUnknown*)pin);unused_pin->vt->Release((IUnknown*)unused_pin);}
-
- IPin* GetPin() {return pin;}
- IPin* GetUnusedPin() {return unused_pin;}
-
- static long STDCALL GetClassID (IBaseFilter * This,
- /* [out] */ CLSID *pClassID);
-
- static long STDCALL Stop (IBaseFilter * This);
- static long STDCALL Pause (IBaseFilter * This);
- static long STDCALL Run (IBaseFilter * This, REFERENCE_TIME tStart);
- static long STDCALL GetState (IBaseFilter * This,
- /* [in] */ unsigned long dwMilliSecsTimeout,
- // /* [out] */ FILTER_STATE *State);
- void* State);
-
- static long STDCALL SetSyncSource (IBaseFilter * This,
- /* [in] */ IReferenceClock *pClock);
- static long STDCALL GetSyncSource (IBaseFilter * This,
- /* [out] */ IReferenceClock **pClock);
- static long STDCALL EnumPins (IBaseFilter * This,
- /* [out] */ IEnumPins **ppEnum);
- static long STDCALL FindPin (IBaseFilter * This,
- /* [string][in] */ const unsigned short* Id,
- /* [out] */ IPin **ppPin);
- static long STDCALL QueryFilterInfo (IBaseFilter * This,
- ///* [out] */ FILTER_INFO *pInfo);
- void* pInfo);
- static long STDCALL JoinFilterGraph (IBaseFilter * This,
- /* [in] */ IFilterGraph *pGraph,
- /* [string][in] */
- const unsigned short* pName);
- static long STDCALL QueryVendorInfo (IBaseFilter * This,
- /* [string][out] */
- unsigned short* *pVendorInfo);
+ GUID interfaces[2];
+ DECLARE_IUNKNOWN();
+
+ IPin* ( *GetPin )(CBaseFilter* This);
+ IPin* ( *GetUnusedPin )(CBaseFilter* This);
};
-class CInputPin: public IPin
+CBaseFilter* CBaseFilterCreate(const AM_MEDIA_TYPE* vhdr, CBaseFilter2* parent);
+
+
+typedef struct _CInputPin CInputPin;
+struct _CInputPin
{
+ IPin_vt* vt;
AM_MEDIA_TYPE type;
CBaseFilter* parent;
- static GUID interfaces[];
- DECLARE_IUNKNOWN(CInputPin)
-public:
- CInputPin(CBaseFilter* parent, const AM_MEDIA_TYPE& vhdr);
- ~CInputPin(){delete vt;}
-// IPin* GetPin();
-
-// static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
-// static long STDCALL AddRef(IUnknown* This);
-// static long STDCALL Release(IUnknown* This);
-
- static long STDCALL Connect (
- IPin * This,
- /* [in] */ IPin *pReceivePin,
- /* [in] */ AM_MEDIA_TYPE *pmt);
-
- static long STDCALL ReceiveConnection (
- IPin * This,
- /* [in] */ IPin *pConnector,
- /* [in] */ const AM_MEDIA_TYPE *pmt);
-
- static long STDCALL Disconnect (
- IPin * This);
-
- static long STDCALL ConnectedTo (
- IPin * This,
- /* [out] */ IPin **pPin);
-
- static long STDCALL ConnectionMediaType (
- IPin * This,
- /* [out] */ AM_MEDIA_TYPE *pmt);
-
- static long STDCALL QueryPinInfo (
- IPin * This,
- /* [out] */ PIN_INFO *pInfo);
-
- static long STDCALL QueryDirection (
- IPin * This,
- /* [out] */ PIN_DIRECTION *pPinDir);
-
- static long STDCALL QueryId (
- IPin * This,
- /* [out] */ unsigned short* *Id);
-
- static long STDCALL QueryAccept (
- IPin * This,
- /* [in] */ const AM_MEDIA_TYPE *pmt);
-
- static long STDCALL EnumMediaTypes (
- IPin * This,
- /* [out] */ IEnumMediaTypes **ppEnum);
-
- static long STDCALL QueryInternalConnections (
- IPin * This,
- /* [out] */ IPin **apPin,
- /* [out][in] */ unsigned long *nPin);
-
- static long STDCALL EndOfStream (
- IPin * This);
-
- static long STDCALL BeginFlush (
- IPin * This);
-
- static long STDCALL EndFlush (
- IPin * This);
-
- static long STDCALL NewSegment (
- IPin * This,
- /* [in] */ REFERENCE_TIME tStart,
- /* [in] */ REFERENCE_TIME tStop,
- /* [in] */ double dRate);
+ GUID interfaces[1];
+ DECLARE_IUNKNOWN();
};
-class CBaseFilter2: public IBaseFilter
-{
- IPin* pin;
- static GUID interfaces[];
- DECLARE_IUNKNOWN(CBaseFilter2)
-public:
- CBaseFilter2();
- ~CBaseFilter2(){delete vt;pin->vt->Release((IUnknown*)pin);}
- IPin* GetPin() {return pin;}
-
-// static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
-// static long STDCALL AddRef(IUnknown* This);
-// static long STDCALL Release(IUnknown* This);
- static long STDCALL GetClassID (
- IBaseFilter * This,
- /* [out] */ CLSID *pClassID);
-
- static long STDCALL Stop (
- IBaseFilter * This);
-
- static long STDCALL Pause (
- IBaseFilter * This);
-
- static long STDCALL Run (
- IBaseFilter * This,
- REFERENCE_TIME tStart);
-
- static long STDCALL GetState (
- IBaseFilter * This,
- /* [in] */ unsigned long dwMilliSecsTimeout,
-// /* [out] */ FILTER_STATE *State);
- void* State);
-
- static long STDCALL SetSyncSource (
- IBaseFilter * This,
- /* [in] */ IReferenceClock *pClock);
-
- static long STDCALL GetSyncSource (
- IBaseFilter * This,
- /* [out] */ IReferenceClock **pClock);
-
- static long STDCALL EnumPins (
- IBaseFilter * This,
- /* [out] */ IEnumPins **ppEnum);
-
- static long STDCALL FindPin (
- IBaseFilter * This,
- /* [string][in] */ const unsigned short* Id,
- /* [out] */ IPin **ppPin);
-
- static long STDCALL QueryFilterInfo (
- IBaseFilter * This,
-// /* [out] */ FILTER_INFO *pInfo);
- void* pInfo);
-
- static long STDCALL JoinFilterGraph (
- IBaseFilter * This,
- /* [in] */ IFilterGraph *pGraph,
- /* [string][in] */ const unsigned short* pName);
-
- static long STDCALL QueryVendorInfo (
- IBaseFilter * This,
- /* [string][out] */ unsigned short* *pVendorInfo);
-};
+CInputPin* CInputPinCreate(CBaseFilter* parent, const AM_MEDIA_TYPE* vhdr);
-struct CRemotePin: public IPin
+typedef struct CRemotePin
{
+ IPin_vt* vt;
CBaseFilter* parent;
IPin* remote_pin;
- static GUID interfaces[];
- DECLARE_IUNKNOWN(CRemotePin)
- CRemotePin(CBaseFilter* pt, IPin* rpin);
- ~CRemotePin(){delete vt;}
-};
+ GUID interfaces[1];
+ DECLARE_IUNKNOWN();
+} CRemotePin;
-struct CRemotePin2: public IPin
+CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin);
+
+
+typedef struct CRemotePin2
{
+ IPin_vt* vt;
CBaseFilter2* parent;
- static GUID interfaces[];
- DECLARE_IUNKNOWN(CRemotePin2)
- CRemotePin2(CBaseFilter2* parent);
- ~CRemotePin2(){delete vt;}
-};
+ GUID interfaces[1];
+ DECLARE_IUNKNOWN();
+} CRemotePin2;
+
+CRemotePin2* CRemotePin2Create(CBaseFilter2* parent);
#endif /* DS_INPUTPIN_H */