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