annotate loader/dshow/outputpin.h @ 1351:d0d27f5800ea

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