Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 1 - dlls/qcap/avico.c | 7 ++++--- dlls/qcap/avimux.c | 6 +++--- dlls/qcap/capture.h | 2 +- dlls/qcap/smartteefilter.c | 8 ++++--- dlls/qcap/v4l.c | 6 +++--- dlls/qcap/vfwcapture.c | 5 +++-- dlls/quartz/filesource.c | 11 +++++----- dlls/quartz/parser.c | 12 +++++++---- dlls/quartz/parser.h | 2 +- dlls/strmbase/outputqueue.c | 12 +++-------- dlls/strmbase/pin.c | 31 ++++++++++++++------------- dlls/strmbase/transform.c | 3 ++- dlls/winegstreamer/gstdemux.c | 8 ++++--- dlls/wineqtdecoder/qtsplitter.c | 10 +++++---- include/wine/strmbase.h | 37 +++++++++++++++++---------------- 16 files changed, 86 insertions(+), 75 deletions(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index 6d487dbe2d9..5d636937f81 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -37,7 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); typedef struct { struct strmbase_filter filter; IPersistPropertyBag IPersistPropertyBag_iface; - BaseOutputPin *output; } AudioRecord;
static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *filter) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 918cabd8191..c052bda5995 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -38,7 +38,7 @@ typedef struct { IPersistPropertyBag IPersistPropertyBag_iface;
BaseInputPin sink; - BaseOutputPin source; + struct strmbase_source source;
DWORD fcc_handler; HIC hic; @@ -554,7 +554,8 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition 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); ALLOCATOR_PROPERTIES actual; @@ -571,7 +572,7 @@ static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMe 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) { TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc); diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index adc848f6dda..fbc74ae4880 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -81,7 +81,7 @@ typedef struct { REFERENCE_TIME interleave; REFERENCE_TIME preroll;
- BaseOutputPin source; + struct strmbase_source source; IQualityControl IQualityControl_iface;
int input_pin_no; @@ -1158,7 +1158,7 @@ static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYP 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) { PIN_DIRECTION dir; @@ -1195,7 +1195,7 @@ static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_ME return S_OK; }
-static HRESULT WINAPI AviMuxOut_DecideAllocator(BaseOutputPin *base, +static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base, IMemInputPin *pPin, IMemAllocator **pAlloc) { ALLOCATOR_PROPERTIES req, actual; diff --git a/dlls/qcap/capture.h b/dlls/qcap/capture.h index 82f5eb2461c..131487ad5fb 100644 --- a/dlls/qcap/capture.h +++ b/dlls/qcap/capture.h @@ -23,7 +23,7 @@ struct _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_check_format(Capture*,const AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; HRESULT qcap_driver_set_format(Capture*,AM_MEDIA_TYPE*) DECLSPEC_HIDDEN; diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index c53c7af9bbd..353409dcfc1 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); typedef struct { struct strmbase_filter filter; BaseInputPin sink; - BaseOutputPin capture, preview; + struct strmbase_source capture, preview; } SmartTeeFilter;
static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *filter) @@ -379,7 +379,8 @@ static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPos 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); TRACE("(%p, %p, %p)\n", This, pPin, pAlloc); @@ -450,7 +451,8 @@ static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPos 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); TRACE("(%p, %p, %p)\n", This, pPin, pAlloc); diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index b308f14786e..c9102accb80 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -101,7 +101,7 @@ struct _Capture
CRITICAL_SECTION CritSect;
- BaseOutputPin *pin; + struct strmbase_source *pin; int fd, mmap; BOOL iscommitted, stopped;
@@ -562,7 +562,7 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) 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_format format = {0}; @@ -659,7 +659,7 @@ error:
#else
-Capture * qcap_driver_init(BaseOutputPin *pin, USHORT card) +Capture *qcap_driver_init(struct strmbase_source *pin, USHORT card) { static const char msg[] = "The v4l headers were not available at compile time,\n" diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index c4605ce10cc..ed8c050828a 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -53,7 +53,7 @@ typedef struct VfwCapture BOOL init; Capture *driver_info;
- BaseOutputPin source; + struct strmbase_source source; IKsPropertySet IKsPropertySet_iface; } VfwCapture;
@@ -537,7 +537,8 @@ static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_ 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;
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 77385009f24..006c6592b56 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -61,7 +61,7 @@ typedef struct AsyncReader struct strmbase_filter filter; IFileSourceFilter IFileSourceFilter_iface;
- BaseOutputPin source; + struct strmbase_source source; IAsyncReader IAsyncReader_iface;
LPOLESTR pszFileName; @@ -571,7 +571,7 @@ static inline AsyncReader *impl_from_BasePin(BasePin *iface) 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); } @@ -657,7 +657,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl = /* specific AM_MEDIA_TYPE - it cannot be NULL */ /* this differs from standard OutputPin_AttemptConnection only in that it * 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) { HRESULT hr; @@ -684,9 +684,10 @@ static HRESULT WINAPI FileAsyncReaderPin_AttemptConnection(BaseOutputPin *This, 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;
if (ppropInputRequest->cbAlign && ppropInputRequest->cbAlign != This->allocProps.cbAlign) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 5b09f70758c..2768d013573 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -41,10 +41,12 @@ static const IPinVtbl Parser_InputPin_Vtbl; static HRESULT WINAPI Parser_ChangeStart(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeStop(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_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 ) { @@ -469,7 +471,8 @@ static const IMediaSeekingVtbl Parser_Seeking_Vtbl = 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; ALLOCATOR_PROPERTIES actual; @@ -497,7 +500,8 @@ static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPositio 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; HRESULT hr; diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index e0ea780e11f..748b7131926 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -28,7 +28,7 @@ typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface);
typedef struct Parser_OutputPin { - BaseOutputPin pin; + struct strmbase_source pin;
AM_MEDIA_TYPE * pmt; LONGLONG dwSamplesProcessed; diff --git a/dlls/strmbase/outputqueue.c b/dlls/strmbase/outputqueue.c index e3515c0e317..6cb74f3e26c 100644 --- a/dlls/strmbase/outputqueue.c +++ b/dlls/strmbase/outputqueue.c @@ -48,15 +48,9 @@ static void OutputQueue_FreeSamples(OutputQueue *pOutputQueue) } }
-HRESULT WINAPI OutputQueue_Construct( - BaseOutputPin *pInputPin, - BOOL bAuto, - BOOL bQueue, - LONG lBatchSize, - BOOL bBatchExact, - DWORD dwPriority, - const OutputQueueFuncTable* pFuncsTable, - OutputQueue **ppOutputQueue ) +HRESULT WINAPI OutputQueue_Construct(struct strmbase_source *pInputPin, BOOL bAuto, + BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority, + const OutputQueueFuncTable *pFuncsTable, OutputQueue **ppOutputQueue)
{ BOOL threaded = FALSE; diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 6f1f96c9d53..cbf4db9fd05 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -334,14 +334,14 @@ HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFER
/*** 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) { - 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);
@@ -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 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); dump_AM_MEDIA_TYPE(pmt); @@ -462,7 +462,7 @@ HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface) { HRESULT hr; - BaseOutputPin *This = impl_BaseOutputPin_from_IPin(iface); + struct strmbase_source *This = impl_source_from_IPin(iface);
TRACE("(%p)->()\n", This);
@@ -516,7 +516,8 @@ HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface) 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;
@@ -536,7 +537,7 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa }
/* replaces OutputPin_SendSample */ -HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSample) +HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *This, IMediaSample *pSample) { IMemInputPin * pMemConnected = NULL; PIN_INFO pinInfo; @@ -576,7 +577,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa }
/* replaces OutputPin_CommitAllocator */ -HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) +HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *This) { HRESULT hr;
@@ -596,7 +597,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This) }
/* replaces OutputPin_DecommitAllocator */ -HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This) +HRESULT WINAPI BaseOutputPinImpl_Inactive(struct strmbase_source *This) { HRESULT hr;
@@ -615,12 +616,13 @@ HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This) 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); }
-HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc) +HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *This, + IMemInputPin *pPin, IMemAllocator **pAlloc) { HRESULT hr;
@@ -649,7 +651,8 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputP
/* Function called as a helper to IPin_Connect */ /* 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; IMemAllocator * pMemAlloc = NULL; @@ -704,7 +707,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pR 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) { memset(pin, 0, sizeof(*pin)); @@ -717,7 +720,7 @@ void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmb pin->pFuncsTable = func_table; }
-void strmbase_source_cleanup(BaseOutputPin *pin) +void strmbase_source_cleanup(struct strmbase_source *pin) { FreeMediaType(&pin->pin.mtCurrent); if (pin->pAllocator) diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 83a7ee1129e..fe4260edcaf 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -103,7 +103,8 @@ static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const 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); return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest); diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 22eedfd4267..1b02373e11d 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -72,7 +72,7 @@ typedef struct GSTImpl { } GSTImpl;
struct GSTOutPin { - BaseOutputPin pin; + struct strmbase_source pin; IQualityControl IQualityControl_iface;
GstElement *flipfilter; @@ -1657,7 +1657,8 @@ static HRESULT WINAPI GSTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_M 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); TRACE("(%p)->(%p, %p)\n", This, pAlloc, ppropInputRequest); @@ -1665,7 +1666,8 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(BaseOutputPin *iface, IMemAlloc 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); GSTImpl *filter = impl_from_strmbase_filter(pin->pin.pin.filter); diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 5fe58cd7598..7333e705b76 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -129,7 +129,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qtsplitter); extern CLSID CLSID_QTSplitter;
typedef struct QTOutPin { - BaseOutputPin pin; + struct strmbase_source pin; IQualityControl IQualityControl_iface;
AM_MEDIA_TYPE * pmt; @@ -1262,7 +1262,7 @@ static inline QTOutPin *impl_QTOutPin_from_BasePin( BasePin *iface ) 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); } @@ -1311,13 +1311,15 @@ static HRESULT WINAPI QTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_ME 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 */ 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; QTOutPin *This = impl_QTOutPin_from_BaseOutputPin(iface); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index b2903999155..e5bed6c547b 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -53,7 +53,7 @@ typedef struct BasePinFuncTable { BasePin_GetMediaType pfnGetMediaType; } BasePinFuncTable;
-typedef struct BaseOutputPin +struct strmbase_source { /* inheritance C style! */ BasePin pin; @@ -61,11 +61,11 @@ typedef struct BaseOutputPin IMemAllocator * pAllocator;
const struct BaseOutputPinFuncTable* pFuncsTable; -} BaseOutputPin; +};
-typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(BaseOutputPin *pin, IPin *peer, const AM_MEDIA_TYPE *mt); -typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); -typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); +typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt); +typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(struct strmbase_source *pin, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props); +typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator);
typedef struct BaseOutputPinFuncTable { BasePinFuncTable base; @@ -124,16 +124,17 @@ HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface); HRESULT WINAPI BaseOutputPinImpl_BeginFlush(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_Deliver(BaseOutputPin * This, IMediaSample * pSample); -HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This); -HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This); -HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc); -HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); -HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *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, +HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin, + IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags); +HRESULT WINAPI BaseOutputPinImpl_Deliver(struct strmbase_source *pin, IMediaSample *sample); +HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *pin); +HRESULT WINAPI BaseOutputPinImpl_Inactive(struct strmbase_source *pin); +HRESULT WINAPI BaseOutputPinImpl_InitAllocator(struct strmbase_source *pin, IMemAllocator **allocator); +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(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);
/* Base Input Pin */ @@ -204,7 +205,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu typedef struct TransformFilter { struct strmbase_filter filter; - BaseOutputPin source; + struct strmbase_source source; BaseInputPin sink;
AM_MEDIA_TYPE pmt; @@ -328,7 +329,7 @@ HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFi typedef struct tagOutputQueue { CRITICAL_SECTION csQueue;
- BaseOutputPin * pInputPin; + struct strmbase_source *pInputPin;
HANDLE hThread; HANDLE hProcessQueue; @@ -350,7 +351,7 @@ typedef struct OutputQueueFuncTable OutputQueue_ThreadProc pfnThreadProc; } 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, const OutputQueueFuncTable* pFuncsTable, OutputQueue **ppOutputQueue ); HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue);