1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

winegstreamer: Implement H264 decoder GetInputCurrentType.

This commit is contained in:
Rémi Bernon 2024-01-24 14:47:55 +01:00 committed by Alexandre Julliard
parent 2d88c57716
commit 6aca31f1a1
3 changed files with 14 additions and 8 deletions

View file

@ -3622,15 +3622,11 @@ todo_wine {
IUnknown_Release(node_object);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
todo_wine
ok(hr == S_OK, "Failed to get transform input type, hr %#lx.\n", hr);
if (hr == S_OK)
{
hr = IMFMediaType_Compare(input_type, (IMFAttributes *)media_type, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &ret);
ok(hr == S_OK, "Failed to compare media types, hr %#lx.\n", hr);
ok(ret, "Input type of first transform doesn't match source node type.\n");
IMFMediaType_Release(media_type);
}
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
ok(hr == S_OK, "Failed to get transform input type, hr %#lx.\n", hr);

View file

@ -4262,7 +4262,7 @@ static void test_h264_decoder(void)
check_mft_set_input_type_required(transform, input_type_desc);
check_mft_set_input_type(transform, input_type_desc);
check_mft_get_input_current_type_(transform, expect_input_type_desc, TRUE, FALSE);
check_mft_get_input_current_type_(transform, expect_input_type_desc, FALSE, TRUE);
check_mft_get_input_stream_info(transform, S_OK, &input_info);
check_mft_get_output_stream_info(transform, S_OK, &output_info);

View file

@ -574,8 +574,18 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
{
FIXME("iface %p, id %#lx, type %p stub!\n", iface, id, type);
return E_NOTIMPL;
struct h264_decoder *decoder = impl_from_IMFTransform(iface);
HRESULT hr;
TRACE("iface %p, id %#lx, type %p\n", iface, id, type);
if (!decoder->input_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;
if (FAILED(hr = MFCreateMediaType(type)))
return hr;
return IMFMediaType_CopyAllItems(decoder->input_type, (IMFAttributes *)*type);
}
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
@ -583,7 +593,7 @@ static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD
struct h264_decoder *decoder = impl_from_IMFTransform(iface);
HRESULT hr;
FIXME("iface %p, id %#lx, type %p stub!\n", iface, id, type);
TRACE("iface %p, id %#lx, type %p\n", iface, id, type);
if (!decoder->output_type)
return MF_E_TRANSFORM_TYPE_NOT_SET;