summaryrefslogtreecommitdiffstats
path: root/loader/dshow/outputpin.h
diff options
context:
space:
mode:
Diffstat (limited to 'loader/dshow/outputpin.h')
-rw-r--r--loader/dshow/outputpin.h139
1 files changed, 26 insertions, 113 deletions
diff --git a/loader/dshow/outputpin.h b/loader/dshow/outputpin.h
index ab516e1506..7cedd7dfed 100644
--- a/loader/dshow/outputpin.h
+++ b/loader/dshow/outputpin.h
@@ -1,124 +1,37 @@
-/* "output pin" - the one that connects to output of filter. */
+#ifndef DS_OUTPUTPIN_H
+#define DS_OUTPUTPIN_H
+
+/* "output pin" - the one that connects to output of filter. */
-#ifndef OUTPUTPIN_H
-#define OUTPUTPIN_H
#include "interfaces.h"
#include "guids.h"
-#include "default.h"
#include "allocator.h"
-class COutputPin: public IPin, public IMemInputPin
+
+struct COutputPin;
+
+struct COutputMemPin : public IMemInputPin
{
- int refcount;
- AM_MEDIA_TYPE type;
- IPin* remote;
char** frame_pointer;
long* frame_size_pointer;
MemAllocator* pAllocator;
-public:
+ COutputPin* parent;
+};
+
+struct COutputPin : public IPin
+{
+ COutputMemPin* mempin;
+ int refcount;
+ AM_MEDIA_TYPE type;
+ IPin* remote;
COutputPin(const AM_MEDIA_TYPE& vhdr);
~COutputPin();
- void SetFramePointer(char** z){frame_pointer=z;}
- void SetPointer2(char* p) { if(pAllocator) pAllocator->SetPointer(p); }
- void SetFrameSizePointer(long* z){frame_size_pointer=z;}
- void SetNewFormat(const AM_MEDIA_TYPE& a){type=a;}
- static HRESULT STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
- static HRESULT STDCALL AddRef(IUnknown* This);
- static HRESULT STDCALL Release(IUnknown* This);
-
- static HRESULT STDCALL M_QueryInterface(IUnknown* This, GUID* iid, void** ppv);
- static HRESULT STDCALL M_AddRef(IUnknown* This);
- static HRESULT STDCALL M_Release(IUnknown* This);
-
- static HRESULT STDCALL Connect (
- IPin * This,
- /* [in] */ IPin *pReceivePin,
- /* [in] */ /*const */AM_MEDIA_TYPE *pmt);
-
- static HRESULT STDCALL ReceiveConnection (
- IPin * This,
- /* [in] */ IPin *pConnector,
- /* [in] */ const AM_MEDIA_TYPE *pmt);
-
- static HRESULT STDCALL Disconnect (
- IPin * This);
-
- static HRESULT STDCALL ConnectedTo (
- IPin * This,
- /* [out] */ IPin **pPin);
-
- static HRESULT STDCALL ConnectionMediaType (
- IPin * This,
- /* [out] */ AM_MEDIA_TYPE *pmt);
-
- static HRESULT STDCALL QueryPinInfo (
- IPin * This,
- /* [out] */ PIN_INFO *pInfo);
-
- static HRESULT STDCALL QueryDirection (
- IPin * This,
- /* [out] */ PIN_DIRECTION *pPinDir);
-
- static HRESULT STDCALL QueryId (
- IPin * This,
- /* [out] */ LPWSTR *Id);
-
- static HRESULT STDCALL QueryAccept (
- IPin * This,
- /* [in] */ const AM_MEDIA_TYPE *pmt);
-
- static HRESULT STDCALL EnumMediaTypes (
- IPin * This,
- /* [out] */ IEnumMediaTypes **ppEnum);
-
- static HRESULT STDCALL QueryInternalConnections (
- IPin * This,
- /* [out] */ IPin **apPin,
- /* [out][in] */ ULONG *nPin);
-
- static HRESULT STDCALL EndOfStream (
- IPin * This);
-
- static HRESULT STDCALL BeginFlush (
- IPin * This);
-
- static HRESULT STDCALL EndFlush (
- IPin * This);
-
- static HRESULT STDCALL NewSegment (
- IPin * This,
- /* [in] */ REFERENCE_TIME tStart,
- /* [in] */ REFERENCE_TIME tStop,
- /* [in] */ double dRate);
-
-
-
-
-
-
- static HRESULT STDCALL GetAllocator(
- IMemInputPin * This,
- /* [out] */ IMemAllocator **ppAllocator) ;
-
- static HRESULT STDCALL NotifyAllocator(
- IMemInputPin * This,
- /* [in] */ IMemAllocator *pAllocator,
- /* [in] */ int bReadOnly) ;
-
- static HRESULT STDCALL GetAllocatorRequirements(
- IMemInputPin * This,
- /* [out] */ ALLOCATOR_PROPERTIES *pProps) ;
-
- static HRESULT STDCALL Receive(
- IMemInputPin * This,
- /* [in] */ IMediaSample *pSample) ;
-
- static HRESULT STDCALL ReceiveMultiple(
- IMemInputPin * This,
- /* [size_is][in] */ IMediaSample **pSamples,
- /* [in] */ long nSamples,
- /* [out] */ long *nSamplesProcessed) ;
-
- static HRESULT STDCALL ReceiveCanBlock(
- IMemInputPin * This) ;
+ void SetFramePointer(char** z) { mempin->frame_pointer = z; }
+ void SetPointer2(char* p) {
+ if (mempin->pAllocator)
+ mempin->pAllocator->SetPointer(p);
+ }
+ void SetFrameSizePointer(long* z) { mempin->frame_size_pointer = z; }
+ void SetNewFormat(const AM_MEDIA_TYPE& a) { type = a; }
};
-#endif
+
+#endif /* DS_OUTPUTPIN_H */