Commit 974971ad authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap/tests: Get rid of the VFW capture filter tests.

Most video cameras are exposed through WDM on modern Windows, and not supported by the VFW capture filter. No known applications depend on the VFW capture filter, and any such applications would fail to work with modern video cameras. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 312ea8e7
......@@ -1643,150 +1643,6 @@ static void test_AviMux(char *arg)
ok(ref == 0, "IStream was not destroyed (%d)\n", ref);
}
/* Outer IUnknown for COM aggregation tests */
struct unk_impl {
IUnknown IUnknown_iface;
LONG ref;
IUnknown *inner_unk;
};
static inline struct unk_impl *impl_from_IUnknown(IUnknown *iface)
{
return CONTAINING_RECORD(iface, struct unk_impl, IUnknown_iface);
}
static HRESULT WINAPI unk_QueryInterface(IUnknown *iface, REFIID riid, void **ret_iface)
{
struct unk_impl *This = impl_from_IUnknown(iface);
return IUnknown_QueryInterface(This->inner_unk, riid, ret_iface);
}
static ULONG WINAPI unk_AddRef(IUnknown *iface)
{
struct unk_impl *This = impl_from_IUnknown(iface);
return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI unk_Release(IUnknown *iface)
{
struct unk_impl *This = impl_from_IUnknown(iface);
return InterlockedDecrement(&This->ref);
}
static const IUnknownVtbl unk_vtbl =
{
unk_QueryInterface,
unk_AddRef,
unk_Release
};
static void test_COM_vfwcapture(void)
{
struct unk_impl unk_obj = {{&unk_vtbl}, 19, NULL};
IBaseFilter *bf;
IMediaFilter *mf;
IPersist *p;
IPersistPropertyBag *ppb;
IAMVfwCaptureDialogs *amvcd;
IAMFilterMiscFlags *amfmf;
ISpecifyPropertyPages *spp;
IUnknown *unk;
ULONG refcount;
HRESULT hr;
/* COM aggregation */
hr = CoCreateInstance(&CLSID_VfwCapture, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&unk_obj.inner_unk);
if ((hr == REGDB_E_CLASSNOTREG) || (hr == CLASS_E_CLASSNOTAVAILABLE))
{
win_skip("CLSID_VfwCapture not supported (0x%x)\n", hr);
return;
}
ok(hr == S_OK, "VfwCapture create failed: %08x\n", hr);
hr = IUnknown_QueryInterface(unk_obj.inner_unk, &IID_IBaseFilter, (void**)&bf);
ok(hr == S_OK, "QueryInterface for IID_IBaseFilter failed: %08x\n", hr);
refcount = IBaseFilter_AddRef(bf);
ok(refcount == unk_obj.ref, "VfwCapture just pretends to support COM aggregation\n");
refcount = IBaseFilter_Release(bf);
ok(refcount == unk_obj.ref, "VfwCapture just pretends to support COM aggregation\n");
refcount = IBaseFilter_Release(bf);
ok(refcount == 19, "Refcount should be back at 19 but is %u\n", refcount);
IUnknown_Release(unk_obj.inner_unk);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_VfwCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&bf);
ok(hr == E_NOINTERFACE, "VfwCapture create failed: %08x, expected E_NOINTERFACE\n", hr);
/* Same refcount for all VfwCapture interfaces */
hr = CoCreateInstance(&CLSID_VfwCapture, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter,
(void**)&bf);
ok(hr == S_OK, "VfwCapture create failed: %08x, expected S_OK\n", hr);
refcount = IBaseFilter_AddRef(bf);
ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
hr = IBaseFilter_QueryInterface(bf, &IID_IMediaFilter, (void**)&mf);
ok(hr == S_OK, "QueryInterface for IID_IMediaFilter failed: %08x\n", hr);
refcount = IMediaFilter_AddRef(mf);
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
refcount = IMediaFilter_Release(mf);
hr = IBaseFilter_QueryInterface(bf, &IID_IPersist, (void**)&p);
ok(hr == S_OK, "QueryInterface for IID_IPersist failed: %08x\n", hr);
refcount = IPersist_AddRef(p);
ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
refcount = IPersist_Release(p);
hr = IBaseFilter_QueryInterface(bf, &IID_IPersistPropertyBag, (void**)&ppb);
ok(hr == S_OK, "QueryInterface for IID_IPersistPropertyBag failed: %08x\n", hr);
refcount = IPersistPropertyBag_AddRef(ppb);
ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
refcount = IPersistPropertyBag_Release(ppb);
hr = IBaseFilter_QueryInterface(bf, &IID_IAMVfwCaptureDialogs, (void**)&amvcd);
todo_wine ok(hr == S_OK, "QueryInterface for IID_IAMVfwCaptureDialogs failed: %08x\n", hr);
if (hr == S_OK) {
refcount = IAMVfwCaptureDialogs_AddRef(amvcd);
ok(refcount == 7, "refcount == %u, expected 7\n", refcount);
refcount = IAMVfwCaptureDialogs_Release(amvcd);
}
hr = IBaseFilter_QueryInterface(bf, &IID_IAMFilterMiscFlags, (void**)&amfmf);
todo_wine ok(hr == S_OK, "QueryInterface for IID_IAMFilterMiscFlags failed: %08x\n", hr);
if (hr == S_OK) {
refcount = IAMFilterMiscFlags_AddRef(amfmf);
ok(refcount == 8, "refcount == %u, expected 8\n", refcount);
refcount = IAMFilterMiscFlags_Release(amfmf);
}
hr = IBaseFilter_QueryInterface(bf, &IID_ISpecifyPropertyPages, (void**)&spp);
todo_wine ok(hr == S_OK, "QueryInterface for IID_ISpecifyPropertyPages failed: %08x\n", hr);
if (hr == S_OK) {
refcount = ISpecifyPropertyPages_AddRef(spp);
ok(refcount == 9, "refcount == %u, expected 9\n", refcount);
refcount = ISpecifyPropertyPages_Release(spp);
}
hr = IBaseFilter_QueryInterface(bf, &IID_IUnknown, (void**)&unk);
ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
refcount = IUnknown_AddRef(unk);
todo_wine ok(refcount == 10, "refcount == %u, expected 10\n", refcount);
refcount = IUnknown_Release(unk);
/* Unsupported interfaces */
hr = IBaseFilter_QueryInterface(bf, &IID_IAMStreamConfig, (void**)&unk);
ok(hr == E_NOINTERFACE, "QueryInterface for IID_IAMStreamConfig failed: %08x\n", hr);
hr = IBaseFilter_QueryInterface(bf, &IID_IAMVideoProcAmp, (void**)&unk);
todo_wine ok(hr == E_NOINTERFACE, "QueryInterface for IID_IAMVideoProcAmp failed: %08x\n", hr);
hr = IBaseFilter_QueryInterface(bf, &IID_IOverlayNotify, (void**)&unk);
ok(hr == E_NOINTERFACE, "QueryInterface for IID_IOverlayNotify failed: %08x\n", hr);
while (IBaseFilter_Release(bf));
}
START_TEST(qcap)
{
if (SUCCEEDED(CoInitialize(NULL)))
......@@ -1797,7 +1653,6 @@ START_TEST(qcap)
arg_c = winetest_get_mainargs(&arg_v);
test_AviMux(arg_c>2 ? arg_v[2] : NULL);
test_COM_vfwcapture();
CoUninitialize();
}
......
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