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

strmbase: Get rid of the BaseFilter typedef.

parent cfe3b05c
...@@ -35,20 +35,20 @@ ...@@ -35,20 +35,20 @@
WINE_DEFAULT_DEBUG_CHANNEL(qcap); WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { typedef struct {
BaseFilter filter; struct strmbase_filter filter;
IPersistPropertyBag IPersistPropertyBag_iface; IPersistPropertyBag IPersistPropertyBag_iface;
BaseOutputPin *output; BaseOutputPin *output;
} AudioRecord; } AudioRecord;
static inline AudioRecord *impl_from_BaseFilter(BaseFilter *filter) static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *filter)
{ {
return CONTAINING_RECORD(filter, AudioRecord, filter); return CONTAINING_RECORD(filter, AudioRecord, filter);
} }
static inline AudioRecord *impl_from_IBaseFilter(IBaseFilter *iface) static inline AudioRecord *impl_from_IBaseFilter(IBaseFilter *iface)
{ {
BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface);
return impl_from_BaseFilter(filter); return impl_from_strmbase_filter(filter);
} }
static inline AudioRecord *impl_from_IPersistPropertyBag(IPersistPropertyBag *iface) static inline AudioRecord *impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
...@@ -95,23 +95,23 @@ static const IBaseFilterVtbl AudioRecordVtbl = { ...@@ -95,23 +95,23 @@ static const IBaseFilterVtbl AudioRecordVtbl = {
BaseFilterImpl_QueryVendorInfo BaseFilterImpl_QueryVendorInfo
}; };
static IPin *audio_record_get_pin(BaseFilter *iface, unsigned int index) static IPin *audio_record_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
FIXME("iface %p, index %u, stub!\n", iface, index); FIXME("iface %p, index %u, stub!\n", iface, index);
return NULL; return NULL;
} }
static void audio_record_destroy(BaseFilter *iface) static void audio_record_destroy(struct strmbase_filter *iface)
{ {
AudioRecord *filter = impl_from_BaseFilter(iface); AudioRecord *filter = impl_from_strmbase_filter(iface);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
CoTaskMemFree(filter); CoTaskMemFree(filter);
} }
static HRESULT audio_record_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT audio_record_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
AudioRecord *filter = impl_from_BaseFilter(iface); AudioRecord *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) if (IsEqualGUID(iid, &IID_IPersistPropertyBag))
*out = &filter->IPersistPropertyBag_iface; *out = &filter->IPersistPropertyBag_iface;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(qcap); WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { typedef struct {
BaseFilter filter; struct strmbase_filter filter;
IPersistPropertyBag IPersistPropertyBag_iface; IPersistPropertyBag IPersistPropertyBag_iface;
BaseInputPin sink; BaseInputPin sink;
...@@ -51,15 +51,15 @@ typedef struct { ...@@ -51,15 +51,15 @@ typedef struct {
DWORD frame_cnt; DWORD frame_cnt;
} AVICompressor; } AVICompressor;
static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter) static inline AVICompressor *impl_from_strmbase_filter(struct strmbase_filter *filter)
{ {
return CONTAINING_RECORD(filter, AVICompressor, filter); return CONTAINING_RECORD(filter, AVICompressor, filter);
} }
static inline AVICompressor *impl_from_IBaseFilter(IBaseFilter *iface) static inline AVICompressor *impl_from_IBaseFilter(IBaseFilter *iface)
{ {
BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface);
return impl_from_BaseFilter(filter); return impl_from_strmbase_filter(filter);
} }
static inline AVICompressor *impl_from_BasePin(BasePin *pin) static inline AVICompressor *impl_from_BasePin(BasePin *pin)
...@@ -178,9 +178,9 @@ static const IBaseFilterVtbl AVICompressorVtbl = { ...@@ -178,9 +178,9 @@ static const IBaseFilterVtbl AVICompressorVtbl = {
BaseFilterImpl_QueryVendorInfo, BaseFilterImpl_QueryVendorInfo,
}; };
static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index) static IPin *avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
AVICompressor *filter = impl_from_BaseFilter(iface); AVICompressor *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
return &filter->sink.pin.IPin_iface; return &filter->sink.pin.IPin_iface;
...@@ -189,9 +189,9 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index) ...@@ -189,9 +189,9 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index)
return NULL; return NULL;
} }
static void avi_compressor_destroy(BaseFilter *iface) static void avi_compressor_destroy(struct strmbase_filter *iface)
{ {
AVICompressor *filter = impl_from_BaseFilter(iface); AVICompressor *filter = impl_from_strmbase_filter(iface);
if (filter->hic) if (filter->hic)
ICClose(filter->hic); ICClose(filter->hic);
...@@ -202,9 +202,9 @@ static void avi_compressor_destroy(BaseFilter *iface) ...@@ -202,9 +202,9 @@ static void avi_compressor_destroy(BaseFilter *iface)
heap_free(filter); heap_free(filter);
} }
static HRESULT avi_compressor_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT avi_compressor_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
AVICompressor *filter = impl_from_BaseFilter(iface); AVICompressor *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) if (IsEqualGUID(iid, &IID_IPersistPropertyBag))
*out = &filter->IPersistPropertyBag_iface; *out = &filter->IPersistPropertyBag_iface;
......
...@@ -70,7 +70,7 @@ typedef struct { ...@@ -70,7 +70,7 @@ typedef struct {
} AviMuxIn; } AviMuxIn;
typedef struct { typedef struct {
BaseFilter filter; struct strmbase_filter filter;
IConfigAviMux IConfigAviMux_iface; IConfigAviMux IConfigAviMux_iface;
IConfigInterleaving IConfigInterleaving_iface; IConfigInterleaving IConfigInterleaving_iface;
IMediaSeeking IMediaSeeking_iface; IMediaSeeking IMediaSeeking_iface;
...@@ -108,14 +108,14 @@ typedef struct { ...@@ -108,14 +108,14 @@ typedef struct {
static HRESULT create_input_pin(AviMux*); static HRESULT create_input_pin(AviMux*);
static inline AviMux* impl_from_BaseFilter(BaseFilter *filter) static inline AviMux* impl_from_strmbase_filter(struct strmbase_filter *filter)
{ {
return CONTAINING_RECORD(filter, AviMux, filter); return CONTAINING_RECORD(filter, AviMux, filter);
} }
static IPin *avi_mux_get_pin(BaseFilter *iface, unsigned int index) static IPin *avi_mux_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
AviMux *filter = impl_from_BaseFilter(iface); AviMux *filter = impl_from_strmbase_filter(iface);
if (!index) if (!index)
return &filter->source.pin.IPin_iface; return &filter->source.pin.IPin_iface;
...@@ -124,9 +124,9 @@ static IPin *avi_mux_get_pin(BaseFilter *iface, unsigned int index) ...@@ -124,9 +124,9 @@ static IPin *avi_mux_get_pin(BaseFilter *iface, unsigned int index)
return NULL; return NULL;
} }
static void avi_mux_destroy(BaseFilter *iface) static void avi_mux_destroy(struct strmbase_filter *iface)
{ {
AviMux *filter = impl_from_BaseFilter(iface); AviMux *filter = impl_from_strmbase_filter(iface);
int i; int i;
strmbase_source_cleanup(&filter->source); strmbase_source_cleanup(&filter->source);
...@@ -146,9 +146,9 @@ static void avi_mux_destroy(BaseFilter *iface) ...@@ -146,9 +146,9 @@ static void avi_mux_destroy(BaseFilter *iface)
ObjectRefCount(FALSE); ObjectRefCount(FALSE);
} }
static HRESULT avi_mux_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT avi_mux_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
AviMux *filter = impl_from_BaseFilter(iface); AviMux *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IConfigAviMux)) if (IsEqualGUID(iid, &IID_IConfigAviMux))
*out = &filter->IConfigAviMux_iface; *out = &filter->IConfigAviMux_iface;
...@@ -176,8 +176,8 @@ static const struct strmbase_filter_ops filter_ops = ...@@ -176,8 +176,8 @@ static const struct strmbase_filter_ops filter_ops =
static inline AviMux* impl_from_IBaseFilter(IBaseFilter *iface) static inline AviMux* impl_from_IBaseFilter(IBaseFilter *iface)
{ {
BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface);
return impl_from_BaseFilter(filter); return impl_from_strmbase_filter(filter);
} }
static HRESULT out_flush(AviMux *This) static HRESULT out_flush(AviMux *This)
......
...@@ -36,20 +36,20 @@ ...@@ -36,20 +36,20 @@
WINE_DEFAULT_DEBUG_CHANNEL(qcap); WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { typedef struct {
BaseFilter filter; struct strmbase_filter filter;
BaseInputPin sink; BaseInputPin sink;
BaseOutputPin capture, preview; BaseOutputPin capture, preview;
} SmartTeeFilter; } SmartTeeFilter;
static inline SmartTeeFilter *impl_from_BaseFilter(BaseFilter *filter) static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *filter)
{ {
return CONTAINING_RECORD(filter, SmartTeeFilter, filter); return CONTAINING_RECORD(filter, SmartTeeFilter, filter);
} }
static inline SmartTeeFilter *impl_from_IBaseFilter(IBaseFilter *iface) static inline SmartTeeFilter *impl_from_IBaseFilter(IBaseFilter *iface)
{ {
BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface);
return impl_from_BaseFilter(filter); return impl_from_strmbase_filter(filter);
} }
static inline SmartTeeFilter *impl_from_BasePin(BasePin *pin) static inline SmartTeeFilter *impl_from_BasePin(BasePin *pin)
...@@ -117,9 +117,9 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = { ...@@ -117,9 +117,9 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = {
BaseFilterImpl_QueryVendorInfo BaseFilterImpl_QueryVendorInfo
}; };
static IPin *smart_tee_get_pin(BaseFilter *iface, unsigned int index) static IPin *smart_tee_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
SmartTeeFilter *filter = impl_from_BaseFilter(iface); SmartTeeFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
return &filter->sink.pin.IPin_iface; return &filter->sink.pin.IPin_iface;
...@@ -130,9 +130,9 @@ static IPin *smart_tee_get_pin(BaseFilter *iface, unsigned int index) ...@@ -130,9 +130,9 @@ static IPin *smart_tee_get_pin(BaseFilter *iface, unsigned int index)
return NULL; return NULL;
} }
static void smart_tee_destroy(BaseFilter *iface) static void smart_tee_destroy(struct strmbase_filter *iface)
{ {
SmartTeeFilter *filter = impl_from_BaseFilter(iface); SmartTeeFilter *filter = impl_from_strmbase_filter(iface);
strmbase_sink_cleanup(&filter->sink); strmbase_sink_cleanup(&filter->sink);
strmbase_source_cleanup(&filter->capture); strmbase_source_cleanup(&filter->capture);
......
...@@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap); ...@@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct VfwCapture typedef struct VfwCapture
{ {
BaseFilter filter; struct strmbase_filter filter;
IAMStreamConfig IAMStreamConfig_iface; IAMStreamConfig IAMStreamConfig_iface;
IAMVideoProcAmp IAMVideoProcAmp_iface; IAMVideoProcAmp IAMVideoProcAmp_iface;
IPersistPropertyBag IPersistPropertyBag_iface; IPersistPropertyBag IPersistPropertyBag_iface;
...@@ -57,7 +57,7 @@ typedef struct VfwCapture ...@@ -57,7 +57,7 @@ typedef struct VfwCapture
IKsPropertySet IKsPropertySet_iface; IKsPropertySet IKsPropertySet_iface;
} VfwCapture; } VfwCapture;
static inline VfwCapture *impl_from_BaseFilter(BaseFilter *iface) static inline VfwCapture *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, VfwCapture, filter); return CONTAINING_RECORD(iface, VfwCapture, filter);
} }
...@@ -87,9 +87,9 @@ static inline VfwCapture *impl_from_IPin(IPin *iface) ...@@ -87,9 +87,9 @@ static inline VfwCapture *impl_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, VfwCapture, source.pin.IPin_iface); return CONTAINING_RECORD(iface, VfwCapture, source.pin.IPin_iface);
} }
static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) static IPin *vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
VfwCapture *This = impl_from_BaseFilter(iface); VfwCapture *This = impl_from_strmbase_filter(iface);
if (index >= 1) if (index >= 1)
return NULL; return NULL;
...@@ -97,9 +97,9 @@ static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) ...@@ -97,9 +97,9 @@ static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index)
return &This->source.pin.IPin_iface; return &This->source.pin.IPin_iface;
} }
static void vfw_capture_destroy(BaseFilter *iface) static void vfw_capture_destroy(struct strmbase_filter *iface)
{ {
VfwCapture *filter = impl_from_BaseFilter(iface); VfwCapture *filter = impl_from_strmbase_filter(iface);
if (filter->init) if (filter->init)
{ {
...@@ -119,9 +119,9 @@ static void vfw_capture_destroy(BaseFilter *iface) ...@@ -119,9 +119,9 @@ static void vfw_capture_destroy(BaseFilter *iface)
ObjectRefCount(FALSE); ObjectRefCount(FALSE);
} }
static HRESULT vfw_capture_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT vfw_capture_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
VfwCapture *filter = impl_from_BaseFilter(iface); VfwCapture *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) if (IsEqualGUID(iid, &IID_IPersistPropertyBag))
*out = &filter->IPersistPropertyBag_iface; *out = &filter->IPersistPropertyBag_iface;
......
...@@ -211,7 +211,7 @@ static inline SG_Pin *impl_from_IPin(IPin *iface) ...@@ -211,7 +211,7 @@ static inline SG_Pin *impl_from_IPin(IPin *iface)
/* Sample Grabber filter implementation */ /* Sample Grabber filter implementation */
typedef struct _SG_Impl { typedef struct _SG_Impl {
BaseFilter filter; struct strmbase_filter filter;
ISampleGrabber ISampleGrabber_iface; ISampleGrabber ISampleGrabber_iface;
/* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */ /* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */
IUnknown* seekthru_unk; IUnknown* seekthru_unk;
...@@ -234,7 +234,7 @@ enum { ...@@ -234,7 +234,7 @@ enum {
OneShot_Past, OneShot_Past,
}; };
static inline SG_Impl *impl_from_BaseFilter(BaseFilter *iface) static inline SG_Impl *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, SG_Impl, filter); return CONTAINING_RECORD(iface, SG_Impl, filter);
} }
...@@ -273,9 +273,9 @@ static void SampleGrabber_cleanup(SG_Impl *This) ...@@ -273,9 +273,9 @@ static void SampleGrabber_cleanup(SG_Impl *This)
IUnknown_Release(This->seekthru_unk); IUnknown_Release(This->seekthru_unk);
} }
static IPin *sample_grabber_get_pin(BaseFilter *iface, unsigned int index) static IPin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
SG_Impl *filter = impl_from_BaseFilter(iface); SG_Impl *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
return &filter->pin_in.IPin_iface; return &filter->pin_in.IPin_iface;
...@@ -284,18 +284,18 @@ static IPin *sample_grabber_get_pin(BaseFilter *iface, unsigned int index) ...@@ -284,18 +284,18 @@ static IPin *sample_grabber_get_pin(BaseFilter *iface, unsigned int index)
return NULL; return NULL;
} }
static void sample_grabber_destroy(BaseFilter *iface) static void sample_grabber_destroy(struct strmbase_filter *iface)
{ {
SG_Impl *filter = impl_from_BaseFilter(iface); SG_Impl *filter = impl_from_strmbase_filter(iface);
SampleGrabber_cleanup(filter); SampleGrabber_cleanup(filter);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
CoTaskMemFree(filter); CoTaskMemFree(filter);
} }
static HRESULT sample_grabber_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT sample_grabber_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
SG_Impl *filter = impl_from_BaseFilter(iface); SG_Impl *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_ISampleGrabber)) if (IsEqualGUID(iid, &IID_ISampleGrabber))
*out = &filter->ISampleGrabber_iface; *out = &filter->ISampleGrabber_iface;
......
...@@ -1404,7 +1404,7 @@ static const IBaseFilterVtbl AVISplitterImpl_Vtbl = ...@@ -1404,7 +1404,7 @@ static const IBaseFilterVtbl AVISplitterImpl_Vtbl =
BaseFilterImpl_QueryVendorInfo, BaseFilterImpl_QueryVendorInfo,
}; };
static void avi_splitter_destroy(BaseFilter *iface) static void avi_splitter_destroy(struct strmbase_filter *iface)
{ {
AVISplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); AVISplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
AVISplitter_Flush(filter); AVISplitter_Flush(filter);
......
...@@ -58,7 +58,7 @@ typedef struct DATAREQUEST ...@@ -58,7 +58,7 @@ typedef struct DATAREQUEST
typedef struct AsyncReader typedef struct AsyncReader
{ {
BaseFilter filter; struct strmbase_filter filter;
IFileSourceFilter IFileSourceFilter_iface; IFileSourceFilter IFileSourceFilter_iface;
BaseOutputPin source; BaseOutputPin source;
...@@ -81,7 +81,7 @@ typedef struct AsyncReader ...@@ -81,7 +81,7 @@ typedef struct AsyncReader
static const IPinVtbl FileAsyncReaderPin_Vtbl; static const IPinVtbl FileAsyncReaderPin_Vtbl;
static const BaseOutputPinFuncTable output_BaseOutputFuncTable; static const BaseOutputPinFuncTable output_BaseOutputFuncTable;
static inline AsyncReader *impl_from_BaseFilter(BaseFilter *iface) static inline AsyncReader *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, AsyncReader, filter); return CONTAINING_RECORD(iface, AsyncReader, filter);
} }
...@@ -338,18 +338,18 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID ...@@ -338,18 +338,18 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID
return FALSE; return FALSE;
} }
static IPin *async_reader_get_pin(BaseFilter *iface, unsigned int index) static IPin *async_reader_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
AsyncReader *filter = impl_from_BaseFilter(iface); AsyncReader *filter = impl_from_strmbase_filter(iface);
if (!index && filter->pszFileName) if (!index && filter->pszFileName)
return &filter->source.pin.IPin_iface; return &filter->source.pin.IPin_iface;
return NULL; return NULL;
} }
static void async_reader_destroy(BaseFilter *iface) static void async_reader_destroy(struct strmbase_filter *iface)
{ {
AsyncReader *filter = impl_from_BaseFilter(iface); AsyncReader *filter = impl_from_strmbase_filter(iface);
if (filter->pszFileName) if (filter->pszFileName)
{ {
...@@ -379,9 +379,9 @@ static void async_reader_destroy(BaseFilter *iface) ...@@ -379,9 +379,9 @@ static void async_reader_destroy(BaseFilter *iface)
CoTaskMemFree(filter); CoTaskMemFree(filter);
} }
static HRESULT async_reader_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
AsyncReader *filter = impl_from_BaseFilter(iface); AsyncReader *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IFileSourceFilter)) if (IsEqualGUID(iid, &IID_IFileSourceFilter))
{ {
......
...@@ -836,13 +836,13 @@ static const IAMStreamSelectVtbl AMStreamSelectVtbl = ...@@ -836,13 +836,13 @@ static const IAMStreamSelectVtbl AMStreamSelectVtbl =
AMStreamSelect_Enable AMStreamSelect_Enable
}; };
static void mpeg_splitter_destroy(BaseFilter *iface) static void mpeg_splitter_destroy(struct strmbase_filter *iface)
{ {
MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
Parser_Destroy(&filter->Parser); Parser_Destroy(&filter->Parser);
} }
static HRESULT mpeg_splitter_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT mpeg_splitter_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
......
...@@ -56,14 +56,14 @@ static inline ParserImpl *impl_from_IBaseFilter( IBaseFilter *iface ) ...@@ -56,14 +56,14 @@ static inline ParserImpl *impl_from_IBaseFilter( IBaseFilter *iface )
return CONTAINING_RECORD(iface, ParserImpl, filter.IBaseFilter_iface); return CONTAINING_RECORD(iface, ParserImpl, filter.IBaseFilter_iface);
} }
static inline ParserImpl *impl_from_BaseFilter( BaseFilter *iface ) static inline ParserImpl *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, ParserImpl, filter); return CONTAINING_RECORD(iface, ParserImpl, filter);
} }
IPin *parser_get_pin(BaseFilter *iface, unsigned int index) IPin *parser_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
ParserImpl *filter = impl_from_BaseFilter(iface); ParserImpl *filter = impl_from_strmbase_filter(iface);
if (!index) if (!index)
return &filter->pInputPin->pin.IPin_iface; return &filter->pInputPin->pin.IPin_iface;
......
...@@ -40,7 +40,7 @@ typedef struct Parser_OutputPin ...@@ -40,7 +40,7 @@ typedef struct Parser_OutputPin
struct ParserImpl struct ParserImpl
{ {
BaseFilter filter; struct strmbase_filter filter;
PFN_DISCONNECT fnDisconnect; PFN_DISCONNECT fnDisconnect;
...@@ -67,7 +67,7 @@ extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart); ...@@ -67,7 +67,7 @@ extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState); extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
extern HRESULT WINAPI Parser_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock); extern HRESULT WINAPI Parser_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);
IPin *parser_get_pin(BaseFilter *iface, unsigned int index) DECLSPEC_HIDDEN; IPin *parser_get_pin(struct strmbase_filter *iface, unsigned int index) DECLSPEC_HIDDEN;
/* COM helpers */ /* COM helpers */
static inline Parser_OutputPin *unsafe_impl_Parser_OutputPin_from_IPin( IPin *iface ) static inline Parser_OutputPin *unsafe_impl_Parser_OutputPin_from_IPin( IPin *iface )
......
...@@ -408,7 +408,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl = ...@@ -408,7 +408,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl =
BaseFilterImpl_QueryVendorInfo, BaseFilterImpl_QueryVendorInfo,
}; };
static void wave_parser_destroy(BaseFilter *iface) static void wave_parser_destroy(struct strmbase_filter *iface)
{ {
WAVEParserImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); WAVEParserImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
Parser_Destroy(&filter->Parser); Parser_Destroy(&filter->Parser);
......
...@@ -28,7 +28,7 @@ typedef struct IEnumPinsImpl ...@@ -28,7 +28,7 @@ typedef struct IEnumPinsImpl
IEnumPins IEnumPins_iface; IEnumPins IEnumPins_iface;
LONG refCount; LONG refCount;
unsigned int uIndex, count; unsigned int uIndex, count;
BaseFilter *base; struct strmbase_filter *base;
DWORD Version; DWORD Version;
} IEnumPinsImpl; } IEnumPinsImpl;
...@@ -39,7 +39,7 @@ static inline IEnumPinsImpl *impl_from_IEnumPins(IEnumPins *iface) ...@@ -39,7 +39,7 @@ static inline IEnumPinsImpl *impl_from_IEnumPins(IEnumPins *iface)
static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl; static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl;
HRESULT enum_pins_create(BaseFilter *base, IEnumPins **out) HRESULT enum_pins_create(struct strmbase_filter *base, IEnumPins **out)
{ {
IEnumPinsImpl *object; IEnumPinsImpl *object;
IPin *pin; IPin *pin;
......
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(strmbase); WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
static inline BaseFilter *impl_from_IUnknown(IUnknown *iface) static inline struct strmbase_filter *impl_from_IUnknown(IUnknown *iface)
{ {
return CONTAINING_RECORD(iface, BaseFilter, IUnknown_inner); return CONTAINING_RECORD(iface, struct strmbase_filter, IUnknown_inner);
} }
static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out) static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out)
{ {
BaseFilter *filter = impl_from_IUnknown(iface); struct strmbase_filter *filter = impl_from_IUnknown(iface);
HRESULT hr; HRESULT hr;
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
...@@ -62,7 +62,7 @@ static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, v ...@@ -62,7 +62,7 @@ static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, v
static ULONG WINAPI filter_inner_AddRef(IUnknown *iface) static ULONG WINAPI filter_inner_AddRef(IUnknown *iface)
{ {
BaseFilter *filter = impl_from_IUnknown(iface); struct strmbase_filter *filter = impl_from_IUnknown(iface);
ULONG refcount = InterlockedIncrement(&filter->refcount); ULONG refcount = InterlockedIncrement(&filter->refcount);
TRACE("%p increasing refcount to %u.\n", filter, refcount); TRACE("%p increasing refcount to %u.\n", filter, refcount);
...@@ -72,7 +72,7 @@ static ULONG WINAPI filter_inner_AddRef(IUnknown *iface) ...@@ -72,7 +72,7 @@ static ULONG WINAPI filter_inner_AddRef(IUnknown *iface)
static ULONG WINAPI filter_inner_Release(IUnknown *iface) static ULONG WINAPI filter_inner_Release(IUnknown *iface)
{ {
BaseFilter *filter = impl_from_IUnknown(iface); struct strmbase_filter *filter = impl_from_IUnknown(iface);
ULONG refcount = InterlockedDecrement(&filter->refcount); ULONG refcount = InterlockedDecrement(&filter->refcount);
TRACE("%p decreasing refcount to %u.\n", filter, refcount); TRACE("%p decreasing refcount to %u.\n", filter, refcount);
...@@ -90,32 +90,32 @@ static const IUnknownVtbl filter_inner_vtbl = ...@@ -90,32 +90,32 @@ static const IUnknownVtbl filter_inner_vtbl =
filter_inner_Release, filter_inner_Release,
}; };
static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface) static inline struct strmbase_filter *impl_from_IBaseFilter(IBaseFilter *iface)
{ {
return CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); return CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface);
} }
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID iid, void **out) HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID iid, void **out)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
return IUnknown_QueryInterface(filter->outer_unk, iid, out); return IUnknown_QueryInterface(filter->outer_unk, iid, out);
} }
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface) ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
return IUnknown_AddRef(filter->outer_unk); return IUnknown_AddRef(filter->outer_unk);
} }
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface) ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
return IUnknown_Release(filter->outer_unk); return IUnknown_Release(filter->outer_unk);
} }
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid) HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid)
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p)\n", This, pClsid); TRACE("(%p)->(%p)\n", This, pClsid);
*pClsid = This->clsid; *pClsid = This->clsid;
...@@ -125,7 +125,7 @@ HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid) ...@@ -125,7 +125,7 @@ HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid)
HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface) HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
...@@ -138,7 +138,7 @@ HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface) ...@@ -138,7 +138,7 @@ HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface) HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface); TRACE("iface %p.\n", iface);
...@@ -151,7 +151,7 @@ HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface) ...@@ -151,7 +151,7 @@ HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start) HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p, start %s.\n", iface, wine_dbgstr_longlong(start)); TRACE("iface %p, start %s.\n", iface, wine_dbgstr_longlong(start));
...@@ -164,7 +164,7 @@ HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start) ...@@ -164,7 +164,7 @@ HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start)
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState ) HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState )
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState); TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
EnterCriticalSection(&This->csFilter); EnterCriticalSection(&This->csFilter);
...@@ -178,7 +178,7 @@ HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTim ...@@ -178,7 +178,7 @@ HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTim
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock)
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p)\n", This, pClock); TRACE("(%p)->(%p)\n", This, pClock);
EnterCriticalSection(&This->csFilter); EnterCriticalSection(&This->csFilter);
...@@ -196,7 +196,7 @@ HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock ...@@ -196,7 +196,7 @@ HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock) HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock)
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p)\n", This, ppClock); TRACE("(%p)->(%p)\n", This, ppClock);
EnterCriticalSection(&This->csFilter); EnterCriticalSection(&This->csFilter);
...@@ -212,7 +212,7 @@ HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock ...@@ -212,7 +212,7 @@ HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins) HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins)
{ {
BaseFilter *filter = impl_from_IBaseFilter(iface); struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p, enum_pins %p.\n", iface, enum_pins); TRACE("iface %p, enum_pins %p.\n", iface, enum_pins);
...@@ -221,7 +221,7 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins ...@@ -221,7 +221,7 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins
HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret) HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret)
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
unsigned int i; unsigned int i;
PIN_INFO info; PIN_INFO info;
HRESULT hr; HRESULT hr;
...@@ -249,7 +249,7 @@ HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin ...@@ -249,7 +249,7 @@ HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo) HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo)
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p)\n", This, pInfo); TRACE("(%p)->(%p)\n", This, pInfo);
lstrcpyW(pInfo->achName, This->filterInfo.achName); lstrcpyW(pInfo->achName, This->filterInfo.achName);
...@@ -263,7 +263,7 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO * ...@@ -263,7 +263,7 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName ) HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName )
{ {
BaseFilter *This = impl_from_IBaseFilter(iface); struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName)); TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName));
...@@ -286,12 +286,12 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend ...@@ -286,12 +286,12 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend
return E_NOTIMPL; return E_NOTIMPL;
} }
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter *filter) VOID WINAPI BaseFilterImpl_IncrementPinVersion(struct strmbase_filter *filter)
{ {
InterlockedIncrement(&filter->pin_version); InterlockedIncrement(&filter->pin_version);
} }
void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, void strmbase_filter_init(struct strmbase_filter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer,
const CLSID *clsid, const struct strmbase_filter_ops *func_table) const CLSID *clsid, const struct strmbase_filter_ops *func_table)
{ {
memset(filter, 0, sizeof(*filter)); memset(filter, 0, sizeof(*filter));
...@@ -302,13 +302,13 @@ void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnkn ...@@ -302,13 +302,13 @@ void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnkn
filter->refcount = 1; filter->refcount = 1;
InitializeCriticalSection(&filter->csFilter); InitializeCriticalSection(&filter->csFilter);
filter->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BaseFilter.csFilter"); filter->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.csFilter");
filter->clsid = *clsid; filter->clsid = *clsid;
filter->pin_version = 1; filter->pin_version = 1;
filter->pFuncsTable = func_table; filter->pFuncsTable = func_table;
} }
void strmbase_filter_cleanup(BaseFilter *This) void strmbase_filter_cleanup(struct strmbase_filter *This)
{ {
if (This->pClock) if (This->pClock)
IReferenceClock_Release(This->pClock); IReferenceClock_Release(This->pClock);
......
...@@ -27,7 +27,7 @@ static inline BaseRenderer *impl_from_IBaseFilter(IBaseFilter *iface) ...@@ -27,7 +27,7 @@ static inline BaseRenderer *impl_from_IBaseFilter(IBaseFilter *iface)
return CONTAINING_RECORD(iface, BaseRenderer, filter.IBaseFilter_iface); return CONTAINING_RECORD(iface, BaseRenderer, filter.IBaseFilter_iface);
} }
static inline BaseRenderer *impl_from_BaseFilter(BaseFilter *iface) static inline BaseRenderer *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, BaseRenderer, filter); return CONTAINING_RECORD(iface, BaseRenderer, filter);
} }
...@@ -167,24 +167,24 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl = ...@@ -167,24 +167,24 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
BaseInputPinImpl_NewSegment BaseInputPinImpl_NewSegment
}; };
static IPin *renderer_get_pin(BaseFilter *iface, unsigned int index) static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
BaseRenderer *filter = impl_from_BaseFilter(iface); BaseRenderer *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
return &filter->sink.pin.IPin_iface; return &filter->sink.pin.IPin_iface;
return NULL; return NULL;
} }
static void renderer_destroy(BaseFilter *iface) static void renderer_destroy(struct strmbase_filter *iface)
{ {
BaseRenderer *filter = impl_from_BaseFilter(iface); BaseRenderer *filter = impl_from_strmbase_filter(iface);
filter->pFuncsTable->renderer_destroy(filter); filter->pFuncsTable->renderer_destroy(filter);
} }
static HRESULT renderer_query_interface(BaseFilter *iface, REFIID iid, void **out) static HRESULT renderer_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{ {
BaseRenderer *filter = impl_from_BaseFilter(iface); BaseRenderer *filter = impl_from_strmbase_filter(iface);
HRESULT hr; HRESULT hr;
if (filter->pFuncsTable->renderer_query_interface if (filter->pFuncsTable->renderer_query_interface
......
...@@ -62,7 +62,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv); ...@@ -62,7 +62,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv);
void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME start, REFERENCE_TIME stop); void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME start, REFERENCE_TIME stop);
void QualityControlRender_EndRender(QualityControlImpl *This); void QualityControlRender_EndRender(QualityControlImpl *This);
HRESULT enum_pins_create(BaseFilter *base, IEnumPins **enum_pins); HRESULT enum_pins_create(struct strmbase_filter *filter, IEnumPins **enum_pins);
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start); HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start);
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface); HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
......
...@@ -35,7 +35,7 @@ static inline TransformFilter *impl_from_IBaseFilter( IBaseFilter *iface ) ...@@ -35,7 +35,7 @@ static inline TransformFilter *impl_from_IBaseFilter( IBaseFilter *iface )
return CONTAINING_RECORD(iface, TransformFilter, filter.IBaseFilter_iface); return CONTAINING_RECORD(iface, TransformFilter, filter.IBaseFilter_iface);
} }
static inline TransformFilter *impl_from_BaseFilter( BaseFilter *iface ) static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, TransformFilter, filter); return CONTAINING_RECORD(iface, TransformFilter, filter);
} }
...@@ -121,9 +121,9 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo ...@@ -121,9 +121,9 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo
return S_OK; return S_OK;
} }
static IPin *transform_get_pin(BaseFilter *iface, unsigned int index) static IPin *transform_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
TransformFilter *filter = impl_from_BaseFilter(iface); TransformFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) if (index == 0)
return &filter->sink.pin.IPin_iface; return &filter->sink.pin.IPin_iface;
...@@ -132,9 +132,9 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index) ...@@ -132,9 +132,9 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index)
return NULL; return NULL;
} }
static void transform_destroy(BaseFilter *iface) static void transform_destroy(struct strmbase_filter *iface)
{ {
TransformFilter *filter = impl_from_BaseFilter(iface); TransformFilter *filter = impl_from_strmbase_filter(iface);
if (filter->sink.pin.pConnectedTo) if (filter->sink.pin.pConnectedTo)
IPin_Disconnect(filter->sink.pin.pConnectedTo); IPin_Disconnect(filter->sink.pin.pConnectedTo);
......
...@@ -647,7 +647,7 @@ static const IBasicVideoVtbl basic_video_vtbl = ...@@ -647,7 +647,7 @@ static const IBasicVideoVtbl basic_video_vtbl =
basic_video_IsUsingDefaultDestination basic_video_IsUsingDefaultDestination
}; };
HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, BaseFilter *filter, HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table) CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table)
{ {
video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl; video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl;
......
...@@ -193,7 +193,9 @@ BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg ...@@ -193,7 +193,9 @@ BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg
return FALSE; return FALSE;
} }
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin,const BaseWindowFuncTable *pFuncsTable) HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
CRITICAL_SECTION *lock, BasePin* pPin,const BaseWindowFuncTable *pFuncsTable)
{ {
HRESULT hr; HRESULT hr;
......
...@@ -55,7 +55,7 @@ typedef struct GSTInPin { ...@@ -55,7 +55,7 @@ typedef struct GSTInPin {
} GSTInPin; } GSTInPin;
typedef struct GSTImpl { typedef struct GSTImpl {
BaseFilter filter; struct strmbase_filter filter;
GSTInPin pInputPin; GSTInPin pInputPin;
GSTOutPin **ppPins; GSTOutPin **ppPins;
...@@ -1196,7 +1196,7 @@ static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface ) ...@@ -1196,7 +1196,7 @@ static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface )
return CONTAINING_RECORD(iface, GSTOutPin, seek.IMediaSeeking_iface); return CONTAINING_RECORD(iface, GSTOutPin, seek.IMediaSeeking_iface);
} }
static IPin *gstdemux_get_pin(BaseFilter *base, unsigned int index) static IPin *gstdemux_get_pin(struct strmbase_filter *base, unsigned int index)
{ {
GSTImpl *filter = impl_from_IBaseFilter(&base->IBaseFilter_iface); GSTImpl *filter = impl_from_IBaseFilter(&base->IBaseFilter_iface);
...@@ -1207,7 +1207,7 @@ static IPin *gstdemux_get_pin(BaseFilter *base, unsigned int index) ...@@ -1207,7 +1207,7 @@ static IPin *gstdemux_get_pin(BaseFilter *base, unsigned int index)
return NULL; return NULL;
} }
static void gstdemux_destroy(BaseFilter *iface) static void gstdemux_destroy(struct strmbase_filter *iface)
{ {
GSTImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); GSTImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
IPin *connected = NULL; IPin *connected = NULL;
......
...@@ -144,7 +144,7 @@ typedef struct QTInPin { ...@@ -144,7 +144,7 @@ typedef struct QTInPin {
} QTInPin; } QTInPin;
typedef struct QTSplitter { typedef struct QTSplitter {
BaseFilter filter; struct strmbase_filter filter;
QTInPin pInputPin; QTInPin pInputPin;
QTOutPin *pVideo_Pin; QTOutPin *pVideo_Pin;
...@@ -188,7 +188,7 @@ static inline QTSplitter *impl_from_IMediaSeeking( IMediaSeeking *iface ) ...@@ -188,7 +188,7 @@ static inline QTSplitter *impl_from_IMediaSeeking( IMediaSeeking *iface )
return CONTAINING_RECORD(iface, QTSplitter, sourceSeeking.IMediaSeeking_iface); return CONTAINING_RECORD(iface, QTSplitter, sourceSeeking.IMediaSeeking_iface);
} }
static inline QTSplitter *impl_from_BaseFilter( BaseFilter *iface ) static inline QTSplitter *impl_from_strmbase_filter(struct strmbase_filter *iface)
{ {
return CONTAINING_RECORD(iface, QTSplitter, filter); return CONTAINING_RECORD(iface, QTSplitter, filter);
} }
...@@ -202,9 +202,9 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface ) ...@@ -202,9 +202,9 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface )
* Base Filter * Base Filter
*/ */
static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index) static IPin *qt_splitter_get_pin(struct strmbase_filter *base, unsigned int index)
{ {
QTSplitter *filter = impl_from_BaseFilter(base); QTSplitter *filter = impl_from_strmbase_filter(base);
if (index == 0) if (index == 0)
return &filter->pInputPin.pin.IPin_iface; return &filter->pInputPin.pin.IPin_iface;
...@@ -221,9 +221,9 @@ static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index) ...@@ -221,9 +221,9 @@ static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index)
return NULL; return NULL;
} }
static void qt_splitter_destroy(BaseFilter *iface) static void qt_splitter_destroy(struct strmbase_filter *iface)
{ {
QTSplitter *filter = impl_from_BaseFilter(iface); QTSplitter *filter = impl_from_strmbase_filter(iface);
IPin *peer = NULL; IPin *peer = NULL;
EnterCriticalSection(&filter->csReceive); EnterCriticalSection(&filter->csReceive);
......
...@@ -156,7 +156,7 @@ void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl, const PIN_INFO ...@@ -156,7 +156,7 @@ void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl, const PIN_INFO
const BaseInputPinFuncTable *func_table, CRITICAL_SECTION *cs, IMemAllocator *allocator); const BaseInputPinFuncTable *func_table, CRITICAL_SECTION *cs, IMemAllocator *allocator);
void strmbase_sink_cleanup(BaseInputPin *pin); void strmbase_sink_cleanup(BaseInputPin *pin);
typedef struct BaseFilter struct strmbase_filter
{ {
IBaseFilter IBaseFilter_iface; IBaseFilter IBaseFilter_iface;
IUnknown IUnknown_inner; IUnknown IUnknown_inner;
...@@ -172,13 +172,13 @@ typedef struct BaseFilter ...@@ -172,13 +172,13 @@ typedef struct BaseFilter
LONG pin_version; LONG pin_version;
const struct strmbase_filter_ops *pFuncsTable; const struct strmbase_filter_ops *pFuncsTable;
} BaseFilter; };
struct strmbase_filter_ops struct strmbase_filter_ops
{ {
IPin *(*filter_get_pin)(BaseFilter *iface, unsigned int index); IPin *(*filter_get_pin)(struct strmbase_filter *iface, unsigned int index);
void (*filter_destroy)(BaseFilter *iface); void (*filter_destroy)(struct strmbase_filter *iface);
HRESULT (*filter_query_interface)(BaseFilter *iface, REFIID iid, void **out); HRESULT (*filter_query_interface)(struct strmbase_filter *iface, REFIID iid, void **out);
}; };
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv); HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
...@@ -197,11 +197,11 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO * ...@@ -197,11 +197,11 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName ); HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName );
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo); HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo);
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This); VOID WINAPI BaseFilterImpl_IncrementPinVersion(struct strmbase_filter *filter);
void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, void strmbase_filter_init(struct strmbase_filter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer,
const CLSID *clsid, const struct strmbase_filter_ops *func_table); const CLSID *clsid, const struct strmbase_filter_ops *func_table);
void strmbase_filter_cleanup(BaseFilter *filter); void strmbase_filter_cleanup(struct strmbase_filter *filter);
/* Enums */ /* Enums */
HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum); HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum);
...@@ -209,7 +209,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu ...@@ -209,7 +209,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu
/* Transform Filter */ /* Transform Filter */
typedef struct TransformFilter typedef struct TransformFilter
{ {
BaseFilter filter; struct strmbase_filter filter;
BaseOutputPin source; BaseOutputPin source;
BaseInputPin sink; BaseInputPin sink;
...@@ -429,12 +429,13 @@ typedef struct tagBaseControlWindow ...@@ -429,12 +429,13 @@ typedef struct tagBaseControlWindow
BOOL AutoShow; BOOL AutoShow;
HWND hwndDrain; HWND hwndDrain;
HWND hwndOwner; HWND hwndOwner;
BaseFilter* pFilter; struct strmbase_filter *pFilter;
CRITICAL_SECTION* pInterfaceLock; CRITICAL_SECTION* pInterfaceLock;
BasePin* pPin; BasePin* pPin;
} BaseControlWindow; } BaseControlWindow;
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin, const BaseWindowFuncTable* pFuncsTable); HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl,
struct strmbase_filter *filter, CRITICAL_SECTION *lock, BasePin *pin, const BaseWindowFuncTable *ops);
HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow); HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam); BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);
...@@ -494,7 +495,7 @@ typedef struct tagBaseControlVideo ...@@ -494,7 +495,7 @@ typedef struct tagBaseControlVideo
{ {
IBasicVideo IBasicVideo_iface; IBasicVideo IBasicVideo_iface;
BaseFilter* pFilter; struct strmbase_filter *pFilter;
CRITICAL_SECTION* pInterfaceLock; CRITICAL_SECTION* pInterfaceLock;
BasePin* pPin; BasePin* pPin;
...@@ -526,7 +527,7 @@ typedef struct BaseControlVideoFuncTable { ...@@ -526,7 +527,7 @@ typedef struct BaseControlVideoFuncTable {
BaseControlVideo_SetTargetRect pfnSetTargetRect; BaseControlVideo_SetTargetRect pfnSetTargetRect;
} BaseControlVideoFuncTable; } BaseControlVideoFuncTable;
HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, BaseFilter *filter, HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table); CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table);
HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
#endif #endif
...@@ -535,7 +536,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); ...@@ -535,7 +536,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
/* BaseRenderer Filter */ /* BaseRenderer Filter */
typedef struct BaseRendererTag typedef struct BaseRendererTag
{ {
BaseFilter filter; struct strmbase_filter filter;
BaseInputPin sink; BaseInputPin sink;
IUnknown *pPosition; IUnknown *pPosition;
......
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