winegstreamer: Implement WMA decoder GetInputStreamInfo.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-02-02 13:28:20 +01:00 committed by Alexandre Julliard
parent 177c232936
commit 940110d387
2 changed files with 19 additions and 10 deletions

View File

@ -5748,7 +5748,6 @@ static void test_wma_decoder(void)
/* check default media types */
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
todo_wine
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#x\n", hr);
hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#x\n", hr);
@ -5804,7 +5803,6 @@ static void test_wma_decoder(void)
ok(ret == 0, "Release returned %u\n", ret);
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
todo_wine
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#x\n", hr);
hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#x\n", hr);
@ -5847,17 +5845,11 @@ static void test_wma_decoder(void)
memset(&input_info, 0xcd, sizeof(input_info));
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
todo_wine
ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr);
todo_wine
ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency));
todo_wine
ok(input_info.dwFlags == 0, "got dwFlags %#x\n", input_info.dwFlags);
todo_wine
ok(input_info.cbSize == wma_block_size, "got cbSize %u\n", input_info.cbSize);
todo_wine
ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead);
todo_wine
ok(input_info.cbAlignment == 1, "got cbAlignment %#x\n", input_info.cbAlignment);
memset(&output_info, 0xcd, sizeof(output_info));

View File

@ -168,8 +168,25 @@ static HRESULT WINAPI transform_GetStreamIDs(IMFTransform *iface, DWORD input_si
static HRESULT WINAPI transform_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info)
{
FIXME("iface %p, id %u, info %p stub!\n", iface, id, info);
return E_NOTIMPL;
struct wma_decoder *decoder = impl_from_IMFTransform(iface);
UINT32 block_alignment;
HRESULT hr;
TRACE("iface %p, id %u, info %p.\n", iface, id, info);
if (!decoder->input_type || !decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
if (FAILED(hr = IMFMediaType_GetUINT32(decoder->input_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &block_alignment)))
return hr;
info->hnsMaxLatency = 0;
info->dwFlags = 0;
info->cbSize = block_alignment;
info->cbMaxLookahead = 0;
info->cbAlignment = 1;
return S_OK;
}
static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info)