qasf/dmowrapper: Add a stub IDMOWrapperFilter interface.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34622
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-17 17:30:58 -06:00 committed by Alexandre Julliard
parent dbb53beb86
commit 90af4d2863
2 changed files with 57 additions and 1 deletions

View File

@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qasf);
struct dmo_wrapper
{
struct strmbase_filter filter;
IDMOWrapperFilter IDMOWrapperFilter_iface;
};
static inline struct dmo_wrapper *impl_from_strmbase_filter(struct strmbase_filter *iface)
@ -32,6 +33,44 @@ static inline struct dmo_wrapper *impl_from_strmbase_filter(struct strmbase_filt
return CONTAINING_RECORD(iface, struct dmo_wrapper, filter);
}
static inline struct dmo_wrapper *impl_from_IDMOWrapperFilter(IDMOWrapperFilter *iface)
{
return CONTAINING_RECORD(iface, struct dmo_wrapper, IDMOWrapperFilter_iface);
}
static HRESULT WINAPI dmo_wrapper_filter_QueryInterface(IDMOWrapperFilter *iface, REFIID iid, void **out)
{
struct dmo_wrapper *filter = impl_from_IDMOWrapperFilter(iface);
return IUnknown_QueryInterface(filter->filter.outer_unk, iid, out);
}
static ULONG WINAPI dmo_wrapper_filter_AddRef(IDMOWrapperFilter *iface)
{
struct dmo_wrapper *filter = impl_from_IDMOWrapperFilter(iface);
return IUnknown_AddRef(filter->filter.outer_unk);
}
static ULONG WINAPI dmo_wrapper_filter_Release(IDMOWrapperFilter *iface)
{
struct dmo_wrapper *filter = impl_from_IDMOWrapperFilter(iface);
return IUnknown_Release(filter->filter.outer_unk);
}
static HRESULT WINAPI dmo_wrapper_filter_Init(IDMOWrapperFilter *iface, REFCLSID clsid, REFCLSID category)
{
FIXME("iface %p, clsid %s, category %s, stub!\n",
iface, wine_dbgstr_guid(clsid), wine_dbgstr_guid(category));
return E_NOTIMPL;
}
static const IDMOWrapperFilterVtbl dmo_wrapper_filter_vtbl =
{
dmo_wrapper_filter_QueryInterface,
dmo_wrapper_filter_AddRef,
dmo_wrapper_filter_Release,
dmo_wrapper_filter_Init,
};
static struct strmbase_pin *dmo_wrapper_get_pin(struct strmbase_filter *iface, unsigned int index)
{
return NULL;
@ -45,10 +84,25 @@ static void dmo_wrapper_destroy(struct strmbase_filter *iface)
free(filter);
}
static HRESULT dmo_wrapper_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
{
struct dmo_wrapper *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IDMOWrapperFilter))
{
*out = &filter->IDMOWrapperFilter_iface;
IUnknown_AddRef((IUnknown *)*out);
return S_OK;
}
return E_NOINTERFACE;
}
static struct strmbase_filter_ops filter_ops =
{
.filter_get_pin = dmo_wrapper_get_pin,
.filter_destroy = dmo_wrapper_destroy,
.filter_query_interface = dmo_wrapper_query_interface,
};
HRESULT dmo_wrapper_create(IUnknown *outer, IUnknown **out)
@ -61,6 +115,8 @@ HRESULT dmo_wrapper_create(IUnknown *outer, IUnknown **out)
/* Always pass NULL as the outer object; see test_aggregation(). */
strmbase_filter_init(&object->filter, NULL, &CLSID_DMOWrapperFilter, &filter_ops);
object->IDMOWrapperFilter_iface.lpVtbl = &dmo_wrapper_filter_vtbl;
TRACE("Created DMO wrapper %p.\n", object);
*out = &object->filter.IUnknown_inner;

View File

@ -62,7 +62,7 @@ static void test_interfaces(void)
IBaseFilter *filter = create_dmo_wrapper();
check_interface(filter, &IID_IBaseFilter, TRUE);
todo_wine check_interface(filter, &IID_IDMOWrapperFilter, TRUE);
check_interface(filter, &IID_IDMOWrapperFilter, TRUE);
check_interface(filter, &IID_IMediaFilter, TRUE);
check_interface(filter, &IID_IPersist, TRUE);
todo_wine check_interface(filter, &IID_IPersistStream, TRUE);