winegstreamer: Implement H264 decoder GetOutputCurrentType.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3f1036b61b
commit
a7c6062315
|
@ -6659,7 +6659,6 @@ static void test_h264_decoder(void)
|
||||||
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
|
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type);
|
||||||
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#lx\n", hr);
|
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#lx\n", hr);
|
||||||
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
||||||
todo_wine
|
|
||||||
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputCurrentType returned %#lx\n", hr);
|
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputCurrentType returned %#lx\n", hr);
|
||||||
|
|
||||||
/* setting output media type first doesn't work */
|
/* setting output media type first doesn't work */
|
||||||
|
@ -6783,14 +6782,10 @@ static void test_h264_decoder(void)
|
||||||
ok(ret == 1, "Release returned %lu\n", ret);
|
ok(ret == 1, "Release returned %lu\n", ret);
|
||||||
|
|
||||||
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "GetOutputCurrentType returned %#lx\n", hr);
|
ok(hr == S_OK, "GetOutputCurrentType returned %#lx\n", hr);
|
||||||
if (hr != S_OK) MFCreateMediaType(&media_type);
|
|
||||||
todo_wine
|
|
||||||
check_media_type(media_type, is_win7 ? output_type_desc_win7 : output_type_desc, -1);
|
check_media_type(media_type, is_win7 ? output_type_desc_win7 : output_type_desc, -1);
|
||||||
ret = IMFMediaType_Release(media_type);
|
ret = IMFMediaType_Release(media_type);
|
||||||
ok(ret == 0, "Release returned %lu\n", ret);
|
ok(ret == 0, "Release returned %lu\n", ret);
|
||||||
|
|
||||||
flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE;
|
flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE;
|
||||||
memset(&input_info, 0xcd, sizeof(input_info));
|
memset(&input_info, 0xcd, sizeof(input_info));
|
||||||
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
|
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
|
||||||
|
@ -6918,10 +6913,7 @@ static void test_h264_decoder(void)
|
||||||
|
|
||||||
/* current output type is still the one we selected */
|
/* current output type is still the one we selected */
|
||||||
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type);
|
||||||
todo_wine
|
|
||||||
ok(hr == S_OK, "GetOutputCurrentType returned %#lx\n", hr);
|
ok(hr == S_OK, "GetOutputCurrentType returned %#lx\n", hr);
|
||||||
if (hr != S_OK) MFCreateMediaType(&media_type);
|
|
||||||
todo_wine
|
|
||||||
check_media_type(media_type, is_win7 ? output_type_desc_win7 : output_type_desc, -1);
|
check_media_type(media_type, is_win7 ? output_type_desc_win7 : output_type_desc, -1);
|
||||||
hr = IMFMediaType_GetItemType(media_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, NULL);
|
hr = IMFMediaType_GetItemType(media_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, NULL);
|
||||||
ok(hr == MF_E_ATTRIBUTENOTFOUND, "GetItemType returned %#lx\n", hr);
|
ok(hr == MF_E_ATTRIBUTENOTFOUND, "GetItemType returned %#lx\n", hr);
|
||||||
|
|
|
@ -460,8 +460,18 @@ static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD i
|
||||||
|
|
||||||
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||||
{
|
{
|
||||||
|
struct h264_decoder *decoder = impl_from_IMFTransform(iface);
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
FIXME("iface %p, id %#lx, type %p stub!\n", iface, id, type);
|
FIXME("iface %p, id %#lx, type %p stub!\n", iface, id, type);
|
||||||
return E_NOTIMPL;
|
|
||||||
|
if (!decoder->output_type)
|
||||||
|
return MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||||
|
|
||||||
|
if (FAILED(hr = MFCreateMediaType(type)))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
return IMFMediaType_CopyAllItems(decoder->output_type, (IMFAttributes *)*type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
|
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
|
||||||
|
|
Loading…
Reference in New Issue