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