qedit/tests: Add some tests for media types.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f30248f336
commit
b1ffe12e43
|
@ -352,6 +352,33 @@ static void test_aggregation(void)
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_media_types(void)
|
||||||
|
{
|
||||||
|
IBaseFilter *filter = create_null_renderer();
|
||||||
|
AM_MEDIA_TYPE mt = {}, *pmt;
|
||||||
|
IEnumMediaTypes *enummt;
|
||||||
|
HRESULT hr;
|
||||||
|
ULONG ref;
|
||||||
|
IPin *pin;
|
||||||
|
|
||||||
|
IBaseFilter_FindPin(filter, sink_id, &pin);
|
||||||
|
|
||||||
|
hr = IPin_EnumMediaTypes(pin, &enummt);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL);
|
||||||
|
ok(hr == S_FALSE, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
IEnumMediaTypes_Release(enummt);
|
||||||
|
|
||||||
|
hr = IPin_QueryAccept(pin, &mt);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
IPin_Release(pin);
|
||||||
|
ref = IBaseFilter_Release(filter);
|
||||||
|
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(nullrenderer)
|
START_TEST(nullrenderer)
|
||||||
{
|
{
|
||||||
IBaseFilter *filter;
|
IBaseFilter *filter;
|
||||||
|
@ -373,6 +400,7 @@ START_TEST(nullrenderer)
|
||||||
test_find_pin();
|
test_find_pin();
|
||||||
test_pin_info();
|
test_pin_info();
|
||||||
test_aggregation();
|
test_aggregation();
|
||||||
|
test_media_types();
|
||||||
|
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,6 +449,39 @@ static void test_aggregation(void)
|
||||||
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_media_types(void)
|
||||||
|
{
|
||||||
|
IBaseFilter *filter = create_sample_grabber();
|
||||||
|
IEnumMediaTypes *enummt;
|
||||||
|
AM_MEDIA_TYPE mt = {};
|
||||||
|
HRESULT hr;
|
||||||
|
ULONG ref;
|
||||||
|
IPin *pin;
|
||||||
|
|
||||||
|
IBaseFilter_FindPin(filter, sink_id, &pin);
|
||||||
|
|
||||||
|
hr = IPin_EnumMediaTypes(pin, &enummt);
|
||||||
|
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IPin_QueryAccept(pin, &mt);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
IPin_Release(pin);
|
||||||
|
|
||||||
|
IBaseFilter_FindPin(filter, source_id, &pin);
|
||||||
|
|
||||||
|
hr = IPin_EnumMediaTypes(pin, &enummt);
|
||||||
|
todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
hr = IPin_QueryAccept(pin, &mt);
|
||||||
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
|
IPin_Release(pin);
|
||||||
|
|
||||||
|
ref = IBaseFilter_Release(filter);
|
||||||
|
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(samplegrabber)
|
START_TEST(samplegrabber)
|
||||||
{
|
{
|
||||||
IBaseFilter *filter;
|
IBaseFilter *filter;
|
||||||
|
@ -470,6 +503,7 @@ START_TEST(samplegrabber)
|
||||||
test_find_pin();
|
test_find_pin();
|
||||||
test_pin_info();
|
test_pin_info();
|
||||||
test_aggregation();
|
test_aggregation();
|
||||||
|
test_media_types();
|
||||||
|
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue