168
|
1 /* "output pin" - the one that connects to output of filter. */
|
|
2
|
|
3 #ifndef OUTPUTPIN_H
|
|
4 #define OUTPUTPIN_H
|
|
5 #include "interfaces.h"
|
|
6 #include "guids.h"
|
|
7 #include "default.h"
|
|
8
|
|
9 class COutputPin: public IPin, public IMemInputPin
|
|
10 {
|
|
11 int refcount;
|
|
12 AM_MEDIA_TYPE type;
|
|
13 IPin* remote;
|
|
14 char** frame_pointer;
|
|
15 long* frame_size_pointer;
|
|
16 public:
|
|
17 COutputPin(const AM_MEDIA_TYPE& vhdr);
|
|
18 ~COutputPin(){delete IPin::vt; delete IMemInputPin::vt;}
|
|
19 void SetFramePointer(char** z){frame_pointer=z;}
|
|
20 void SetFrameSizePointer(long* z){frame_size_pointer=z;}
|
|
21 void SetNewFormat(const AM_MEDIA_TYPE& a){type=a;}
|
|
22 static HRESULT STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
23 static HRESULT STDCALL AddRef(IUnknown* This);
|
|
24 static HRESULT STDCALL Release(IUnknown* This);
|
|
25
|
|
26 static HRESULT STDCALL M_QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
27 static HRESULT STDCALL M_AddRef(IUnknown* This);
|
|
28 static HRESULT STDCALL M_Release(IUnknown* This);
|
|
29
|
|
30 static HRESULT STDCALL Connect (
|
|
31 IPin * This,
|
|
32 /* [in] */ IPin *pReceivePin,
|
|
33 /* [in] */ /*const */AM_MEDIA_TYPE *pmt);
|
|
34
|
|
35 static HRESULT STDCALL ReceiveConnection (
|
|
36 IPin * This,
|
|
37 /* [in] */ IPin *pConnector,
|
|
38 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
39
|
|
40 static HRESULT STDCALL Disconnect (
|
|
41 IPin * This);
|
|
42
|
|
43 static HRESULT STDCALL ConnectedTo (
|
|
44 IPin * This,
|
|
45 /* [out] */ IPin **pPin);
|
|
46
|
|
47 static HRESULT STDCALL ConnectionMediaType (
|
|
48 IPin * This,
|
|
49 /* [out] */ AM_MEDIA_TYPE *pmt);
|
|
50
|
|
51 static HRESULT STDCALL QueryPinInfo (
|
|
52 IPin * This,
|
|
53 /* [out] */ PIN_INFO *pInfo);
|
|
54
|
|
55 static HRESULT STDCALL QueryDirection (
|
|
56 IPin * This,
|
|
57 /* [out] */ PIN_DIRECTION *pPinDir);
|
|
58
|
|
59 static HRESULT STDCALL QueryId (
|
|
60 IPin * This,
|
|
61 /* [out] */ LPWSTR *Id);
|
|
62
|
|
63 static HRESULT STDCALL QueryAccept (
|
|
64 IPin * This,
|
|
65 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
66
|
|
67 static HRESULT STDCALL EnumMediaTypes (
|
|
68 IPin * This,
|
|
69 /* [out] */ IEnumMediaTypes **ppEnum);
|
|
70
|
|
71 static HRESULT STDCALL QueryInternalConnections (
|
|
72 IPin * This,
|
|
73 /* [out] */ IPin **apPin,
|
|
74 /* [out][in] */ ULONG *nPin);
|
|
75
|
|
76 static HRESULT STDCALL EndOfStream (
|
|
77 IPin * This);
|
|
78
|
|
79 static HRESULT STDCALL BeginFlush (
|
|
80 IPin * This);
|
|
81
|
|
82 static HRESULT STDCALL EndFlush (
|
|
83 IPin * This);
|
|
84
|
|
85 static HRESULT STDCALL NewSegment (
|
|
86 IPin * This,
|
|
87 /* [in] */ REFERENCE_TIME tStart,
|
|
88 /* [in] */ REFERENCE_TIME tStop,
|
|
89 /* [in] */ double dRate);
|
|
90
|
|
91
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96 static HRESULT STDCALL GetAllocator(
|
|
97 IMemInputPin * This,
|
|
98 /* [out] */ IMemAllocator **ppAllocator) ;
|
|
99
|
|
100 static HRESULT STDCALL NotifyAllocator(
|
|
101 IMemInputPin * This,
|
|
102 /* [in] */ IMemAllocator *pAllocator,
|
|
103 /* [in] */ int bReadOnly) ;
|
|
104
|
|
105 static HRESULT STDCALL GetAllocatorRequirements(
|
|
106 IMemInputPin * This,
|
|
107 /* [out] */ ALLOCATOR_PROPERTIES *pProps) ;
|
|
108
|
|
109 static HRESULT STDCALL Receive(
|
|
110 IMemInputPin * This,
|
|
111 /* [in] */ IMediaSample *pSample) ;
|
|
112
|
|
113 static HRESULT STDCALL ReceiveMultiple(
|
|
114 IMemInputPin * This,
|
|
115 /* [size_is][in] */ IMediaSample **pSamples,
|
|
116 /* [in] */ long nSamples,
|
|
117 /* [out] */ long *nSamplesProcessed) ;
|
|
118
|
|
119 static HRESULT STDCALL ReceiveCanBlock(
|
|
120 IMemInputPin * This) ;
|
|
121 };
|
|
122 #endif
|