Mercurial > mplayer.hg
comparison loader/dshow/outputpin.h @ 22398:49f01f8fbd60
Rework of copying samples from directshow codecs.
Using callback function provided by filter to store and process samples from
codec instead of explicit typecast to DS_Filter.
author | voroshil |
---|---|
date | Fri, 02 Mar 2007 18:52:10 +0000 |
parents | 174e2a58b4cd |
children | 2c8cdb9123b8 |
comparison
equal
deleted
inserted
replaced
22397:b2e4557a3160 | 22398:49f01f8fbd60 |
---|---|
6 #include "allocator.h" | 6 #include "allocator.h" |
7 | 7 |
8 typedef struct _COutputMemPin COutputMemPin; | 8 typedef struct _COutputMemPin COutputMemPin; |
9 typedef struct _COutputPin COutputPin; | 9 typedef struct _COutputPin COutputPin; |
10 | 10 |
11 /** | |
12 Callback routine for copying samples from pin into filter | |
13 \param pUserData pointer to user's data | |
14 \param sample IMediaSample | |
15 */ | |
16 typedef HRESULT STDCALL (*SAMPLEPROC)(void* pUserData,IMediaSample*sample); | |
17 | |
11 struct _COutputPin | 18 struct _COutputPin |
12 { | 19 { |
13 IPin_vt* vt; | 20 IPin_vt* vt; |
14 DECLARE_IUNKNOWN(); | 21 DECLARE_IUNKNOWN(); |
15 COutputMemPin* mempin; | 22 COutputMemPin* mempin; |
16 AM_MEDIA_TYPE type; | 23 AM_MEDIA_TYPE type; |
17 IPin* remote; | 24 IPin* remote; |
18 void ( *SetFramePointer )(COutputPin*, char** z); | 25 SAMPLEPROC SampleProc; |
19 void ( *SetPointer2 )(COutputPin*, char* p); | 26 void* pUserData; |
20 void ( *SetFrameSizePointer )(COutputPin*, long* z); | |
21 void ( *SetNewFormat )(COutputPin*, const AM_MEDIA_TYPE* a); | 27 void ( *SetNewFormat )(COutputPin*, const AM_MEDIA_TYPE* a); |
22 }; | 28 }; |
23 | 29 |
24 COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* vhdr); | 30 COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt,SAMPLEPROC SampleProc,void* pUserData); |
25 | 31 |
26 #endif /* DS_OUTPUTPIN_H */ | 32 #endif /* DS_OUTPUTPIN_H */ |