Commit c585931d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Get rid of the BaseOutputPin typedef.

parent 84760a8f
...@@ -37,7 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); ...@@ -37,7 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { typedef struct {
struct strmbase_filter filter; struct strmbase_filter filter;
IPersistPropertyBag IPersistPropertyBag_iface; IPersistPropertyBag IPersistPropertyBag_iface;
BaseOutputPin *output;
} AudioRecord; } AudioRecord;
static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *filter) static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *filter)
......
...@@ -38,7 +38,7 @@ typedef struct { ...@@ -38,7 +38,7 @@ typedef struct {
IPersistPropertyBag IPersistPropertyBag_iface; IPersistPropertyBag IPersistPropertyBag_iface;
BaseInputPin sink; BaseInputPin sink;
BaseOutputPin source; struct strmbase_source source;
DWORD fcc_handler; DWORD fcc_handler;
HIC hic; HIC hic;
...@@ -554,7 +554,8 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition ...@@ -554,7 +554,8 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition
return S_OK; return S_OK;
} }
static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI AVICompressorOut_DecideBufferSize(struct strmbase_source *base,
IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
AVICompressor *This = impl_from_BasePin(&base->pin); AVICompressor *This = impl_from_BasePin(&base->pin);
ALLOCATOR_PROPERTIES actual; ALLOCATOR_PROPERTIES actual;
...@@ -571,7 +572,7 @@ static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMe ...@@ -571,7 +572,7 @@ static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMe
return IMemAllocator_SetProperties(alloc, ppropInputRequest, &actual); return IMemAllocator_SetProperties(alloc, ppropInputRequest, &actual);
} }
static HRESULT WINAPI AVICompressorOut_DecideAllocator(BaseOutputPin *base, static HRESULT WINAPI AVICompressorOut_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc) IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc); TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
......
...@@ -81,7 +81,7 @@ typedef struct { ...@@ -81,7 +81,7 @@ typedef struct {
REFERENCE_TIME interleave; REFERENCE_TIME interleave;
REFERENCE_TIME preroll; REFERENCE_TIME preroll;
BaseOutputPin source; struct strmbase_source source;
IQualityControl IQualityControl_iface; IQualityControl IQualityControl_iface;
int input_pin_no; int input_pin_no;
...@@ -1158,7 +1158,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP ...@@ -1158,7 +1158,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP
return S_OK; return S_OK;
} }
static HRESULT WINAPI AviMuxOut_AttemptConnection(BaseOutputPin *base, static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
PIN_DIRECTION dir; PIN_DIRECTION dir;
...@@ -1195,7 +1195,7 @@ static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_ME ...@@ -1195,7 +1195,7 @@ static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_ME
return S_OK; return S_OK;
} }
static HRESULT WINAPI AviMuxOut_DecideAllocator(BaseOutputPin *base, static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc) IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
ALLOCATOR_PROPERTIES req, actual; ALLOCATOR_PROPERTIES req, actual;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
struct _Capture; struct _Capture;
typedef struct _Capture Capture; typedef struct _Capture Capture;
Capture *qcap_driver_init(BaseOutputPin*,USHORT) DECLSPEC_HIDDEN; Capture *qcap_driver_init(struct strmbase_source *,USHORT) DECLSPEC_HIDDEN;
HRESULT qcap_driver_destroy(Capture*) DECLSPEC_HIDDEN; HRESULT qcap_driver_destroy(Capture*) DECLSPEC_HIDDEN;
HRESULT qcap_driver_check_format(Capture*,const AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; HRESULT qcap_driver_check_format(Capture*,const AM_MEDIA_TYPE*) DECLSPEC_HIDDEN;
HRESULT qcap_driver_set_format(Capture*,AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; HRESULT qcap_driver_set_format(Capture*,AM_MEDIA_TYPE*) DECLSPEC_HIDDEN;
......
...@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); ...@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { typedef struct {
struct strmbase_filter filter; struct strmbase_filter filter;
BaseInputPin sink; BaseInputPin sink;
BaseOutputPin capture, preview; struct strmbase_source capture, preview;
} SmartTeeFilter; } SmartTeeFilter;
static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *filter) static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *filter)
...@@ -379,7 +379,8 @@ static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPos ...@@ -379,7 +379,8 @@ static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPos
return S_FALSE; return S_FALSE;
} }
static HRESULT WINAPI SmartTeeFilterCapture_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc) static HRESULT WINAPI SmartTeeFilterCapture_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
SmartTeeFilter *This = impl_from_BasePin(&base->pin); SmartTeeFilter *This = impl_from_BasePin(&base->pin);
TRACE("(%p, %p, %p)\n", This, pPin, pAlloc); TRACE("(%p, %p, %p)\n", This, pPin, pAlloc);
...@@ -450,7 +451,8 @@ static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPos ...@@ -450,7 +451,8 @@ static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPos
return S_FALSE; return S_FALSE;
} }
static HRESULT WINAPI SmartTeeFilterPreview_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc) static HRESULT WINAPI SmartTeeFilterPreview_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
SmartTeeFilter *This = impl_from_BasePin(&base->pin); SmartTeeFilter *This = impl_from_BasePin(&base->pin);
TRACE("(%p, %p, %p)\n", This, pPin, pAlloc); TRACE("(%p, %p, %p)\n", This, pPin, pAlloc);
......
...@@ -101,7 +101,7 @@ struct _Capture ...@@ -101,7 +101,7 @@ struct _Capture
CRITICAL_SECTION CritSect; CRITICAL_SECTION CritSect;
BaseOutputPin *pin; struct strmbase_source *pin;
int fd, mmap; int fd, mmap;
BOOL iscommitted, stopped; BOOL iscommitted, stopped;
...@@ -562,7 +562,7 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) ...@@ -562,7 +562,7 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state)
return S_OK; return S_OK;
} }
Capture * qcap_driver_init(BaseOutputPin *pin, USHORT card) Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card)
{ {
struct v4l2_capability caps = {{0}}; struct v4l2_capability caps = {{0}};
struct v4l2_format format = {0}; struct v4l2_format format = {0};
...@@ -659,7 +659,7 @@ error: ...@@ -659,7 +659,7 @@ error:
#else #else
Capture * qcap_driver_init(BaseOutputPin *pin, USHORT card) Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card)
{ {
static const char msg[] = static const char msg[] =
"The v4l headers were not available at compile time,\n" "The v4l headers were not available at compile time,\n"
......
...@@ -53,7 +53,7 @@ typedef struct VfwCapture ...@@ -53,7 +53,7 @@ typedef struct VfwCapture
BOOL init; BOOL init;
Capture *driver_info; Capture *driver_info;
BaseOutputPin source; struct strmbase_source source;
IKsPropertySet IKsPropertySet_iface; IKsPropertySet IKsPropertySet_iface;
} VfwCapture; } VfwCapture;
...@@ -537,7 +537,8 @@ static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_ ...@@ -537,7 +537,8 @@ static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_
return hr; return hr;
} }
static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI VfwPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
ALLOCATOR_PROPERTIES actual; ALLOCATOR_PROPERTIES actual;
......
...@@ -61,7 +61,7 @@ typedef struct AsyncReader ...@@ -61,7 +61,7 @@ typedef struct AsyncReader
struct strmbase_filter filter; struct strmbase_filter filter;
IFileSourceFilter IFileSourceFilter_iface; IFileSourceFilter IFileSourceFilter_iface;
BaseOutputPin source; struct strmbase_source source;
IAsyncReader IAsyncReader_iface; IAsyncReader IAsyncReader_iface;
LPOLESTR pszFileName; LPOLESTR pszFileName;
...@@ -571,7 +571,7 @@ static inline AsyncReader *impl_from_BasePin(BasePin *iface) ...@@ -571,7 +571,7 @@ static inline AsyncReader *impl_from_BasePin(BasePin *iface)
return CONTAINING_RECORD(iface, AsyncReader, source.pin); return CONTAINING_RECORD(iface, AsyncReader, source.pin);
} }
static inline AsyncReader *impl_from_BaseOutputPin(BaseOutputPin *iface) static inline AsyncReader *impl_from_strmbase_source(struct strmbase_source *iface)
{ {
return CONTAINING_RECORD(iface, AsyncReader, source); return CONTAINING_RECORD(iface, AsyncReader, source);
} }
...@@ -657,7 +657,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl = ...@@ -657,7 +657,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl =
/* specific AM_MEDIA_TYPE - it cannot be NULL */ /* specific AM_MEDIA_TYPE - it cannot be NULL */
/* this differs from standard OutputPin_AttemptConnection only in that it /* this differs from standard OutputPin_AttemptConnection only in that it
* doesn't need the IMemInputPin interface on the receiving pin */ * doesn't need the IMemInputPin interface on the receiving pin */
static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BaseOutputPin *This, static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(struct strmbase_source *This,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
HRESULT hr; HRESULT hr;
...@@ -684,9 +684,10 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BaseOutputPin *This, ...@@ -684,9 +684,10 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BaseOutputPin *This,
return hr; return hr;
} }
static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
AsyncReader *This = impl_from_BaseOutputPin(iface); AsyncReader *This = impl_from_strmbase_source(iface);
ALLOCATOR_PROPERTIES actual; ALLOCATOR_PROPERTIES actual;
if (ppropInputRequest->cbAlign && ppropInputRequest->cbAlign != This->allocProps.cbAlign) if (ppropInputRequest->cbAlign && ppropInputRequest->cbAlign != This->allocProps.cbAlign)
......
...@@ -41,10 +41,12 @@ static const IPinVtbl Parser_InputPin_Vtbl; ...@@ -41,10 +41,12 @@ static const IPinVtbl Parser_InputPin_Vtbl;
static HRESULT WINAPI Parser_ChangeStart(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeStart(IMediaSeeking *iface);
static HRESULT WINAPI Parser_ChangeStop(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeStop(IMediaSeeking *iface);
static HRESULT WINAPI Parser_ChangeRate(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeRate(IMediaSeeking *iface);
static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props);
static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *pmt); static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *pmt);
static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt); static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt);
static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); static HRESULT WINAPI Parser_OutputPin_DecideAllocator(struct strmbase_source *iface,
IMemInputPin *peer, IMemAllocator **allocator);
static inline ParserImpl *impl_from_IMediaSeeking( IMediaSeeking *iface ) static inline ParserImpl *impl_from_IMediaSeeking( IMediaSeeking *iface )
{ {
...@@ -469,7 +471,8 @@ static const IMediaSeekingVtbl Parser_Seeking_Vtbl = ...@@ -469,7 +471,8 @@ static const IMediaSeekingVtbl Parser_Seeking_Vtbl =
SourceSeekingImpl_GetPreroll SourceSeekingImpl_GetPreroll
}; };
static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
Parser_OutputPin *This = (Parser_OutputPin*)iface; Parser_OutputPin *This = (Parser_OutputPin*)iface;
ALLOCATOR_PROPERTIES actual; ALLOCATOR_PROPERTIES actual;
...@@ -497,7 +500,8 @@ static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPositio ...@@ -497,7 +500,8 @@ static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPositio
return S_OK; return S_OK;
} }
static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *iface, IMemInputPin *pPin, IMemAllocator **pAlloc) static HRESULT WINAPI Parser_OutputPin_DecideAllocator(struct strmbase_source *iface,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
Parser_OutputPin *This = (Parser_OutputPin*)iface; Parser_OutputPin *This = (Parser_OutputPin*)iface;
HRESULT hr; HRESULT hr;
......
...@@ -28,7 +28,7 @@ typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface); ...@@ -28,7 +28,7 @@ typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface);
typedef struct Parser_OutputPin typedef struct Parser_OutputPin
{ {
BaseOutputPin pin; struct strmbase_source pin;
AM_MEDIA_TYPE * pmt; AM_MEDIA_TYPE * pmt;
LONGLONG dwSamplesProcessed; LONGLONG dwSamplesProcessed;
......
...@@ -48,15 +48,9 @@ static void OutputQueue_FreeSamples(OutputQueue *pOutputQueue) ...@@ -48,15 +48,9 @@ static void OutputQueue_FreeSamples(OutputQueue *pOutputQueue)
} }
} }
HRESULT WINAPI OutputQueue_Construct( HRESULT WINAPI OutputQueue_Construct(struct strmbase_source *pInputPin, BOOL bAuto,
BaseOutputPin *pInputPin, BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority,
BOOL bAuto, const OutputQueueFuncTable *pFuncsTable, OutputQueue **ppOutputQueue)
BOOL bQueue,
LONG lBatchSize,
BOOL bBatchExact,
DWORD dwPriority,
const OutputQueueFuncTable* pFuncsTable,
OutputQueue **ppOutputQueue )
{ {
BOOL threaded = FALSE; BOOL threaded = FALSE;
......
...@@ -334,14 +334,14 @@ HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFER ...@@ -334,14 +334,14 @@ HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFER
/*** OutputPin implementation ***/ /*** OutputPin implementation ***/
static inline BaseOutputPin *impl_BaseOutputPin_from_IPin( IPin *iface ) static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
{ {
return CONTAINING_RECORD(iface, BaseOutputPin, pin.IPin_iface); return CONTAINING_RECORD(iface, struct strmbase_source, pin.IPin_iface);
} }
HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv)
{ {
BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface); struct strmbase_source *This = impl_source_from_IPin(iface);
TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
...@@ -371,7 +371,7 @@ HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOI ...@@ -371,7 +371,7 @@ HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOI
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
{ {
HRESULT hr; HRESULT hr;
BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface); struct strmbase_source *This = impl_source_from_IPin(iface);
TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt); TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
dump_AM_MEDIA_TYPE(pmt); dump_AM_MEDIA_TYPE(pmt);
...@@ -462,7 +462,7 @@ HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const ...@@ -462,7 +462,7 @@ HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface) HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
{ {
HRESULT hr; HRESULT hr;
BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface); struct strmbase_source *This = impl_source_from_IPin(iface);
TRACE("(%p)->()\n", This); TRACE("(%p)->()\n", This);
...@@ -516,7 +516,8 @@ HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface) ...@@ -516,7 +516,8 @@ HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface)
return E_UNEXPECTED; return E_UNEXPECTED;
} }
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags) HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This,
IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
{ {
HRESULT hr; HRESULT hr;
...@@ -536,7 +537,7 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa ...@@ -536,7 +537,7 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa
} }
/* replaces OutputPin_SendSample */ /* replaces OutputPin_SendSample */
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSample) HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *This, IMediaSample *pSample)
{ {
IMemInputPin * pMemConnected = NULL; IMemInputPin * pMemConnected = NULL;
PIN_INFO pinInfo; PIN_INFO pinInfo;
...@@ -576,7 +577,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa ...@@ -576,7 +577,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa
} }
/* replaces OutputPin_CommitAllocator */ /* replaces OutputPin_CommitAllocator */
HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *This)
{ {
HRESULT hr; HRESULT hr;
...@@ -596,7 +597,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) ...@@ -596,7 +597,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This)
} }
/* replaces OutputPin_DecommitAllocator */ /* replaces OutputPin_DecommitAllocator */
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This) HRESULT WINAPI BaseOutputPinImpl_Inactive(struct strmbase_source *This)
{ {
HRESULT hr; HRESULT hr;
...@@ -615,12 +616,13 @@ HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This) ...@@ -615,12 +616,13 @@ HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This)
return hr; return hr;
} }
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc) HRESULT WINAPI BaseOutputPinImpl_InitAllocator(struct strmbase_source *This, IMemAllocator **pMemAlloc)
{ {
return CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)pMemAlloc); return CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)pMemAlloc);
} }
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc) HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *This,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
HRESULT hr; HRESULT hr;
...@@ -649,7 +651,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP ...@@ -649,7 +651,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP
/* Function called as a helper to IPin_Connect */ /* Function called as a helper to IPin_Connect */
/* specific AM_MEDIA_TYPE - it cannot be NULL */ /* specific AM_MEDIA_TYPE - it cannot be NULL */
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
{ {
HRESULT hr; HRESULT hr;
IMemAllocator * pMemAlloc = NULL; IMemAllocator * pMemAlloc = NULL;
...@@ -704,7 +707,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pR ...@@ -704,7 +707,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pR
return hr; return hr;
} }
void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter, void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
const WCHAR *name, const BaseOutputPinFuncTable *func_table) const WCHAR *name, const BaseOutputPinFuncTable *func_table)
{ {
memset(pin, 0, sizeof(*pin)); memset(pin, 0, sizeof(*pin));
...@@ -717,7 +720,7 @@ void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmb ...@@ -717,7 +720,7 @@ void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmb
pin->pFuncsTable = func_table; pin->pFuncsTable = func_table;
} }
void strmbase_source_cleanup(BaseOutputPin *pin) void strmbase_source_cleanup(struct strmbase_source *pin)
{ {
FreeMediaType(&pin->pin.mtCurrent); FreeMediaType(&pin->pin.mtCurrent);
if (pin->pAllocator) if (pin->pAllocator)
......
...@@ -103,7 +103,8 @@ static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const ...@@ -103,7 +103,8 @@ static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const
return S_FALSE; return S_FALSE;
} }
static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(struct strmbase_source *This,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
TransformFilter *pTransformFilter = impl_from_source_IPin(&This->pin.IPin_iface); TransformFilter *pTransformFilter = impl_from_source_IPin(&This->pin.IPin_iface);
return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest); return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest);
......
...@@ -72,7 +72,7 @@ typedef struct GSTImpl { ...@@ -72,7 +72,7 @@ typedef struct GSTImpl {
} GSTImpl; } GSTImpl;
struct GSTOutPin { struct GSTOutPin {
BaseOutputPin pin; struct strmbase_source pin;
IQualityControl IQualityControl_iface; IQualityControl IQualityControl_iface;
GstElement *flipfilter; GstElement *flipfilter;
...@@ -1657,7 +1657,8 @@ static HRESULT WINAPI GSTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_M ...@@ -1657,7 +1657,8 @@ static HRESULT WINAPI GSTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_M
return S_OK; return S_OK;
} }
static HRESULT WINAPI GSTOutPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
GSTOutPin *This = impl_source_from_IPin(&iface->pin.IPin_iface); GSTOutPin *This = impl_source_from_IPin(&iface->pin.IPin_iface);
TRACE("(%p)->(%p, %p)\n", This, pAlloc, ppropInputRequest); TRACE("(%p)->(%p, %p)\n", This, pAlloc, ppropInputRequest);
...@@ -1665,7 +1666,8 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(BaseOutputPin *iface, IMemAlloc ...@@ -1665,7 +1666,8 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(BaseOutputPin *iface, IMemAlloc
return S_OK; return S_OK;
} }
static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc) static HRESULT WINAPI GSTOutPin_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
GSTOutPin *pin = impl_source_from_IPin(&base->pin.IPin_iface); GSTOutPin *pin = impl_source_from_IPin(&base->pin.IPin_iface);
GSTImpl *filter = impl_from_strmbase_filter(pin->pin.pin.filter); GSTImpl *filter = impl_from_strmbase_filter(pin->pin.pin.filter);
......
...@@ -129,7 +129,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qtsplitter); ...@@ -129,7 +129,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qtsplitter);
extern CLSID CLSID_QTSplitter; extern CLSID CLSID_QTSplitter;
typedef struct QTOutPin { typedef struct QTOutPin {
BaseOutputPin pin; struct strmbase_source pin;
IQualityControl IQualityControl_iface; IQualityControl IQualityControl_iface;
AM_MEDIA_TYPE * pmt; AM_MEDIA_TYPE * pmt;
...@@ -1262,7 +1262,7 @@ static inline QTOutPin *impl_QTOutPin_from_BasePin( BasePin *iface ) ...@@ -1262,7 +1262,7 @@ static inline QTOutPin *impl_QTOutPin_from_BasePin( BasePin *iface )
return CONTAINING_RECORD(iface, QTOutPin, pin.pin); return CONTAINING_RECORD(iface, QTOutPin, pin.pin);
} }
static inline QTOutPin *impl_QTOutPin_from_BaseOutputPin( BaseOutputPin *iface ) static inline QTOutPin *impl_QTOutPin_from_BaseOutputPin(struct strmbase_source *iface)
{ {
return CONTAINING_RECORD(iface, QTOutPin, pin); return CONTAINING_RECORD(iface, QTOutPin, pin);
} }
...@@ -1311,13 +1311,15 @@ static HRESULT WINAPI QTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_ME ...@@ -1311,13 +1311,15 @@ static HRESULT WINAPI QTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_ME
return S_OK; return S_OK;
} }
static HRESULT WINAPI QTOutPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest) static HRESULT WINAPI QTOutPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{ {
/* Unused */ /* Unused */
return S_OK; return S_OK;
} }
static HRESULT WINAPI QTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputPin *pPin, IMemAllocator **pAlloc) static HRESULT WINAPI QTOutPin_DecideAllocator(struct strmbase_source *iface,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{ {
HRESULT hr; HRESULT hr;
QTOutPin *This = impl_QTOutPin_from_BaseOutputPin(iface); QTOutPin *This = impl_QTOutPin_from_BaseOutputPin(iface);
......
...@@ -53,7 +53,7 @@ typedef struct BasePinFuncTable { ...@@ -53,7 +53,7 @@ typedef struct BasePinFuncTable {
BasePin_GetMediaType pfnGetMediaType; BasePin_GetMediaType pfnGetMediaType;
} BasePinFuncTable; } BasePinFuncTable;
typedef struct BaseOutputPin struct strmbase_source
{ {
/* inheritance C style! */ /* inheritance C style! */
BasePin pin; BasePin pin;
...@@ -61,11 +61,11 @@ typedef struct BaseOutputPin ...@@ -61,11 +61,11 @@ typedef struct BaseOutputPin
IMemAllocator * pAllocator; IMemAllocator * pAllocator;
const struct BaseOutputPinFuncTable* pFuncsTable; const struct BaseOutputPinFuncTable* pFuncsTable;
} BaseOutputPin; };
typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(BaseOutputPin *pin, IPin *peer, const AM_MEDIA_TYPE *mt); typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(struct strmbase_source *pin, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props);
typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator);
typedef struct BaseOutputPinFuncTable { typedef struct BaseOutputPinFuncTable {
BasePinFuncTable base; BasePinFuncTable base;
...@@ -124,16 +124,17 @@ HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface); ...@@ -124,16 +124,17 @@ HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface);
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface); HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface);
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface); HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface);
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin * This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags); HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin,
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin * This, IMediaSample * pSample); IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags);
HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This); HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *pin, IMediaSample *sample);
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This); HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *pin);
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc); HRESULT WINAPI BaseOutputPinImpl_Inactive(struct strmbase_source *pin);
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); HRESULT WINAPI BaseOutputPinImpl_InitAllocator(struct strmbase_source *pin, IMemAllocator **allocator);
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *pin, IPin *peer, const AM_MEDIA_TYPE *mt); HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator);
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
void strmbase_source_cleanup(BaseOutputPin *pin);
void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter, void strmbase_source_cleanup(struct strmbase_source *pin);
void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
const WCHAR *name, const BaseOutputPinFuncTable *func_table); const WCHAR *name, const BaseOutputPinFuncTable *func_table);
/* Base Input Pin */ /* Base Input Pin */
...@@ -204,7 +205,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu ...@@ -204,7 +205,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu
typedef struct TransformFilter typedef struct TransformFilter
{ {
struct strmbase_filter filter; struct strmbase_filter filter;
BaseOutputPin source; struct strmbase_source source;
BaseInputPin sink; BaseInputPin sink;
AM_MEDIA_TYPE pmt; AM_MEDIA_TYPE pmt;
...@@ -328,7 +329,7 @@ HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFi ...@@ -328,7 +329,7 @@ HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFi
typedef struct tagOutputQueue { typedef struct tagOutputQueue {
CRITICAL_SECTION csQueue; CRITICAL_SECTION csQueue;
BaseOutputPin * pInputPin; struct strmbase_source *pInputPin;
HANDLE hThread; HANDLE hThread;
HANDLE hProcessQueue; HANDLE hProcessQueue;
...@@ -350,7 +351,7 @@ typedef struct OutputQueueFuncTable ...@@ -350,7 +351,7 @@ typedef struct OutputQueueFuncTable
OutputQueue_ThreadProc pfnThreadProc; OutputQueue_ThreadProc pfnThreadProc;
} OutputQueueFuncTable; } OutputQueueFuncTable;
HRESULT WINAPI OutputQueue_Construct( BaseOutputPin *pInputPin, BOOL bAuto, HRESULT WINAPI OutputQueue_Construct( struct strmbase_source *pin, BOOL bAuto,
BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority, BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority,
const OutputQueueFuncTable* pFuncsTable, OutputQueue **ppOutputQueue ); const OutputQueueFuncTable* pFuncsTable, OutputQueue **ppOutputQueue );
HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue); HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment