winegstreamer: Implement IWMHeaderInfo::GetAttributeByName(L"Seekable").
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
799c7704e8
commit
c3811e8461
|
@ -910,6 +910,27 @@ static HRESULT WINAPI header_info_GetAttributeByName(IWMHeaderInfo3 *iface, WORD
|
|||
memcpy(value, &duration, sizeof(QWORD));
|
||||
return S_OK;
|
||||
}
|
||||
else if (!wcscmp(name, L"Seekable"))
|
||||
{
|
||||
if (*stream_number)
|
||||
{
|
||||
WARN("Requesting duration for stream %u, returning ASF_E_NOTFOUND.\n", *stream_number);
|
||||
return ASF_E_NOTFOUND;
|
||||
}
|
||||
|
||||
*size = sizeof(BOOL);
|
||||
if (!value)
|
||||
{
|
||||
*type = WMT_TYPE_BOOL;
|
||||
return S_OK;
|
||||
}
|
||||
if (req_size < *size)
|
||||
return ASF_E_BUFFERTOOSMALL;
|
||||
|
||||
*type = WMT_TYPE_BOOL;
|
||||
*(BOOL *)value = TRUE;
|
||||
return S_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
FIXME("Unknown attribute %s.\n", debugstr_w(name));
|
||||
|
|
|
@ -468,6 +468,17 @@ static void test_reader_attributes(IWMProfile *profile)
|
|||
ok(ret_stream_number == stream_number, "Expected stream number %u, got %u.\n",
|
||||
stream_number, ret_stream_number);
|
||||
|
||||
size = sizeof(DWORD);
|
||||
type = 0xdeadbeef;
|
||||
dword = 0xdeadbeef;
|
||||
hr = IWMHeaderInfo_GetAttributeByName(header_info, &ret_stream_number,
|
||||
L"Seekable", &type, (BYTE *)&dword, &size);
|
||||
ok(hr == ASF_E_NOTFOUND, "Got hr %#x.\n", hr);
|
||||
ok(type == 0xdeadbeef, "Got type %#x.\n", type);
|
||||
ok(size == sizeof(DWORD), "Got size %u.\n", size);
|
||||
ok(ret_stream_number == stream_number, "Expected stream number %u, got %u.\n",
|
||||
stream_number, ret_stream_number);
|
||||
|
||||
IWMStreamConfig_Release(config);
|
||||
}
|
||||
|
||||
|
@ -546,6 +557,17 @@ static void test_reader_attributes(IWMProfile *profile)
|
|||
ok(size == sizeof(QWORD), "Got size %u.\n", size);
|
||||
ok(stream_number == 0, "Got stream number %u.\n", stream_number);
|
||||
|
||||
size = sizeof(DWORD);
|
||||
type = 0xdeadbeef;
|
||||
dword = 0xdeadbeef;
|
||||
hr = IWMHeaderInfo_GetAttributeByName(header_info, &stream_number,
|
||||
L"Seekable", &type, (BYTE *)&dword, &size);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(type == WMT_TYPE_BOOL, "Got type %#x.\n", type);
|
||||
ok(size == sizeof(DWORD), "Got size %u.\n", size);
|
||||
ok(dword == TRUE, "Got duration %I64u.\n", duration);
|
||||
ok(stream_number == 0, "Got stream number %u.\n", stream_number);
|
||||
|
||||
IWMHeaderInfo_Release(header_info);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue