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