3056
|
1
|
2069
|
2 #include "wine/winerror.h"
|
3056
|
3 #include "wine/windef.h"
|
|
4 #include "outputpin.h"
|
|
5 #include <stdio.h>
|
|
6 #include <string.h>
|
713
|
7
|
168
|
8 /*
|
|
9 An object beyond interface IEnumMediaTypes.
|
|
10 Returned by COutputPin through call IPin::EnumMediaTypes().
|
|
11 */
|
|
12
|
3056
|
13 typedef struct CEnumMediaTypes
|
168
|
14 {
|
3056
|
15 IEnumMediaTypes_vt* vt;
|
168
|
16 AM_MEDIA_TYPE type;
|
3056
|
17 GUID interfaces[2];
|
|
18 DECLARE_IUNKNOWN();
|
|
19 } CEnumMediaTypes;
|
1545
|
20
|
168
|
21
|
1545
|
22 static HRESULT STDCALL CEnumMediaTypes_Next(IEnumMediaTypes * This,
|
|
23 /* [in] */ ULONG cMediaTypes,
|
|
24 /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes,
|
|
25 /* [out] */ ULONG *pcFetched)
|
168
|
26 {
|
3056
|
27 AM_MEDIA_TYPE* type = &((CEnumMediaTypes*)This)->type;
|
168
|
28 Debug printf("CEnumMediaTypes::Next() called\n");
|
1545
|
29 if (!ppMediaTypes)
|
|
30 return E_INVALIDARG;
|
|
31 if (!pcFetched && (cMediaTypes!=1))
|
|
32 return E_INVALIDARG;
|
|
33 if (cMediaTypes <= 0)
|
|
34 return 0;
|
|
35
|
|
36 if (pcFetched)
|
|
37 *pcFetched=1;
|
|
38 ppMediaTypes[0] = (AM_MEDIA_TYPE *)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
|
3056
|
39 // copy structures - C can handle this...
|
|
40 **ppMediaTypes = *type;
|
1545
|
41 if (ppMediaTypes[0]->pbFormat)
|
168
|
42 {
|
|
43 ppMediaTypes[0]->pbFormat=(char *)CoTaskMemAlloc(ppMediaTypes[0]->cbFormat);
|
3056
|
44 memcpy(ppMediaTypes[0]->pbFormat, type->pbFormat, ppMediaTypes[0]->cbFormat);
|
168
|
45 }
|
1545
|
46 if (cMediaTypes == 1)
|
|
47 return 0;
|
168
|
48 return 1;
|
|
49 }
|
1545
|
50
|
|
51 /* I expect that these methods are unused. */
|
|
52 static HRESULT STDCALL CEnumMediaTypes_Skip(IEnumMediaTypes * This,
|
|
53 /* [in] */ ULONG cMediaTypes)
|
168
|
54 {
|
|
55 Debug printf("CEnumMediaTypes::Skip() called\n");
|
|
56 return E_NOTIMPL;
|
|
57 }
|
|
58
|
1545
|
59 static HRESULT STDCALL CEnumMediaTypes_Reset(IEnumMediaTypes * This)
|
168
|
60 {
|
|
61 Debug printf("CEnumMediaTypes::Reset() called\n");
|
|
62 return 0;
|
|
63 }
|
|
64
|
1545
|
65 static HRESULT STDCALL CEnumMediaTypes_Clone(IEnumMediaTypes * This,
|
|
66 /* [out] */ IEnumMediaTypes **ppEnum)
|
168
|
67 {
|
|
68 Debug printf("CEnumMediaTypes::Clone() called\n");
|
|
69 return E_NOTIMPL;
|
|
70 }
|
|
71
|
3056
|
72 void CEnumMediaTypes_Destroy(CEnumMediaTypes* This)
|
1545
|
73 {
|
3056
|
74 free(This->vt);
|
|
75 free(This);
|
|
76 }
|
|
77
|
|
78 // IPin->IUnknown methods
|
|
79 IMPLEMENT_IUNKNOWN(CEnumMediaTypes)
|
1545
|
80
|
3056
|
81 CEnumMediaTypes* CEnumMediaTypesCreate(const AM_MEDIA_TYPE* amt)
|
|
82 {
|
|
83 CEnumMediaTypes *This = (CEnumMediaTypes*) malloc(sizeof(CEnumMediaTypes)) ;
|
|
84 This->refcount = 1;
|
|
85 This->type = *amt;
|
|
86
|
|
87 This->vt = (IEnumMediaTypes_vt*) malloc(sizeof(IEnumMediaTypes_vt));
|
|
88 This->vt->QueryInterface = CEnumMediaTypes_QueryInterface;
|
|
89 This->vt->AddRef = CEnumMediaTypes_AddRef;
|
|
90 This->vt->Release = CEnumMediaTypes_Release;
|
|
91 This->vt->Next = CEnumMediaTypes_Next;
|
|
92 This->vt->Skip = CEnumMediaTypes_Skip;
|
|
93 This->vt->Reset = CEnumMediaTypes_Reset;
|
|
94 This->vt->Clone = CEnumMediaTypes_Clone;
|
|
95
|
|
96 This->interfaces[0] = IID_IUnknown;
|
|
97 This->interfaces[1] = IID_IEnumMediaTypes;
|
|
98
|
|
99 return This;
|
1545
|
100 }
|
|
101
|
|
102
|
3056
|
103 /*************
|
|
104 * COutputPin
|
|
105 *************/
|
168
|
106
|
1545
|
107
|
|
108 static HRESULT STDCALL COutputPin_QueryInterface(IUnknown* This, GUID* iid, void** ppv)
|
168
|
109 {
|
3056
|
110 COutputPin* p = (COutputPin*) This;
|
|
111
|
1545
|
112 Debug printf("COutputPin_QueryInterface(%p) called\n", This);
|
|
113 if (!ppv)
|
|
114 return E_INVALIDARG;
|
|
115
|
|
116 if (memcmp(iid, &IID_IUnknown, 16) == 0)
|
168
|
117 {
|
1545
|
118 *ppv = p;
|
|
119 p->vt->AddRef(This);
|
|
120 return 0;
|
168
|
121 }
|
1545
|
122 if (memcmp(iid, &IID_IMemInputPin, 16) == 0)
|
168
|
123 {
|
1545
|
124 *ppv = p->mempin;
|
|
125 p->mempin->vt->AddRef((IUnknown*)*ppv);
|
168
|
126 return 0;
|
|
127 }
|
|
128
|
|
129 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \
|
713
|
130 "%02x%02x%02x%02x%02x%02x\n",
|
|
131 iid->f1, iid->f2, iid->f3,
|
|
132 (unsigned char)iid->f4[1], (unsigned char)iid->f4[0],
|
|
133 (unsigned char)iid->f4[2], (unsigned char)iid->f4[3],
|
|
134 (unsigned char)iid->f4[4], (unsigned char)iid->f4[5],
|
|
135 (unsigned char)iid->f4[6], (unsigned char)iid->f4[7]);
|
1545
|
136 return E_NOINTERFACE;
|
168
|
137 }
|
|
138
|
|
139 // IPin methods
|
1545
|
140 static HRESULT STDCALL COutputPin_Connect(IPin * This,
|
|
141 /* [in] */ IPin *pReceivePin,
|
|
142 /* [in] */ /* const */ AM_MEDIA_TYPE *pmt)
|
168
|
143 {
|
1545
|
144 Debug printf("COutputPin_Connect() called\n");
|
168
|
145 /*
|
|
146 *pmt=((COutputPin*)This)->type;
|
|
147 if(pmt->cbFormat>0)
|
|
148 {
|
|
149 pmt->pbFormat=CoTaskMemAlloc(pmt->cbFormat);
|
|
150 memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat);
|
3056
|
151 }
|
168
|
152 */
|
1545
|
153 //return E_NOTIMPL;
|
|
154 return 0;// XXXXXXXXXXXXX CHECKME XXXXXXXXXXXXXXX
|
168
|
155 // if I put return 0; here, it crashes
|
|
156 }
|
|
157
|
1545
|
158 static HRESULT STDCALL COutputPin_ReceiveConnection(IPin * This,
|
|
159 /* [in] */ IPin *pConnector,
|
|
160 /* [in] */ const AM_MEDIA_TYPE *pmt)
|
168
|
161 {
|
1545
|
162 Debug printf("COutputPin_ReceiveConnection() called\n");
|
168
|
163 ((COutputPin*)This)->remote=pConnector;
|
|
164 return 0;
|
|
165 }
|
1545
|
166
|
|
167 static HRESULT STDCALL COutputPin_Disconnect(IPin * This)
|
168
|
168 {
|
1545
|
169 Debug printf("COutputPin_Disconnect() called\n");
|
168
|
170 return 1;
|
|
171 }
|
|
172
|
1545
|
173 static HRESULT STDCALL COutputPin_ConnectedTo(IPin * This,
|
|
174 /* [out] */ IPin **pPin)
|
|
175 {
|
|
176 Debug printf("COutputPin_ConnectedTo() called\n");
|
|
177 if (!pPin)
|
|
178 return E_INVALIDARG;
|
|
179 *pPin = ((COutputPin*)This)->remote;
|
|
180 return 0;
|
|
181 }
|
168
|
182
|
1545
|
183 static HRESULT STDCALL COutputPin_ConnectionMediaType(IPin * This,
|
|
184 /* [out] */ AM_MEDIA_TYPE *pmt)
|
|
185 {
|
|
186 Debug printf("CInputPin::ConnectionMediaType() called\n");
|
|
187 if (!pmt)
|
|
188 return E_INVALIDARG;
|
|
189 *pmt = ((COutputPin*)This)->type;
|
|
190 if (pmt->cbFormat>0)
|
|
191 {
|
|
192 pmt->pbFormat=(char *)CoTaskMemAlloc(pmt->cbFormat);
|
|
193 memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat);
|
|
194 }
|
|
195 return 0;
|
|
196 }
|
|
197
|
|
198 static HRESULT STDCALL COutputPin_QueryPinInfo(IPin * This,
|
|
199 /* [out] */ PIN_INFO *pInfo)
|
|
200 {
|
|
201 Debug printf("COutputPin_QueryPinInfo() called\n");
|
|
202 return E_NOTIMPL;
|
|
203 }
|
|
204
|
|
205 static HRESULT STDCALL COutputPin_QueryDirection(IPin * This,
|
|
206 /* [out] */ PIN_DIRECTION *pPinDir)
|
|
207 {
|
|
208 Debug printf("COutputPin_QueryDirection() called\n");
|
|
209 if (!pPinDir)
|
|
210 return E_INVALIDARG;
|
|
211 *pPinDir = PINDIR_INPUT;
|
|
212 return 0;
|
|
213 }
|
|
214
|
|
215 static HRESULT STDCALL COutputPin_QueryId(IPin * This,
|
|
216 /* [out] */ LPWSTR *Id)
|
|
217 {
|
|
218 Debug printf("COutputPin_QueryId() called\n");
|
|
219 return E_NOTIMPL;
|
|
220 }
|
|
221
|
|
222 static HRESULT STDCALL COutputPin_QueryAccept(IPin * This,
|
|
223 /* [in] */ const AM_MEDIA_TYPE *pmt)
|
168
|
224 {
|
1545
|
225 Debug printf("COutputPin_QueryAccept() called\n");
|
|
226 return E_NOTIMPL;
|
|
227 }
|
|
228
|
|
229 static HRESULT STDCALL COutputPin_EnumMediaTypes(IPin * This,
|
|
230 /* [out] */ IEnumMediaTypes **ppEnum)
|
|
231 {
|
|
232 Debug printf("COutputPin_EnumMediaTypes() called\n");
|
|
233 if (!ppEnum)
|
|
234 return E_INVALIDARG;
|
3056
|
235 *ppEnum = (IEnumMediaTypes*) CEnumMediaTypesCreate(&((COutputPin*)This)->type);
|
1545
|
236 return 0;
|
|
237 }
|
|
238
|
|
239 static HRESULT STDCALL COutputPin_QueryInternalConnections(IPin * This,
|
|
240 /* [out] */ IPin **apPin,
|
|
241 /* [out][in] */ ULONG *nPin)
|
|
242 {
|
|
243 Debug printf("COutputPin_QueryInternalConnections() called\n");
|
|
244 return E_NOTIMPL;
|
|
245 }
|
|
246
|
|
247 static HRESULT STDCALL COutputPin_EndOfStream(IPin * This)
|
|
248 {
|
|
249 Debug printf("COutputPin_EndOfStream() called\n");
|
|
250 return E_NOTIMPL;
|
|
251 }
|
|
252
|
|
253 static HRESULT STDCALL COutputPin_BeginFlush(IPin * This)
|
|
254 {
|
|
255 Debug printf("COutputPin_BeginFlush() called\n");
|
|
256 return E_NOTIMPL;
|
|
257 }
|
|
258
|
|
259 static HRESULT STDCALL COutputPin_EndFlush(IPin * This)
|
|
260 {
|
|
261 Debug printf("COutputPin_EndFlush() called\n");
|
|
262 return E_NOTIMPL;
|
|
263 }
|
|
264
|
|
265 static HRESULT STDCALL COutputPin_NewSegment(IPin * This,
|
|
266 /* [in] */ REFERENCE_TIME tStart,
|
|
267 /* [in] */ REFERENCE_TIME tStop,
|
|
268 /* [in] */ double dRate)
|
|
269 {
|
3056
|
270 Debug printf("COutputPin_NewSegment(%Ld,%Ld,%f) called\n",
|
1545
|
271 tStart, tStop, dRate);
|
168
|
272 return 0;
|
|
273 }
|
|
274
|
|
275
|
|
276
|
|
277 // IMemInputPin->IUnknown methods
|
|
278
|
1545
|
279 static HRESULT STDCALL COutputPin_M_QueryInterface(IUnknown* This, GUID* iid, void** ppv)
|
168
|
280 {
|
3056
|
281 COutputPin* p = (COutputPin*)This;
|
|
282
|
|
283 Debug printf("COutputPin_M_QueryInterface(%p) called\n", This);
|
1545
|
284 if (!ppv)
|
|
285 return E_INVALIDARG;
|
|
286
|
168
|
287 if(!memcmp(iid, &IID_IUnknown, 16))
|
|
288 {
|
1545
|
289 *ppv=p;
|
|
290 p->vt->AddRef(This);
|
168
|
291 return 0;
|
|
292 }
|
1545
|
293 /*if(!memcmp(iid, &IID_IPin, 16))
|
168
|
294 {
|
|
295 COutputPin* ptr=(COutputPin*)(This-1);
|
|
296 *ppv=(void*)ptr;
|
|
297 AddRef((IUnknown*)ptr);
|
|
298 return 0;
|
|
299 }*/
|
|
300 if(!memcmp(iid, &IID_IMemInputPin, 16))
|
|
301 {
|
1545
|
302 *ppv=p->mempin;
|
|
303 p->mempin->vt->AddRef(This);
|
168
|
304 return 0;
|
|
305 }
|
|
306 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \
|
1545
|
307 "%02x%02x%02x%02x%02x%02x\n",
|
|
308 iid->f1, iid->f2, iid->f3,
|
|
309 (unsigned char)iid->f4[1], (unsigned char)iid->f4[0],
|
|
310 (unsigned char)iid->f4[2], (unsigned char)iid->f4[3],
|
|
311 (unsigned char)iid->f4[4], (unsigned char)iid->f4[5],
|
|
312 (unsigned char)iid->f4[6], (unsigned char)iid->f4[7]);
|
|
313 return E_NOINTERFACE;
|
168
|
314 }
|
|
315
|
|
316 // IMemInputPin methods
|
|
317
|
3056
|
318 static HRESULT STDCALL COutputPin_GetAllocator(IMemInputPin* This,
|
|
319 /* [out] */ IMemAllocator** ppAllocator)
|
168
|
320 {
|
1545
|
321 Debug printf("COutputPin_GetAllocator(%p, %p) called\n", This->vt, ppAllocator);
|
3056
|
322 *ppAllocator = (IMemAllocator*) MemAllocatorCreate();
|
168
|
323 return 0;
|
|
324 }
|
3056
|
325
|
|
326 static HRESULT STDCALL COutputPin_NotifyAllocator(IMemInputPin* This,
|
|
327 /* [in] */ IMemAllocator* pAllocator,
|
1545
|
328 /* [in] */ int bReadOnly)
|
168
|
329 {
|
1545
|
330 Debug printf("COutputPin_NotifyAllocator(%p, %p) called\n", This, pAllocator);
|
|
331 ((COutputMemPin*)This)->pAllocator = (MemAllocator*) pAllocator;
|
168
|
332 return 0;
|
|
333 }
|
|
334
|
3056
|
335 static HRESULT STDCALL COutputPin_GetAllocatorRequirements(IMemInputPin* This,
|
|
336 /* [out] */ ALLOCATOR_PROPERTIES* pProps)
|
168
|
337 {
|
1545
|
338 Debug printf("COutputPin_GetAllocatorRequirements() called\n");
|
168
|
339 return E_NOTIMPL;
|
|
340 }
|
|
341
|
3056
|
342 static HRESULT STDCALL COutputPin_Receive(IMemInputPin* This,
|
|
343 /* [in] */ IMediaSample* pSample)
|
168
|
344 {
|
3056
|
345 COutputMemPin* mp = (COutputMemPin*)This;
|
|
346 char* pointer;
|
|
347 int len;
|
|
348
|
1545
|
349 Debug printf("COutputPin_Receive(%p) called\n", This);
|
|
350 if (!pSample)
|
|
351 return E_INVALIDARG;
|
3056
|
352 if (pSample->vt->GetPointer(pSample, (BYTE**) &pointer))
|
168
|
353 return -1;
|
3056
|
354 len = pSample->vt->GetActualDataLength(pSample);
|
1545
|
355 if (len == 0)
|
|
356 len = pSample->vt->GetSize(pSample);//for iv50
|
168
|
357 //if(me.frame_pointer)memcpy(me.frame_pointer, pointer, len);
|
1545
|
358
|
|
359 if (mp->frame_pointer)
|
|
360 *(mp->frame_pointer) = pointer;
|
|
361 if (mp->frame_size_pointer)
|
|
362 *(mp->frame_size_pointer) = len;
|
168
|
363 /*
|
|
364 FILE* file=fopen("./uncompr.bmp", "wb");
|
|
365 char head[14]={0x42, 0x4D, 0x36, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00};
|
|
366 *(int*)(&head[2])=len+0x36;
|
|
367 fwrite(head, 14, 1, file);
|
|
368 fwrite(&((VIDEOINFOHEADER*)me.type.pbFormat)->bmiHeader, sizeof(BITMAPINFOHEADER), 1, file);
|
|
369 fwrite(pointer, len, 1, file);
|
|
370 fclose(file);
|
3056
|
371 */
|
168
|
372 // pSample->vt->Release((IUnknown*)pSample);
|
3056
|
373
|
168
|
374 return 0;
|
|
375 }
|
|
376
|
1545
|
377 static HRESULT STDCALL COutputPin_ReceiveMultiple(IMemInputPin * This,
|
|
378 /* [size_is][in] */ IMediaSample **pSamples,
|
|
379 /* [in] */ long nSamples,
|
|
380 /* [out] */ long *nSamplesProcessed)
|
168
|
381 {
|
1545
|
382 Debug printf("COutputPin_ReceiveMultiple() called (UNIMPLEMENTED)\n");
|
|
383 return E_NOTIMPL;
|
|
384 }
|
|
385
|
|
386 static HRESULT STDCALL COutputPin_ReceiveCanBlock(IMemInputPin * This)
|
|
387 {
|
|
388 Debug printf("COutputPin_ReceiveCanBlock() called (UNIMPLEMENTED)\n");
|
168
|
389 return E_NOTIMPL;
|
|
390 }
|
|
391
|
3056
|
392 static void COutputPin_SetFramePointer(COutputPin* This, char** z)
|
|
393 {
|
|
394 This->mempin->frame_pointer = z;
|
|
395 }
|
|
396
|
|
397 static void COutputPin_SetPointer2(COutputPin* This, char* p)
|
|
398 {
|
|
399 if (This->mempin->pAllocator)
|
|
400 // fixme
|
|
401 This->mempin->pAllocator->SetPointer(This->mempin->pAllocator, p);
|
|
402 }
|
|
403
|
|
404 static void COutputPin_SetFrameSizePointer(COutputPin* This, long* z)
|
|
405 {
|
|
406 This->mempin->frame_size_pointer = z;
|
|
407 }
|
|
408
|
|
409 static void COutputPin_SetNewFormat(COutputPin* This, const AM_MEDIA_TYPE* amt)
|
|
410 {
|
|
411 This->type = *amt;
|
|
412 }
|
|
413
|
|
414 static void COutputPin_Destroy(COutputPin* This)
|
168
|
415 {
|
3056
|
416 free(This->vt);
|
|
417 free(This->mempin->vt);
|
|
418 free(This->mempin);
|
|
419 free(This);
|
|
420 }
|
|
421
|
|
422 static HRESULT STDCALL COutputPin_AddRef(IUnknown* This)
|
|
423 {
|
|
424 Debug printf("COutputPin_AddRef(%p) called (%d)\n",
|
|
425 This, ((COutputPin*)This)->refcount);
|
|
426 ((COutputPin*)This)->refcount++;
|
|
427 return 0;
|
|
428 }
|
1545
|
429
|
3056
|
430 static HRESULT STDCALL COutputPin_Release(IUnknown* This)
|
|
431 {
|
|
432 Debug printf("COutputPin_Release(%p) called (%d)\n",
|
|
433 This, ((COutputPin*)This)->refcount);
|
|
434 if (--((COutputPin*)This)->refcount<=0)
|
|
435 COutputPin_Destroy((COutputPin*)This);
|
1545
|
436
|
3056
|
437 return 0;
|
|
438 }
|
|
439
|
|
440 static HRESULT STDCALL COutputPin_M_AddRef(IUnknown* This)
|
|
441 {
|
|
442 COutputMemPin* p = (COutputMemPin*) This;
|
|
443 Debug printf("COutputPin_MAddRef(%p) called (%p, %d)\n",
|
|
444 p, p->parent, p->parent->refcount);
|
|
445 p->parent->refcount++;
|
|
446 return 0;
|
168
|
447 }
|
1545
|
448
|
3056
|
449 static HRESULT STDCALL COutputPin_M_Release(IUnknown* This)
|
|
450 {
|
|
451 COutputMemPin* p = (COutputMemPin*) This;
|
|
452 Debug printf("COutputPin_MRelease(%p) called (%p, %d)\n",
|
|
453 p, p->parent, p->parent->refcount);
|
|
454 if (--p->parent->refcount <= 0)
|
|
455 COutputPin_Destroy(p->parent);
|
|
456 return 0;
|
|
457 }
|
|
458
|
|
459 COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt)
|
1545
|
460 {
|
3056
|
461 COutputPin* This = (COutputPin*) malloc(sizeof(COutputPin));
|
|
462 This->refcount = 1;
|
|
463 This->remote = 0;
|
|
464 This->type = *amt;
|
|
465 This->vt = (IPin_vt*) malloc(sizeof(IPin_vt));
|
|
466 This->vt->QueryInterface = COutputPin_QueryInterface;
|
|
467 This->vt->AddRef = COutputPin_AddRef;
|
|
468 This->vt->Release = COutputPin_Release;
|
|
469 This->vt->Connect = COutputPin_Connect;
|
|
470 This->vt->ReceiveConnection = COutputPin_ReceiveConnection;
|
|
471 This->vt->Disconnect = COutputPin_Disconnect;
|
|
472 This->vt->ConnectedTo = COutputPin_ConnectedTo;
|
|
473 This->vt->ConnectionMediaType = COutputPin_ConnectionMediaType;
|
|
474 This->vt->QueryPinInfo = COutputPin_QueryPinInfo;
|
|
475 This->vt->QueryDirection = COutputPin_QueryDirection;
|
|
476 This->vt->QueryId = COutputPin_QueryId;
|
|
477 This->vt->QueryAccept = COutputPin_QueryAccept;
|
|
478 This->vt->EnumMediaTypes = COutputPin_EnumMediaTypes;
|
|
479 This->vt->QueryInternalConnections = COutputPin_QueryInternalConnections;
|
|
480 This->vt->EndOfStream = COutputPin_EndOfStream;
|
|
481 This->vt->BeginFlush = COutputPin_BeginFlush;
|
|
482 This->vt->EndFlush = COutputPin_EndFlush;
|
|
483 This->vt->NewSegment = COutputPin_NewSegment;
|
|
484
|
|
485 This->mempin = (COutputMemPin*) malloc(sizeof(COutputMemPin));
|
|
486 This->mempin->vt = (IMemInputPin_vt*) malloc(sizeof(IMemInputPin_vt));
|
|
487 This->mempin->vt->QueryInterface = COutputPin_M_QueryInterface;
|
|
488 This->mempin->vt->AddRef = COutputPin_M_AddRef;
|
|
489 This->mempin->vt->Release = COutputPin_M_Release;
|
|
490 This->mempin->vt->GetAllocator = COutputPin_GetAllocator;
|
|
491 This->mempin->vt->NotifyAllocator = COutputPin_NotifyAllocator;
|
|
492 This->mempin->vt->GetAllocatorRequirements = COutputPin_GetAllocatorRequirements;
|
|
493 This->mempin->vt->Receive = COutputPin_Receive;
|
|
494 This->mempin->vt->ReceiveMultiple = COutputPin_ReceiveMultiple;
|
|
495 This->mempin->vt->ReceiveCanBlock = COutputPin_ReceiveCanBlock;
|
|
496
|
|
497 This->mempin->frame_size_pointer = 0;
|
|
498 This->mempin->frame_pointer = 0;
|
|
499 This->mempin->pAllocator = 0;
|
3130
|
500 This->mempin->refcount = 1;
|
3056
|
501 This->mempin->parent = This;
|
|
502
|
|
503 This->SetPointer2 = COutputPin_SetPointer2;
|
|
504 This->SetFramePointer = COutputPin_SetFramePointer;
|
|
505 This->SetFrameSizePointer = COutputPin_SetFrameSizePointer;
|
|
506 This->SetNewFormat = COutputPin_SetNewFormat;
|
|
507
|
|
508 return This;
|
1545
|
509 }
|