Commit 90af4d28 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qasf/dmowrapper: Add a stub IDMOWrapperFilter interface.

parent dbb53beb
...@@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qasf); ...@@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qasf);
struct dmo_wrapper struct dmo_wrapper
{ {
struct strmbase_filter filter; struct strmbase_filter filter;
IDMOWrapperFilter IDMOWrapperFilter_iface;
}; };
static inline struct dmo_wrapper *impl_from_strmbase_filter(struct strmbase_filter *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 ...@@ -32,6 +33,44 @@ static inline struct dmo_wrapper *impl_from_strmbase_filter(struct strmbase_filt
return CONTAINING_RECORD(iface, struct dmo_wrapper, filter); 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) static struct strmbase_pin *dmo_wrapper_get_pin(struct strmbase_filter *iface, unsigned int index)
{ {
return NULL; return NULL;
...@@ -45,10 +84,25 @@ static void dmo_wrapper_destroy(struct strmbase_filter *iface) ...@@ -45,10 +84,25 @@ static void dmo_wrapper_destroy(struct strmbase_filter *iface)
free(filter); 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 = static struct strmbase_filter_ops filter_ops =
{ {
.filter_get_pin = dmo_wrapper_get_pin, .filter_get_pin = dmo_wrapper_get_pin,
.filter_destroy = dmo_wrapper_destroy, .filter_destroy = dmo_wrapper_destroy,
.filter_query_interface = dmo_wrapper_query_interface,
}; };
HRESULT dmo_wrapper_create(IUnknown *outer, IUnknown **out) HRESULT dmo_wrapper_create(IUnknown *outer, IUnknown **out)
...@@ -61,6 +115,8 @@ 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(). */ /* Always pass NULL as the outer object; see test_aggregation(). */
strmbase_filter_init(&object->filter, NULL, &CLSID_DMOWrapperFilter, &filter_ops); 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); TRACE("Created DMO wrapper %p.\n", object);
*out = &object->filter.IUnknown_inner; *out = &object->filter.IUnknown_inner;
......
...@@ -62,7 +62,7 @@ static void test_interfaces(void) ...@@ -62,7 +62,7 @@ static void test_interfaces(void)
IBaseFilter *filter = create_dmo_wrapper(); IBaseFilter *filter = create_dmo_wrapper();
check_interface(filter, &IID_IBaseFilter, TRUE); 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_IMediaFilter, TRUE);
check_interface(filter, &IID_IPersist, TRUE); check_interface(filter, &IID_IPersist, TRUE);
todo_wine check_interface(filter, &IID_IPersistStream, TRUE); todo_wine check_interface(filter, &IID_IPersistStream, TRUE);
......
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