strmbase: Get rid of the "vtbl" argument to strmbase_source_init().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5ea2267f28
commit
675e061142
|
@ -473,27 +473,6 @@ static const struct strmbase_sink_ops sink_ops =
|
|||
.pfnReceive = AVICompressorIn_Receive,
|
||||
};
|
||||
|
||||
static const IPinVtbl AVICompressorOutputPinVtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||
{
|
||||
AVICompressor *This = impl_from_strmbase_filter(base->filter);
|
||||
|
@ -564,8 +543,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
|
|||
|
||||
strmbase_sink_init(&compressor->sink, &AVICompressorInputPinVtbl,
|
||||
&compressor->filter, sink_name, &sink_ops, NULL);
|
||||
strmbase_source_init(&compressor->source, &AVICompressorOutputPinVtbl,
|
||||
&compressor->filter, source_name, &source_ops);
|
||||
strmbase_source_init(&compressor->source, &compressor->filter, source_name, &source_ops);
|
||||
|
||||
*phr = S_OK;
|
||||
return &compressor->filter.IUnknown_inner;
|
||||
|
|
|
@ -1217,27 +1217,6 @@ static const struct strmbase_source_ops source_ops =
|
|||
.pfnDecideAllocator = AviMuxOut_DecideAllocator,
|
||||
};
|
||||
|
||||
static const IPinVtbl AviMuxOut_PinVtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static inline AviMux* impl_from_out_IQualityControl(IQualityControl *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, AviMux, IQualityControl_iface);
|
||||
|
@ -1923,8 +1902,7 @@ IUnknown * WINAPI QCAP_createAVIMux(IUnknown *outer, HRESULT *phr)
|
|||
info.dir = PINDIR_OUTPUT;
|
||||
info.pFilter = &avimux->filter.IBaseFilter_iface;
|
||||
lstrcpyW(info.achName, output_name);
|
||||
strmbase_source_init(&avimux->source, &AviMuxOut_PinVtbl, &avimux->filter,
|
||||
output_name, &source_ops);
|
||||
strmbase_source_init(&avimux->source, &avimux->filter, output_name, &source_ops);
|
||||
avimux->IQualityControl_iface.lpVtbl = &AviMuxOut_QualityControlVtbl;
|
||||
avimux->cur_stream = 0;
|
||||
avimux->cur_time = 0;
|
||||
|
|
|
@ -275,27 +275,6 @@ static const struct strmbase_sink_ops sink_ops =
|
|||
.pfnReceive = SmartTeeFilterInput_Receive,
|
||||
};
|
||||
|
||||
static const IPinVtbl SmartTeeFilterCaptureVtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static HRESULT capture_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
|
||||
{
|
||||
FIXME("(%p) stub\n", base);
|
||||
|
@ -339,27 +318,6 @@ static const struct strmbase_source_ops capture_ops =
|
|||
.pfnDecideAllocator = SmartTeeFilterCapture_DecideAllocator,
|
||||
};
|
||||
|
||||
static const IPinVtbl SmartTeeFilterPreviewVtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static HRESULT preview_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
|
||||
{
|
||||
FIXME("(%p) stub\n", base);
|
||||
|
@ -410,10 +368,8 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strmbase_source_init(&object->capture, &SmartTeeFilterCaptureVtbl,
|
||||
&object->filter, captureW, &capture_ops);
|
||||
strmbase_source_init(&object->preview, &SmartTeeFilterPreviewVtbl,
|
||||
&object->filter, previewW, &preview_ops);
|
||||
strmbase_source_init(&object->capture, &object->filter, captureW, &capture_ops);
|
||||
strmbase_source_init(&object->preview, &object->filter, previewW, &preview_ops);
|
||||
|
||||
*phr = S_OK;
|
||||
return &object->filter.IUnknown_inner;
|
||||
|
|
|
@ -563,28 +563,6 @@ static const struct strmbase_source_ops source_ops =
|
|||
.pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator,
|
||||
};
|
||||
|
||||
static const IPinVtbl VfwPin_Vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *outer, HRESULT *phr)
|
||||
{
|
||||
static const WCHAR source_name[] = {'O','u','t','p','u','t',0};
|
||||
|
@ -603,8 +581,7 @@ IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *outer, HRESULT *phr)
|
|||
object->IPersistPropertyBag_iface.lpVtbl = &IPersistPropertyBag_VTable;
|
||||
object->init = FALSE;
|
||||
|
||||
strmbase_source_init(&object->source, &VfwPin_Vtbl, &object->filter,
|
||||
source_name, &source_ops);
|
||||
strmbase_source_init(&object->source, &object->filter, source_name, &source_ops);
|
||||
|
||||
object->IKsPropertySet_iface.lpVtbl = &IKsPropertySet_VTable;
|
||||
|
||||
|
|
|
@ -660,28 +660,6 @@ static const struct strmbase_source_ops source_ops =
|
|||
.pfnAttemptConnection = sample_grabber_source_AttemptConnection,
|
||||
};
|
||||
|
||||
static const IPinVtbl source_vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment,
|
||||
};
|
||||
|
||||
HRESULT SampleGrabber_create(IUnknown *outer, void **out)
|
||||
{
|
||||
SG_Impl* obj = NULL;
|
||||
|
@ -700,7 +678,7 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out)
|
|||
obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
|
||||
|
||||
strmbase_sink_init(&obj->sink, &sink_vtbl, &obj->filter, L"In", &sink_ops, NULL);
|
||||
strmbase_source_init(&obj->source, &source_vtbl, &obj->filter, L"Out", &source_ops);
|
||||
strmbase_source_init(&obj->source, &obj->filter, L"Out", &source_ops);
|
||||
|
||||
obj->mtype.majortype = GUID_NULL;
|
||||
obj->mtype.subtype = MEDIASUBTYPE_None;
|
||||
|
|
|
@ -77,7 +77,6 @@ typedef struct AsyncReader
|
|||
HANDLE *handle_list;
|
||||
} AsyncReader;
|
||||
|
||||
static const IPinVtbl FileAsyncReaderPin_Vtbl;
|
||||
static const struct strmbase_source_ops source_ops;
|
||||
|
||||
static inline AsyncReader *impl_from_strmbase_filter(struct strmbase_filter *iface)
|
||||
|
@ -468,8 +467,7 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
|
|||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
strmbase_source_init(&This->source, &FileAsyncReaderPin_Vtbl, &This->filter,
|
||||
wszOutputPinName, &source_ops);
|
||||
strmbase_source_init(&This->source, &This->filter, wszOutputPinName, &source_ops);
|
||||
BaseFilterImpl_IncrementPinVersion(&This->filter);
|
||||
|
||||
This->file = hFile;
|
||||
|
@ -594,28 +592,6 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const IPinVtbl FileAsyncReaderPin_Vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BasePinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
/* Function called as a helper to IPin_Connect */
|
||||
/* specific AM_MEDIA_TYPE - it cannot be NULL */
|
||||
/* this differs from standard OutputPin_AttemptConnection only in that it
|
||||
|
|
|
@ -521,28 +521,6 @@ static const struct strmbase_filter_ops testfilter_ops =
|
|||
.filter_destroy = testfilter_destroy,
|
||||
};
|
||||
|
||||
static const IPinVtbl testsource_vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BasePinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment,
|
||||
};
|
||||
|
||||
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
return S_OK;
|
||||
|
@ -579,7 +557,7 @@ static void testfilter_init(struct testfilter *filter)
|
|||
{
|
||||
static const GUID clsid = {0xabacab};
|
||||
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
|
||||
strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
|
||||
strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
|
||||
}
|
||||
|
||||
static void test_allocator(IMemInputPin *input)
|
||||
|
|
|
@ -881,28 +881,6 @@ static const struct strmbase_filter_ops testfilter_ops =
|
|||
.filter_destroy = testfilter_destroy,
|
||||
};
|
||||
|
||||
static const IPinVtbl testsource_vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BasePinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment,
|
||||
};
|
||||
|
||||
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
return S_OK;
|
||||
|
@ -939,7 +917,7 @@ static void testfilter_init(struct testfilter *filter)
|
|||
{
|
||||
static const GUID clsid = {0xabacab};
|
||||
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
|
||||
strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
|
||||
strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
|
||||
}
|
||||
|
||||
static void test_allocator(IMemInputPin *input)
|
||||
|
|
|
@ -885,28 +885,6 @@ static const struct strmbase_filter_ops testfilter_ops =
|
|||
.filter_destroy = testfilter_destroy,
|
||||
};
|
||||
|
||||
static const IPinVtbl testsource_vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BasePinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment,
|
||||
};
|
||||
|
||||
static HRESULT testsource_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
|
||||
{
|
||||
return S_OK;
|
||||
|
@ -943,7 +921,7 @@ static void testfilter_init(struct testfilter *filter)
|
|||
{
|
||||
static const GUID clsid = {0xabacab};
|
||||
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
|
||||
strmbase_source_init(&filter->source, &testsource_vtbl, &filter->filter, L"", &testsource_ops);
|
||||
strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
|
||||
}
|
||||
|
||||
static void test_allocator(IMemInputPin *input)
|
||||
|
|
|
@ -284,7 +284,7 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
|
|||
return CONTAINING_RECORD(iface, struct strmbase_source, pin.IPin_iface);
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt)
|
||||
static HRESULT WINAPI source_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
|
||||
{
|
||||
HRESULT hr;
|
||||
struct strmbase_source *This = impl_source_from_IPin(iface);
|
||||
|
@ -375,13 +375,13 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
|
||||
static HRESULT WINAPI source_ReceiveConnection(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt)
|
||||
{
|
||||
ERR("(%p)->(%p, %p) incoming connection on an output pin!\n", iface, pin, pmt);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
|
||||
static HRESULT WINAPI source_Disconnect(IPin *iface)
|
||||
{
|
||||
HRESULT hr;
|
||||
struct strmbase_source *This = impl_source_from_IPin(iface);
|
||||
|
@ -418,7 +418,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
|
|||
return hr;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface)
|
||||
static HRESULT WINAPI source_EndOfStream(IPin *iface)
|
||||
{
|
||||
TRACE("(%p)->()\n", iface);
|
||||
|
||||
|
@ -427,7 +427,7 @@ HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface)
|
|||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface)
|
||||
static HRESULT WINAPI source_BeginFlush(IPin *iface)
|
||||
{
|
||||
TRACE("(%p)->()\n", iface);
|
||||
|
||||
|
@ -436,7 +436,7 @@ HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface)
|
|||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface)
|
||||
static HRESULT WINAPI source_EndFlush(IPin *iface)
|
||||
{
|
||||
TRACE("(%p)->()\n", iface);
|
||||
|
||||
|
@ -445,6 +445,28 @@ HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface)
|
|||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
static const IPinVtbl source_vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
source_Connect,
|
||||
source_ReceiveConnection,
|
||||
source_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
source_EndOfStream,
|
||||
source_BeginFlush,
|
||||
source_EndFlush,
|
||||
BasePinImpl_NewSegment,
|
||||
};
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This,
|
||||
IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
|
||||
{
|
||||
|
@ -595,11 +617,11 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
|
|||
return hr;
|
||||
}
|
||||
|
||||
void strmbase_source_init(struct strmbase_source *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
|
||||
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter,
|
||||
const WCHAR *name, const struct strmbase_source_ops *func_table)
|
||||
{
|
||||
memset(pin, 0, sizeof(*pin));
|
||||
pin->pin.IPin_iface.lpVtbl = vtbl;
|
||||
pin->pin.IPin_iface.lpVtbl = &source_vtbl;
|
||||
pin->pin.filter = filter;
|
||||
pin->pin.dir = PINDIR_OUTPUT;
|
||||
lstrcpyW(pin->pin.name, name);
|
||||
|
|
|
@ -27,7 +27,6 @@ static const WCHAR wcsInputPinName[] = {'I','n',0};
|
|||
static const WCHAR wcsOutputPinName[] = {'O','u','t',0};
|
||||
|
||||
static const IPinVtbl TransformFilter_InputPin_Vtbl;
|
||||
static const IPinVtbl TransformFilter_OutputPin_Vtbl;
|
||||
|
||||
static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface)
|
||||
{
|
||||
|
@ -338,8 +337,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
|
|||
strmbase_sink_init(&filter->sink, &TransformFilter_InputPin_Vtbl, &filter->filter,
|
||||
wcsInputPinName, &sink_ops, NULL);
|
||||
|
||||
strmbase_source_init(&filter->source, &TransformFilter_OutputPin_Vtbl, &filter->filter,
|
||||
wcsOutputPinName, &source_ops);
|
||||
strmbase_source_init(&filter->source, &filter->filter, wcsOutputPinName, &source_ops);
|
||||
filter->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl;
|
||||
|
||||
filter->seekthru_unk = NULL;
|
||||
|
@ -503,25 +501,3 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
|
|||
TransformFilter_InputPin_EndFlush,
|
||||
TransformFilter_InputPin_NewSegment
|
||||
};
|
||||
|
||||
static const IPinVtbl TransformFilter_OutputPin_Vtbl =
|
||||
{
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
|
|
@ -97,7 +97,6 @@ const char* media_quark_string = "media-sample";
|
|||
|
||||
static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
|
||||
static const IMediaSeekingVtbl GST_Seeking_Vtbl;
|
||||
static const IPinVtbl GST_OutputPin_Vtbl;
|
||||
static const IPinVtbl GST_InputPin_Vtbl;
|
||||
static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl;
|
||||
|
||||
|
@ -1836,27 +1835,6 @@ static void free_source_pin(struct gstdemux_source *pin)
|
|||
heap_free(pin);
|
||||
}
|
||||
|
||||
static const IPinVtbl GST_OutputPin_Vtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static const struct strmbase_source_ops source_ops =
|
||||
{
|
||||
.base.pin_query_interface = source_query_interface,
|
||||
|
@ -1879,8 +1857,7 @@ static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *
|
|||
if (!(pin = heap_alloc_zero(sizeof(*pin))))
|
||||
return NULL;
|
||||
|
||||
strmbase_source_init(&pin->pin, &GST_OutputPin_Vtbl, &filter->filter, name,
|
||||
&source_ops);
|
||||
strmbase_source_init(&pin->pin, &filter->filter, name, &source_ops);
|
||||
pin->caps_event = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
pin->segment = gst_segment_new();
|
||||
gst_segment_init(pin->segment, GST_FORMAT_TIME);
|
||||
|
|
|
@ -171,7 +171,6 @@ typedef struct QTSplitter {
|
|||
HANDLE splitterThread;
|
||||
} QTSplitter;
|
||||
|
||||
static const IPinVtbl QT_OutputPin_Vtbl;
|
||||
static const IPinVtbl QT_InputPin_Vtbl;
|
||||
static const IBaseFilterVtbl QT_Vtbl;
|
||||
static const IMediaSeekingVtbl QT_Seeking_Vtbl;
|
||||
|
@ -1211,27 +1210,6 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(struct strmbase_source *iface,
|
|||
return hr;
|
||||
}
|
||||
|
||||
static const IPinVtbl QT_OutputPin_Vtbl = {
|
||||
BasePinImpl_QueryInterface,
|
||||
BasePinImpl_AddRef,
|
||||
BasePinImpl_Release,
|
||||
BaseOutputPinImpl_Connect,
|
||||
BaseOutputPinImpl_ReceiveConnection,
|
||||
BaseOutputPinImpl_Disconnect,
|
||||
BasePinImpl_ConnectedTo,
|
||||
BasePinImpl_ConnectionMediaType,
|
||||
BasePinImpl_QueryPinInfo,
|
||||
BasePinImpl_QueryDirection,
|
||||
BasePinImpl_QueryId,
|
||||
BasePinImpl_QueryAccept,
|
||||
BasePinImpl_EnumMediaTypes,
|
||||
BasePinImpl_QueryInternalConnections,
|
||||
BaseOutputPinImpl_EndOfStream,
|
||||
BaseOutputPinImpl_BeginFlush,
|
||||
BaseOutputPinImpl_EndFlush,
|
||||
BasePinImpl_NewSegment
|
||||
};
|
||||
|
||||
static inline QTOutPin *impl_from_IQualityControl( IQualityControl *iface )
|
||||
{
|
||||
return CONTAINING_RECORD(iface, QTOutPin, IQualityControl_iface);
|
||||
|
@ -1304,8 +1282,7 @@ static HRESULT QT_AddPin(QTSplitter *filter, const WCHAR *name,
|
|||
else
|
||||
filter->pAudio_Pin = pin;
|
||||
|
||||
strmbase_source_init(&pin->pin, &QT_OutputPin_Vtbl, &filter->filter, name,
|
||||
&source_ops);
|
||||
strmbase_source_init(&pin->pin, &filter->filter, name, &source_ops);
|
||||
pin->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
|
||||
CopyMediaType(pin->pmt, mt);
|
||||
pin->IQualityControl_iface.lpVtbl = &QTOutPin_QualityControl_Vtbl;
|
||||
|
|
|
@ -113,14 +113,6 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnu
|
|||
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
|
||||
HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
||||
|
||||
/* Base Output Pin */
|
||||
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
||||
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
||||
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface);
|
||||
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface);
|
||||
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface);
|
||||
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface);
|
||||
|
||||
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin,
|
||||
IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags);
|
||||
HRESULT WINAPI BaseOutputPinImpl_Active(struct strmbase_source *pin);
|
||||
|
@ -130,7 +122,7 @@ HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IM
|
|||
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,
|
||||
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter,
|
||||
const WCHAR *name, const struct strmbase_source_ops *func_table);
|
||||
|
||||
/* Base Input Pin */
|
||||
|
|
Loading…
Reference in New Issue