Mercurial > mplayer.hg
diff 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 |
line wrap: on
line diff
--- a/loader/dshow/outputpin.h Fri Mar 02 17:59:19 2007 +0000 +++ b/loader/dshow/outputpin.h Fri Mar 02 18:52:10 2007 +0000 @@ -8,6 +8,13 @@ typedef struct _COutputMemPin COutputMemPin; typedef struct _COutputPin COutputPin; +/** + Callback routine for copying samples from pin into filter + \param pUserData pointer to user's data + \param sample IMediaSample +*/ +typedef HRESULT STDCALL (*SAMPLEPROC)(void* pUserData,IMediaSample*sample); + struct _COutputPin { IPin_vt* vt; @@ -15,12 +22,11 @@ COutputMemPin* mempin; AM_MEDIA_TYPE type; IPin* remote; - void ( *SetFramePointer )(COutputPin*, char** z); - void ( *SetPointer2 )(COutputPin*, char* p); - void ( *SetFrameSizePointer )(COutputPin*, long* z); + SAMPLEPROC SampleProc; + void* pUserData; void ( *SetNewFormat )(COutputPin*, const AM_MEDIA_TYPE* a); }; -COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* vhdr); +COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt,SAMPLEPROC SampleProc,void* pUserData); #endif /* DS_OUTPUTPIN_H */