Mercurial > mplayer.hg
annotate loader/dshow/outputpin.c @ 25354:a4c4b56e933d
reverted r25323: deprecated by ulion's recent patches
author | ben |
---|---|
date | Wed, 12 Dec 2007 19:26:55 +0000 |
parents | 49f01f8fbd60 |
children | ebd1ab1c5357 |
rev | line source |
---|---|
15166
f5537cc95b02
Mark modified imported files as such to comply with GPL ¡ø2a.
diego
parents:
9964
diff
changeset
|
1 /* |
18783 | 2 * Modified for use with MPlayer, detailed changelog at |
3 * http://svn.mplayerhq.hu/mplayer/trunk/ | |
15166
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" | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
10 #include "mediatype.h" |
3056 | 11 #include <stdio.h> |
12 #include <string.h> | |
7386 | 13 #include <stdlib.h> |
713 | 14 |
7386 | 15 static inline int output_unimplemented(const char* s, void* p) |
3467 | 16 { |
17 Debug printf("%s(%p) called (UNIMPLEMENTED)", s, p); | |
18 return E_NOTIMPL; | |
19 } | |
20 | |
22014 | 21 /** |
22 An object beyond interface IEnumMediaTypes. | |
23 Returned by COutputPin through call IPin::EnumMediaTypes(). | |
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 |
22014 | 33 /** |
34 IMemOutput interface implementation | |
35 */ | |
7386 | 36 struct _COutputMemPin |
37 { | |
38 IMemInputPin_vt* vt; | |
39 DECLARE_IUNKNOWN(); | |
40 char** frame_pointer; | |
41 long* frame_size_pointer; | |
42 MemAllocator* pAllocator; | |
43 COutputPin* parent; | |
44 }; | |
168 | 45 |
22014 | 46 /** |
47 * \brief IEnumMediaTypes:Next (retrives a specified number of media types ) | |
48 * | |
49 * \param[in] This pointer to CEnumMediaTypes object | |
50 * \param[in] cMediaTypes number of media types to retrive | |
51 * \param[out] ppMediaTypes array of AM_MEDIA_TYPE structure pointers of size cMediaTypes | |
52 * \param[out] pcFetched address of variables that receives number of returned media types | |
53 * | |
54 * \return S_OK - success | |
55 * \return S_FALSE - did not return as meny structures as requested | |
56 * \return E_INVALIDARG Invalid argument | |
57 * \return E_POINTER Null pointer | |
58 * \return VFW_E_ENUM_OUT_OF_SYNC - pin's state has changed and is now inconsistent with enumerator | |
59 * | |
60 */ | |
1545 | 61 static HRESULT STDCALL CEnumMediaTypes_Next(IEnumMediaTypes * This, |
62 /* [in] */ ULONG cMediaTypes, | |
63 /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes, | |
64 /* [out] */ ULONG *pcFetched) | |
168 | 65 { |
3056 | 66 AM_MEDIA_TYPE* type = &((CEnumMediaTypes*)This)->type; |
3467 | 67 Debug printf("CEnumMediaTypes::Next(%p) called\n", This); |
1545 | 68 if (!ppMediaTypes) |
69 return E_INVALIDARG; | |
70 if (!pcFetched && (cMediaTypes!=1)) | |
71 return E_INVALIDARG; | |
72 if (cMediaTypes <= 0) | |
73 return 0; | |
74 | |
75 if (pcFetched) | |
76 *pcFetched=1; | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
77 ppMediaTypes[0] = CreateMediaType(type); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
78 |
1545 | 79 if (cMediaTypes == 1) |
80 return 0; | |
168 | 81 return 1; |
82 } | |
1545 | 83 |
84 /* I expect that these methods are unused. */ | |
22014 | 85 |
86 /** | |
87 * \brief IEnumMediaTypes::Skip (skips over a specified number of media types) | |
88 * | |
89 * \param[in] This pointer to CEnumMEdiaTypes object | |
90 * \param[in] cMediaTypes number of media types to skip | |
91 * | |
92 * \return S_OK - success | |
93 * \return S_FALSE - skipped past the end of the sequence | |
94 * \return VFW_E_ENUM_OUT_OF_SYNC - pin's state has changed and is now inconsistent with enumerator | |
95 * | |
96 */ | |
1545 | 97 static HRESULT STDCALL CEnumMediaTypes_Skip(IEnumMediaTypes * This, |
98 /* [in] */ ULONG cMediaTypes) | |
168 | 99 { |
7386 | 100 return output_unimplemented("CEnumMediaTypes::Skip", This); |
168 | 101 } |
102 | |
22014 | 103 /** |
104 * \brief IEnumMediaTypes::Reset (resets enumeration sequence to beginning) | |
105 * | |
106 * \param[in] This pointer to CEnumMEdiaTypes object | |
107 * | |
108 * \return S_OK - success | |
109 * | |
110 */ | |
1545 | 111 static HRESULT STDCALL CEnumMediaTypes_Reset(IEnumMediaTypes * This) |
168 | 112 { |
3467 | 113 Debug printf("CEnumMediaTypes::Reset(%p) called\n", This); |
168 | 114 return 0; |
115 } | |
116 | |
22014 | 117 /** |
118 * \brief IEnumMediaTypes::Clone (makes a copy of enumerator, returned object | |
119 * starts at the same position as original) | |
120 * | |
121 * \param[in] This pointer to CEnumMEdiaTypes object | |
122 * \param[out] ppEnum address of variable that receives pointer to IEnumMediaTypes interface | |
123 * | |
124 * \return S_OK - success | |
125 * \return E_OUTOFMEMRY - Insufficient memory | |
126 * \return E_POINTER - Null pointer | |
127 * \return VFW_E_ENUM_OUT_OF_SYNC - pin's state has changed and is now inconsistent with enumerator | |
128 * | |
129 */ | |
1545 | 130 static HRESULT STDCALL CEnumMediaTypes_Clone(IEnumMediaTypes * This, |
131 /* [out] */ IEnumMediaTypes **ppEnum) | |
168 | 132 { |
3467 | 133 Debug printf("CEnumMediaTypes::Clone(%p) called\n", This); |
168 | 134 return E_NOTIMPL; |
135 } | |
136 | |
22014 | 137 /** |
138 * \brief CEnumMediaTypes destructor | |
139 * | |
140 * \param[in] This pointer to CEnumMediaTypes object | |
141 * | |
142 */ | |
8292 | 143 static void CEnumMediaTypes_Destroy(CEnumMediaTypes* This) |
1545 | 144 { |
22306
e95af173a63b
Free AM_MEDIA_TYPE structure content when CEnumMediaTypes object is destroyed
voroshil
parents:
22305
diff
changeset
|
145 FreeMediaType(&(This->type)); |
3056 | 146 free(This->vt); |
147 free(This); | |
148 } | |
149 | |
22014 | 150 // IEnumMediaTypes->IUnknown methods |
3056 | 151 IMPLEMENT_IUNKNOWN(CEnumMediaTypes) |
1545 | 152 |
22014 | 153 /** |
154 * \brief CEnumMediaTypes constructor | |
155 * | |
156 * \param[in] amt media type for enumerating | |
157 * | |
158 * \return pointer to CEnumMEdiaTypes object or NULL if error occured | |
159 * | |
160 */ | |
8292 | 161 static CEnumMediaTypes* CEnumMediaTypesCreate(const AM_MEDIA_TYPE* amt) |
3056 | 162 { |
163 CEnumMediaTypes *This = (CEnumMediaTypes*) malloc(sizeof(CEnumMediaTypes)) ; | |
3467 | 164 |
165 if (!This) | |
166 return NULL; | |
167 | |
168 This->vt = (IEnumMediaTypes_vt*) malloc(sizeof(IEnumMediaTypes_vt)); | |
169 if (!This->vt) | |
170 { | |
171 free(This); | |
172 return NULL; | |
173 } | |
174 | |
3056 | 175 This->refcount = 1; |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
176 CopyMediaType(&(This->type),amt); |
3056 | 177 |
178 This->vt->QueryInterface = CEnumMediaTypes_QueryInterface; | |
179 This->vt->AddRef = CEnumMediaTypes_AddRef; | |
180 This->vt->Release = CEnumMediaTypes_Release; | |
181 This->vt->Next = CEnumMediaTypes_Next; | |
182 This->vt->Skip = CEnumMediaTypes_Skip; | |
183 This->vt->Reset = CEnumMediaTypes_Reset; | |
184 This->vt->Clone = CEnumMediaTypes_Clone; | |
185 | |
186 This->interfaces[0] = IID_IUnknown; | |
187 This->interfaces[1] = IID_IEnumMediaTypes; | |
188 | |
189 return This; | |
1545 | 190 } |
191 | |
192 | |
3056 | 193 /************* |
194 * COutputPin | |
22014 | 195 * |
196 * WARNING: | |
197 * This is implementation of INPUT pin in DirectShow's terms | |
198 * | |
3056 | 199 *************/ |
168 | 200 |
1545 | 201 |
22014 | 202 /** |
203 * | |
204 * \brief IUnknown::QueryInterface (query object for interface) | |
205 * \param[in] This pointer to IUnknown interface | |
206 * \param[in] iid GUID of requested interface | |
207 * \param[out] ppv receives pointer to interface | |
208 * | |
209 * \return S_OK - success (and *ppv contains valid pointer) | |
210 * \return E_NOINTERFACE - interface not found (and *ppv was set NULL) | |
211 * | |
212 * \note | |
213 * Make sure to call Release on received interface when you are done | |
214 * | |
215 */ | |
7386 | 216 static HRESULT STDCALL COutputPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv) |
168 | 217 { |
3056 | 218 COutputPin* p = (COutputPin*) This; |
219 | |
1545 | 220 Debug printf("COutputPin_QueryInterface(%p) called\n", This); |
221 if (!ppv) | |
222 return E_INVALIDARG; | |
223 | |
224 if (memcmp(iid, &IID_IUnknown, 16) == 0) | |
168 | 225 { |
1545 | 226 *ppv = p; |
227 p->vt->AddRef(This); | |
228 return 0; | |
168 | 229 } |
1545 | 230 if (memcmp(iid, &IID_IMemInputPin, 16) == 0) |
168 | 231 { |
1545 | 232 *ppv = p->mempin; |
233 p->mempin->vt->AddRef((IUnknown*)*ppv); | |
168 | 234 return 0; |
235 } | |
236 | |
3467 | 237 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" |
713 | 238 "%02x%02x%02x%02x%02x%02x\n", |
239 iid->f1, iid->f2, iid->f3, | |
240 (unsigned char)iid->f4[1], (unsigned char)iid->f4[0], | |
241 (unsigned char)iid->f4[2], (unsigned char)iid->f4[3], | |
242 (unsigned char)iid->f4[4], (unsigned char)iid->f4[5], | |
243 (unsigned char)iid->f4[6], (unsigned char)iid->f4[7]); | |
1545 | 244 return E_NOINTERFACE; |
168 | 245 } |
246 | |
247 // IPin methods | |
22014 | 248 |
249 /** | |
250 * \brief IPin::Connect (connects pin to another pin) | |
251 * | |
252 * \param[in] This pointer to IPin interface | |
253 * \param[in] pReceivePin pointer to IPin interface of remote pin | |
254 * \param[in] pmt suggested media type for link. Can be NULL (any media type) | |
255 * | |
256 * \return S_OK - success. | |
257 * \return VFW_E_ALREADY_CONNECTED - pin already connected | |
258 * \return VFW_E_NOT_STOPPED - filter is active | |
259 * \return VFW_E_TYPE_NOT_ACCEPT - type is not acceptable | |
260 * \return Apropriate error code otherwise. | |
261 * | |
262 */ | |
1545 | 263 static HRESULT STDCALL COutputPin_Connect(IPin * This, |
264 /* [in] */ IPin *pReceivePin, | |
265 /* [in] */ /* const */ AM_MEDIA_TYPE *pmt) | |
168 | 266 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
267 Debug printf("COutputPin_Connect(%p) called\n",This); |
168 | 268 /* |
269 *pmt=((COutputPin*)This)->type; | |
270 if(pmt->cbFormat>0) | |
271 { | |
9964 | 272 pmt->pbFormat=malloc(pmt->cbFormat); |
168 | 273 memcpy(pmt->pbFormat, ((COutputPin*)This)->type.pbFormat, pmt->cbFormat); |
3056 | 274 } |
168 | 275 */ |
1545 | 276 //return E_NOTIMPL; |
277 return 0;// XXXXXXXXXXXXX CHECKME XXXXXXXXXXXXXXX | |
168 | 278 // if I put return 0; here, it crashes |
279 } | |
280 | |
22014 | 281 /** |
282 * \brief IPin::ReceiveConnection (accepts a connection from another pin) | |
283 * | |
284 * \param[in] This pointer to IPin interface | |
285 * \param[in] pConnector connecting pin's IPin interface | |
286 * \param[in] pmt suggested media type for connection | |
287 * | |
288 * \return S_OK - success | |
289 * \return E_POINTER - Null pointer | |
290 * \return VFW_E_ALREADY_CONNECTED - pin already connected | |
291 * \return VFW_E_NOT_STOPPED - filter is active | |
292 * \return VFW_E_TYPE_NOT_ACCEPT - type is not acceptable | |
293 * | |
294 * \note | |
295 * When returning S_OK method should also do the following: | |
296 * - store media type and return the same type in IPin::ConnectionMediaType | |
297 * - store pConnector and return it in IPin::ConnectedTo | |
298 * | |
299 */ | |
1545 | 300 static HRESULT STDCALL COutputPin_ReceiveConnection(IPin * This, |
301 /* [in] */ IPin *pConnector, | |
302 /* [in] */ const AM_MEDIA_TYPE *pmt) | |
168 | 303 { |
3467 | 304 Debug printf("COutputPin_ReceiveConnection(%p) called\n", This); |
305 ((COutputPin*)This)->remote = pConnector; | |
168 | 306 return 0; |
307 } | |
1545 | 308 |
22014 | 309 /** |
310 * \brief IPin::Disconnect (accepts a connection from another pin) | |
311 * | |
312 * \param[in] This pointer to IPin interface | |
313 * | |
314 * \return S_OK - success | |
315 * \return S_FALSE - pin was not connected | |
316 * \return VFW_E_NOT_STOPPED - filter is active | |
317 * | |
318 * \note | |
319 * To break connection you have to also call Disconnect on other pin | |
320 */ | |
1545 | 321 static HRESULT STDCALL COutputPin_Disconnect(IPin * This) |
168 | 322 { |
3467 | 323 Debug printf("COutputPin_Disconnect(%p) called\n", This); |
168 | 324 return 1; |
325 } | |
326 | |
22014 | 327 /** |
328 * \brief IPin::ConnectedTo (retrieves pointer to the connected pin, if such exist) | |
329 * | |
330 * \param[in] This pointer to IPin interface | |
331 * \param[out] pPin pointer to remote pin's IPin interface | |
332 * | |
333 * \return S_OK - success | |
334 * \return E_POINTER - Null pointer | |
335 * \return VFW_E_NOT_CONNECTED - pin is not connected | |
336 * | |
337 * \note | |
338 * Caller must call Release on received IPin, when done | |
339 */ | |
1545 | 340 static HRESULT STDCALL COutputPin_ConnectedTo(IPin * This, |
341 /* [out] */ IPin **pPin) | |
342 { | |
3467 | 343 Debug printf("COutputPin_ConnectedTo(%p) called\n", This); |
1545 | 344 if (!pPin) |
345 return E_INVALIDARG; | |
346 *pPin = ((COutputPin*)This)->remote; | |
347 return 0; | |
348 } | |
168 | 349 |
22014 | 350 /** |
351 * \brief IPin::ConnectionMediaType (retrieves media type for connection, if such exist) | |
352 * | |
353 * \param[in] This pointer to IPin interface | |
354 * \param[out] pmt pointer to AM_MEDIA_TYPE, that receives connection media type | |
355 * | |
356 * \return S_OK - success | |
357 * \return E_POINTER - Null pointer | |
358 * \return VFW_E_NOT_CONNECTED - pin is not connected | |
359 * | |
360 */ | |
1545 | 361 static HRESULT STDCALL COutputPin_ConnectionMediaType(IPin * This, |
362 /* [out] */ AM_MEDIA_TYPE *pmt) | |
363 { | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
364 Debug printf("COutputPin_ConnectionMediaType(%p) called\n",This); |
1545 | 365 if (!pmt) |
366 return E_INVALIDARG; | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
367 CopyMediaType(pmt,&(((COutputPin*)This)->type)); |
1545 | 368 return 0; |
369 } | |
370 | |
22014 | 371 /** |
372 * \brief IPin::QueryPinInfo (retrieves information about the pin) | |
373 * | |
374 * \param[in] This pointer to IPin interface | |
375 * \param[out] pInfo pointer to PIN_INFO structure, that receives pin info | |
376 * | |
377 * \return S_OK - success | |
378 * \return E_POINTER - Null pointer | |
379 * | |
380 * \note | |
381 * If pInfo->pFilter is not NULL, then caller must call Release on pInfo->pFilter when done | |
382 * | |
383 */ | |
1545 | 384 static HRESULT STDCALL COutputPin_QueryPinInfo(IPin * This, |
385 /* [out] */ PIN_INFO *pInfo) | |
386 { | |
7386 | 387 return output_unimplemented("COutputPin_QueryPinInfo", This); |
1545 | 388 } |
389 | |
22014 | 390 /** |
391 * \brief IPin::QueryDirection (retrieves pin direction) | |
392 * | |
393 * \param[in] This pointer to IPin interface | |
394 * \param[out] pPinDir pointer to variable, that receives pin direction (PINDIR_INPUT,PINDIR_OUTPUT) | |
395 * | |
396 * \return S_OK - success | |
397 * \return E_POINTER - Null pointer | |
398 * | |
399 */ | |
1545 | 400 static HRESULT STDCALL COutputPin_QueryDirection(IPin * This, |
401 /* [out] */ PIN_DIRECTION *pPinDir) | |
402 { | |
3467 | 403 Debug printf("COutputPin_QueryDirection(%p) called\n", This); |
1545 | 404 if (!pPinDir) |
405 return E_INVALIDARG; | |
406 *pPinDir = PINDIR_INPUT; | |
407 return 0; | |
408 } | |
409 | |
22014 | 410 /** |
411 * \brief IPin::QueryId (retrieves pin identificator) | |
412 * | |
413 * \param[in] This pointer to IPin interface | |
414 * \param[out] Id adress of variable, that receives string with pin's Id. | |
415 * | |
416 * \return S_OK - success | |
417 * \return E_OUTOFMEMORY - Insufficient memory | |
418 * \return E_POINTER - Null pointer | |
419 * | |
420 * \note | |
421 * Pin's Id is not the same as pin's name | |
422 * | |
423 */ | |
1545 | 424 static HRESULT STDCALL COutputPin_QueryId(IPin * This, |
425 /* [out] */ LPWSTR *Id) | |
426 { | |
7386 | 427 return output_unimplemented("COutputPin_QueryId", This); |
1545 | 428 } |
429 | |
22014 | 430 /** |
431 * \brief IPin::QueryAccept (determines can media type be accepted or not) | |
432 * | |
433 * \param[in] This pointer to IPin interface | |
434 * \param[in] pmt Media type to check | |
435 * | |
436 * \return S_OK - success | |
437 * \return S_FALSE - pin rejects media type | |
438 * | |
439 */ | |
1545 | 440 static HRESULT STDCALL COutputPin_QueryAccept(IPin * This, |
441 /* [in] */ const AM_MEDIA_TYPE *pmt) | |
168 | 442 { |
7386 | 443 return output_unimplemented("COutputPin_QueryAccept", This); |
1545 | 444 } |
445 | |
22014 | 446 /** |
447 * \brief IPin::EnumMediaTypes (enumerates the pin's preferred media types) | |
448 * | |
449 * \param[in] This pointer to IPin interface | |
450 * \param[out] ppEnum adress of variable that receives pointer to IEnumMEdiaTypes interface | |
451 * | |
452 * \return S_OK - success | |
453 * \return E_OUTOFMEMORY - Insufficient memory | |
454 * \return E_POINTER - Null pointer | |
455 * | |
456 * \note | |
457 * Caller must call Release on received interface when done | |
458 * | |
459 */ | |
1545 | 460 static HRESULT STDCALL COutputPin_EnumMediaTypes(IPin * This, |
461 /* [out] */ IEnumMediaTypes **ppEnum) | |
462 { | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
463 Debug printf("COutputPin_EnumMediaTypes(%p) called\n",This); |
1545 | 464 if (!ppEnum) |
465 return E_INVALIDARG; | |
3056 | 466 *ppEnum = (IEnumMediaTypes*) CEnumMediaTypesCreate(&((COutputPin*)This)->type); |
1545 | 467 return 0; |
468 } | |
469 | |
22014 | 470 /** |
471 * \brief IPin::QueryInternalConnections (retries pin's internal connections) | |
472 * | |
473 * \param[in] This pointer to IPin interface | |
474 * \param[out] apPin Array that receives pins, internally connected to this | |
475 * \param[in,out] nPint Size of an array | |
476 * | |
477 * \return S_OK - success | |
478 * \return S_FALSE - pin rejects media type | |
479 * \return E_NOTIMPL - not implemented | |
480 * | |
481 */ | |
1545 | 482 static HRESULT STDCALL COutputPin_QueryInternalConnections(IPin * This, |
483 /* [out] */ IPin **apPin, | |
484 /* [out][in] */ ULONG *nPin) | |
485 { | |
7386 | 486 return output_unimplemented("COutputPin_QueryInternalConnections", This); |
1545 | 487 } |
488 | |
22014 | 489 /** |
490 * \brief IPin::EndOfStream (notifies pin, that no data is expected, until new run command) | |
491 * | |
492 * \param[in] This pointer to IPin interface | |
493 * | |
494 * \return S_OK - success | |
495 * \return E_UNEXPECTED - The pin is output pin | |
496 * | |
497 * \note | |
498 * IMemoryInputPin::Receive,IMemoryInputPin::ReceiveMultiple, IMemoryInputPin::EndOfStream, | |
499 * IMemAllocator::GetBuffer runs in different (streaming) thread then other | |
500 * methods (application thread). | |
501 * IMemoryInputPin::NewSegment runs either in streaming or application thread. | |
502 * Developer must use critical sections for thread-safing work. | |
503 * | |
504 */ | |
1545 | 505 static HRESULT STDCALL COutputPin_EndOfStream(IPin * This) |
506 { | |
7386 | 507 return output_unimplemented("COutputPin_EndOfStream", This); |
1545 | 508 } |
509 | |
22014 | 510 /** |
511 * \brief IPin::BeginFlush (begins a flush operation) | |
512 * | |
513 * \param[in] This pointer to IPin interface | |
514 * | |
515 * \return S_OK - success | |
516 * \return E_UNEXPECTED - The pin is output pin | |
517 * | |
518 */ | |
1545 | 519 static HRESULT STDCALL COutputPin_BeginFlush(IPin * This) |
520 { | |
7386 | 521 return output_unimplemented("COutputPin_BeginFlush", This); |
1545 | 522 } |
523 | |
22014 | 524 /** |
22015 | 525 * \brief IPin::EndFlush (ends a flush operation) |
22014 | 526 * |
527 * \param[in] This pointer to IPin interface | |
528 * | |
529 * \return S_OK - success | |
530 * \return E_UNEXPECTED - The pin is output pin | |
531 * | |
532 */ | |
1545 | 533 static HRESULT STDCALL COutputPin_EndFlush(IPin * This) |
534 { | |
7386 | 535 return output_unimplemented("COutputPin_EndFlush", This); |
1545 | 536 } |
537 | |
22014 | 538 /** |
22015 | 539 * \brief IPin::NewSegment (media sample received after this call grouped as segment with common |
22014 | 540 * start,stop time and rate) |
541 * | |
542 * \param[in] This pointer to IPin interface | |
543 * \param[in] tStart start time of new segment | |
544 * \param[in] tStop end time of new segment | |
545 * \param[in] dRate rate at wich segment should be processed | |
546 * | |
547 * \return S_OK - success | |
548 * \return E_UNEXPECTED - The pin is output pin | |
549 * | |
550 */ | |
1545 | 551 static HRESULT STDCALL COutputPin_NewSegment(IPin * This, |
552 /* [in] */ REFERENCE_TIME tStart, | |
553 /* [in] */ REFERENCE_TIME tStop, | |
554 /* [in] */ double dRate) | |
555 { | |
3056 | 556 Debug printf("COutputPin_NewSegment(%Ld,%Ld,%f) called\n", |
1545 | 557 tStart, tStop, dRate); |
168 | 558 return 0; |
559 } | |
560 | |
561 | |
562 | |
563 // IMemInputPin->IUnknown methods | |
564 | |
22014 | 565 /** |
566 * \brief IUnknown::QueryInterface (query object for interface) | |
567 * | |
568 * \param[in] This pointer to IUnknown interface | |
569 * \param[in] iid GUID of requested interface | |
570 * \param[out] ppv receives pointer to interface | |
571 * | |
572 * \return S_OK - success (and *ppv contains valid pointer) | |
573 * \return E_NOINTERFACE - interface not found (and *ppv was set NULL) | |
574 * | |
575 * \note | |
576 * Make sure to call Release on received interface when you are done | |
577 * | |
578 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
579 static HRESULT STDCALL COutputMemPin_QueryInterface(IUnknown* This, const GUID* iid, void** ppv) |
168 | 580 { |
22334
1c7f753ef2c9
Fix wrong typecast, which can cause MPlayer crash
voroshil
parents:
22306
diff
changeset
|
581 COutputMemPin* p = (COutputMemPin*)This; |
3056 | 582 |
22017 | 583 Debug printf("COutputMemPin_QueryInterface(%p) called\n", This); |
1545 | 584 if (!ppv) |
585 return E_INVALIDARG; | |
586 | |
168 | 587 if(!memcmp(iid, &IID_IUnknown, 16)) |
588 { | |
3467 | 589 *ppv = p; |
1545 | 590 p->vt->AddRef(This); |
168 | 591 return 0; |
592 } | |
1545 | 593 /*if(!memcmp(iid, &IID_IPin, 16)) |
168 | 594 { |
595 COutputPin* ptr=(COutputPin*)(This-1); | |
596 *ppv=(void*)ptr; | |
597 AddRef((IUnknown*)ptr); | |
598 return 0; | |
599 }*/ | |
600 if(!memcmp(iid, &IID_IMemInputPin, 16)) | |
601 { | |
22334
1c7f753ef2c9
Fix wrong typecast, which can cause MPlayer crash
voroshil
parents:
22306
diff
changeset
|
602 *ppv = p; |
1c7f753ef2c9
Fix wrong typecast, which can cause MPlayer crash
voroshil
parents:
22306
diff
changeset
|
603 p->vt->AddRef(This); |
168 | 604 return 0; |
605 } | |
606 Debug printf("Unknown interface : %08x-%04x-%04x-%02x%02x-" \ | |
1545 | 607 "%02x%02x%02x%02x%02x%02x\n", |
608 iid->f1, iid->f2, iid->f3, | |
609 (unsigned char)iid->f4[1], (unsigned char)iid->f4[0], | |
610 (unsigned char)iid->f4[2], (unsigned char)iid->f4[3], | |
611 (unsigned char)iid->f4[4], (unsigned char)iid->f4[5], | |
612 (unsigned char)iid->f4[6], (unsigned char)iid->f4[7]); | |
613 return E_NOINTERFACE; | |
168 | 614 } |
615 | |
616 // IMemInputPin methods | |
617 | |
22014 | 618 /** |
619 * \brief IMemInputPin::GetAllocator (retrives memory allocator, proposed by pin) | |
620 * | |
621 * \param[in] This pointer to IMemInputPin interface | |
622 * \param[out] ppAllocator address of variable that receives allocator's IMemAllocator interface | |
623 * | |
624 * \return S_OK - success | |
625 * \return VFW_E_NO_ALLOCATOR - No allocator | |
626 * | |
627 * \note | |
628 * Make sure to call Release on received interface when you are done | |
629 * | |
630 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
631 static HRESULT STDCALL COutputMemPin_GetAllocator(IMemInputPin* This, |
3056 | 632 /* [out] */ IMemAllocator** ppAllocator) |
168 | 633 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
634 Debug printf("COutputMemPin_GetAllocator(%p, %p) called\n", This->vt, ppAllocator); |
3056 | 635 *ppAllocator = (IMemAllocator*) MemAllocatorCreate(); |
168 | 636 return 0; |
637 } | |
3056 | 638 |
22014 | 639 /** |
640 * | |
641 * \brief IMemInputPin::NotifyAllocator (specifies an allocator for the connection) | |
642 * | |
643 * \param[in] This pointer to IMemInputPin interface | |
644 * \param[in] pAllocator allocator's IMemAllocator interface | |
645 * \param[in] bReadOnly specifies whether samples from allocator are readonly | |
646 * | |
647 * \return S_OK - success | |
648 * \return Apropriate error code otherwise | |
649 * | |
650 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
651 static HRESULT STDCALL COutputMemPin_NotifyAllocator(IMemInputPin* This, |
3056 | 652 /* [in] */ IMemAllocator* pAllocator, |
1545 | 653 /* [in] */ int bReadOnly) |
168 | 654 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
655 Debug printf("COutputMemPin_NotifyAllocator(%p, %p) called\n", This, pAllocator); |
1545 | 656 ((COutputMemPin*)This)->pAllocator = (MemAllocator*) pAllocator; |
168 | 657 return 0; |
658 } | |
659 | |
22014 | 660 /** |
661 * \brief IMemInputPin::GetAllocatorRequirements (retrieves allocator properties requested by | |
662 * input pin) | |
663 * | |
664 * \param[in] This pointer to IMemInputPin interface | |
665 * \param[out] pProps pointer to a structure that receives allocator properties | |
666 * | |
667 * \return S_OK - success | |
668 * \return E_NOTIMPL - Not implemented | |
669 * \return E_POINTER - Null pointer | |
670 * | |
671 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
672 static HRESULT STDCALL COutputMemPin_GetAllocatorRequirements(IMemInputPin* This, |
3056 | 673 /* [out] */ ALLOCATOR_PROPERTIES* pProps) |
168 | 674 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
675 return output_unimplemented("COutputMemPin_GetAllocatorRequirements", This); |
168 | 676 } |
677 | |
22014 | 678 /** |
679 * \brief IMemInputPin::Receive (receives the next media sample int thre stream) | |
680 * | |
681 * \param[in] This pointer to IMemInputPin interface | |
682 * \param[in] pSample pointer to sample's IMediaSample interface | |
683 * | |
684 * \return S_OK - success | |
685 * \return S_FALSE - The sample was rejected | |
686 * \return E_POINTER - Null pointer | |
687 * \return VFW_E_INVALIDMEDIATYPE - invalid media type | |
688 * \return VFW_E_RUNTIME_ERROR - run-time error occured | |
689 * \return VFW_E_WRONG_STATE - pin is stopped | |
690 * | |
691 * \remarks | |
692 * Method san do on of the following: | |
693 * - reject sample | |
694 * - accept sample and process it in another thread | |
695 * - accept sample and process it before returning | |
696 * | |
697 * In second case method should increase reference count for sample (through AddRef) | |
698 * In the last case method might block indefinitely. If this might | |
699 * happen IMemInpuPin::ReceiveCAnBlock returns S_OK | |
700 * | |
701 * \note | |
702 * IMemoryInputPin::Receive,IMemoryInputPin::ReceiveMultiple, IMemoryInputPin::EndOfStream, | |
703 * IMemAllocator::GetBuffer runs in different (streaming) thread then other | |
704 * methods (application thread). | |
705 * IMemoryInputPin::NewSegment runs either in streaming or application thread. | |
706 * Developer must use critical sections for thread-safing work. | |
707 * | |
708 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
709 static HRESULT STDCALL COutputMemPin_Receive(IMemInputPin* This, |
3056 | 710 /* [in] */ IMediaSample* pSample) |
168 | 711 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
712 Debug printf("COutputMemPin_Receive(%p) called\n", This); |
1545 | 713 if (!pSample) |
714 return E_INVALIDARG; | |
715 | |
22398
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
716 if(((COutputMemPin*)This)->parent->SampleProc) |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
717 return ((COutputMemPin*)This)->parent->SampleProc(((COutputMemPin*)This)->parent->pUserData,pSample); |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
718 //reject sample |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
719 return S_FALSE; |
168 | 720 } |
721 | |
22014 | 722 /** |
723 * \brief IMemInputPin::ReceiveMultiple (receives multiple samples in the stream) | |
724 * | |
725 * \param[in] This pointer to IMemInputPin interface | |
726 * \param[in] pSamples pointer to array with samples | |
727 * \param[in] nSamples number of samples in array | |
728 * \param[out] nSamplesProcessed number of processed samples | |
729 * | |
730 * \return S_OK - success | |
731 * \return S_FALSE - The sample was rejected | |
732 * \return E_POINTER - Null pointer | |
733 * \return VFW_E_INVALIDMEDIATYPE - invalid media type | |
734 * \return VFW_E_RUNTIME_ERROR - run-time error occured | |
735 * \return VFW_E_WRONG_STATE - pin is stopped | |
736 * | |
737 * \remarks | |
738 * This method behaves like IMemInputPin::Receive but for array of samples | |
739 * | |
740 * \note | |
741 * IMemoryInputPin::Receive,IMemoryInputPin::ReceiveMultiple, IMemoryInputPin::EndOfStream, | |
742 * IMemAllocator::GetBuffer runs in different (streaming) thread then other | |
743 * methods (application thread). | |
744 * IMemoryInputPin::NewSegment runs either in streaming or application thread. | |
745 * Developer must use critical sections for thread-safing work. | |
746 * | |
747 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
748 static HRESULT STDCALL COutputMemPin_ReceiveMultiple(IMemInputPin * This, |
1545 | 749 /* [size_is][in] */ IMediaSample **pSamples, |
750 /* [in] */ long nSamples, | |
751 /* [out] */ long *nSamplesProcessed) | |
168 | 752 { |
22398
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
753 HRESULT hr; |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
754 Debug printf("COutputMemPin_ReceiveMultiple(%p) %d\n", This,nSamples); |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
755 for(*nSamplesProcessed=0; *nSamplesProcessed < nSamples; *nSamplesProcessed++) { |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
756 hr = This->vt->Receive(This,pSamples[*nSamplesProcessed]); |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
757 if (hr != S_OK) break; |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
758 } |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
759 return hr; |
1545 | 760 } |
761 | |
22014 | 762 /** |
763 * \brief IMemInputPin::ReceiveCanBlock (determines whether IMemInputPin:::Receive might block) | |
764 * | |
765 * \param[in] This pointer to IMemInputPin interface | |
766 * | |
767 * \return S_OK - the pin might block | |
768 * \return S_FALSE - the pin will not block | |
769 * | |
770 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
771 static HRESULT STDCALL COutputMemPin_ReceiveCanBlock(IMemInputPin * This) |
1545 | 772 { |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
773 return output_unimplemented("COutputMemPin_ReceiveCanBlock", This); |
168 | 774 } |
775 | |
22014 | 776 /** |
777 * \brief COutputPin::SetNewFormat(sets new media format for the pin) | |
778 * | |
779 * \param[in] This pointer to COutputPin class | |
780 * \param[in] amt new media format | |
781 * | |
782 */ | |
3056 | 783 static void COutputPin_SetNewFormat(COutputPin* This, const AM_MEDIA_TYPE* amt) |
784 { | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
785 CopyMediaType(&(This->type),amt); |
3056 | 786 } |
787 | |
22014 | 788 /** |
789 * \brief COutputPin destructor | |
790 * | |
791 * \param[in] This pointer to COutputPin class | |
792 * | |
793 */ | |
3056 | 794 static void COutputPin_Destroy(COutputPin* This) |
168 | 795 { |
3467 | 796 if (This->mempin->vt) |
797 free(This->mempin->vt); | |
798 if (This->mempin) | |
799 free(This->mempin); | |
800 if (This->vt) | |
801 free(This->vt); | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
802 FreeMediaType(&(This->type)); |
3056 | 803 free(This); |
804 } | |
805 | |
22014 | 806 /** |
807 * \brief IUnknown::AddRef (increases reference counter for interface) | |
808 * | |
809 * \param[in] This pointer to IUnknown class | |
810 * | |
811 * \return new value of reference counter | |
812 * | |
813 * \remarks | |
814 * Return value should be used only for debug purposes | |
815 * | |
816 */ | |
3056 | 817 static HRESULT STDCALL COutputPin_AddRef(IUnknown* This) |
818 { | |
3467 | 819 Debug printf("COutputPin_AddRef(%p) called (%d)\n", This, ((COutputPin*)This)->refcount); |
3056 | 820 ((COutputPin*)This)->refcount++; |
821 return 0; | |
822 } | |
1545 | 823 |
22014 | 824 /** |
825 * \brief IUnknown::Release (desreases reference counter for interface) | |
826 * | |
827 * \param[in] This pointer to IUnknown class | |
828 * | |
829 * \return new value of reference counter | |
830 * | |
831 * \remarks | |
832 * When reference counter reaches zero calls destructor | |
833 * Return value should be used only for debug purposes | |
834 * | |
835 */ | |
3056 | 836 static HRESULT STDCALL COutputPin_Release(IUnknown* This) |
837 { | |
3467 | 838 Debug printf("COutputPin_Release(%p) called (%d)\n", This, ((COutputPin*)This)->refcount); |
839 if (--((COutputPin*)This)->refcount <= 0) | |
3056 | 840 COutputPin_Destroy((COutputPin*)This); |
1545 | 841 |
3056 | 842 return 0; |
843 } | |
844 | |
22014 | 845 /** |
846 * \brief IUnknown::AddRef (increases reference counter for interface) | |
847 * | |
848 * \param[in] This pointer to IUnknown class | |
849 * | |
850 * \return new value of reference counter | |
851 * | |
852 * \remarks | |
853 * Return value should be used only for debug purposes | |
854 * | |
855 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
856 static HRESULT STDCALL COutputMemPin_AddRef(IUnknown* This) |
3056 | 857 { |
858 COutputMemPin* p = (COutputMemPin*) This; | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
859 Debug printf("COutputMemPin_AddRef(%p) called (%p, %d)\n", p, p->parent, p->parent->refcount); |
3056 | 860 p->parent->refcount++; |
861 return 0; | |
168 | 862 } |
1545 | 863 |
22014 | 864 /** |
865 * \brief IUnknown::Release (desreases reference counter for interface) | |
866 * | |
867 * \param[in] This pointer to IUnknown class | |
868 * | |
869 * \return new value of reference counter | |
870 * | |
871 * \remarks | |
872 * When reference counter reaches zero calls destructor | |
873 * Return value should be used only for debug purposes | |
874 * | |
875 */ | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
876 static HRESULT STDCALL COutputMemPin_Release(IUnknown* This) |
3056 | 877 { |
878 COutputMemPin* p = (COutputMemPin*) This; | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
879 Debug printf("COutputMemPin_Release(%p) called (%p, %d)\n", |
3056 | 880 p, p->parent, p->parent->refcount); |
881 if (--p->parent->refcount <= 0) | |
882 COutputPin_Destroy(p->parent); | |
883 return 0; | |
884 } | |
885 | |
22014 | 886 /** |
887 * \brief COutputPin constructor | |
888 * | |
889 * \param[in] amt media type for pin | |
890 * | |
891 * \return pointer to COutputPin if success | |
892 * \return NULL if error occured | |
893 * | |
894 */ | |
22398
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
895 COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt,SAMPLEPROC SampleProc,void* pUserData) |
1545 | 896 { |
3056 | 897 COutputPin* This = (COutputPin*) malloc(sizeof(COutputPin)); |
3467 | 898 IMemInputPin_vt* ivt; |
899 | |
900 if (!This) | |
901 return NULL; | |
902 | |
903 This->vt = (IPin_vt*) malloc(sizeof(IPin_vt)); | |
904 This->mempin = (COutputMemPin*) malloc(sizeof(COutputMemPin)); | |
905 ivt = (IMemInputPin_vt*) malloc(sizeof(IMemInputPin_vt)); | |
906 | |
907 if (!This->vt || !This->mempin || !ivt) | |
908 { | |
909 COutputPin_Destroy(This); | |
910 return NULL; | |
911 } | |
912 | |
22398
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
913 This->SampleProc=SampleProc; |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
914 This->pUserData=pUserData; |
49f01f8fbd60
Rework of copying samples from directshow codecs.
voroshil
parents:
22334
diff
changeset
|
915 |
3467 | 916 This->mempin->vt = ivt; |
917 | |
3056 | 918 This->refcount = 1; |
919 This->remote = 0; | |
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
22017
diff
changeset
|
920 CopyMediaType(&(This->type),amt); |
3467 | 921 |
3056 | 922 This->vt->QueryInterface = COutputPin_QueryInterface; |
923 This->vt->AddRef = COutputPin_AddRef; | |
924 This->vt->Release = COutputPin_Release; | |
925 This->vt->Connect = COutputPin_Connect; | |
926 This->vt->ReceiveConnection = COutputPin_ReceiveConnection; | |
927 This->vt->Disconnect = COutputPin_Disconnect; | |
928 This->vt->ConnectedTo = COutputPin_ConnectedTo; | |
929 This->vt->ConnectionMediaType = COutputPin_ConnectionMediaType; | |
930 This->vt->QueryPinInfo = COutputPin_QueryPinInfo; | |
931 This->vt->QueryDirection = COutputPin_QueryDirection; | |
932 This->vt->QueryId = COutputPin_QueryId; | |
933 This->vt->QueryAccept = COutputPin_QueryAccept; | |
934 This->vt->EnumMediaTypes = COutputPin_EnumMediaTypes; | |
935 This->vt->QueryInternalConnections = COutputPin_QueryInternalConnections; | |
936 This->vt->EndOfStream = COutputPin_EndOfStream; | |
937 This->vt->BeginFlush = COutputPin_BeginFlush; | |
938 This->vt->EndFlush = COutputPin_EndFlush; | |
939 This->vt->NewSegment = COutputPin_NewSegment; | |
940 | |
22016
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
941 This->mempin->vt->QueryInterface = COutputMemPin_QueryInterface; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
942 This->mempin->vt->AddRef = COutputMemPin_AddRef; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
943 This->mempin->vt->Release = COutputMemPin_Release; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
944 This->mempin->vt->GetAllocator = COutputMemPin_GetAllocator; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
945 This->mempin->vt->NotifyAllocator = COutputMemPin_NotifyAllocator; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
946 This->mempin->vt->GetAllocatorRequirements = COutputMemPin_GetAllocatorRequirements; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
947 This->mempin->vt->Receive = COutputMemPin_Receive; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
948 This->mempin->vt->ReceiveMultiple = COutputMemPin_ReceiveMultiple; |
4479e6a1a140
Changing debug messages and renaming method names according to their
voroshil
parents:
22015
diff
changeset
|
949 This->mempin->vt->ReceiveCanBlock = COutputMemPin_ReceiveCanBlock; |
3056 | 950 |
951 This->mempin->frame_size_pointer = 0; | |
952 This->mempin->frame_pointer = 0; | |
953 This->mempin->pAllocator = 0; | |
3130 | 954 This->mempin->refcount = 1; |
3056 | 955 This->mempin->parent = This; |
956 | |
957 This->SetNewFormat = COutputPin_SetNewFormat; | |
958 | |
959 return This; | |
1545 | 960 } |