mf/evr: Implement GetMediaTypeCount().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c1371f356c
commit
6408aa3ab7
|
@ -372,9 +372,14 @@ static HRESULT WINAPI video_stream_typehandler_IsMediaTypeSupported(IMFMediaType
|
||||||
|
|
||||||
static HRESULT WINAPI video_stream_typehandler_GetMediaTypeCount(IMFMediaTypeHandler *iface, DWORD *count)
|
static HRESULT WINAPI video_stream_typehandler_GetMediaTypeCount(IMFMediaTypeHandler *iface, DWORD *count)
|
||||||
{
|
{
|
||||||
FIXME("%p, %p.\n", iface, count);
|
TRACE("%p, %p.\n", iface, count);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
if (!count)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
*count = 0;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI video_stream_typehandler_GetMediaTypeByIndex(IMFMediaTypeHandler *iface, DWORD index,
|
static HRESULT WINAPI video_stream_typehandler_GetMediaTypeByIndex(IMFMediaTypeHandler *iface, DWORD index,
|
||||||
|
|
|
@ -3296,6 +3296,15 @@ static void test_evr(void)
|
||||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||||
ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected type %s.\n", wine_dbgstr_guid(&guid));
|
ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected type %s.\n", wine_dbgstr_guid(&guid));
|
||||||
|
|
||||||
|
/* Supported types are not advertised. */
|
||||||
|
hr = IMFMediaTypeHandler_GetMediaTypeCount(type_handler, NULL);
|
||||||
|
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
|
count = 1;
|
||||||
|
hr = IMFMediaTypeHandler_GetMediaTypeCount(type_handler, &count);
|
||||||
|
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||||
|
ok(!count, "Unexpected count %u.\n", count);
|
||||||
|
|
||||||
IMFMediaTypeHandler_Release(type_handler);
|
IMFMediaTypeHandler_Release(type_handler);
|
||||||
|
|
||||||
/* Stream uses an allocator. */
|
/* Stream uses an allocator. */
|
||||||
|
|
Loading…
Reference in New Issue