Commit ae584ac6 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Use the H264 decoder to implement the IV50 decoder.

parent e1b21bf1
......@@ -222,7 +222,6 @@ F: dlls/winegstreamer/h264_decoder.c
F: dlls/winegstreamer/media_source.c
F: dlls/winegstreamer/mfplat.c
F: dlls/winegstreamer/resampler.c
F: dlls/winegstreamer/video_decoder.c
F: dlls/winegstreamer/video_processor.c
F: dlls/winegstreamer/wg_sample.c
F: dlls/winegstreamer/wg_transform.c
......
......@@ -19,7 +19,6 @@ SOURCES = \
resampler.c \
rsrc.rc \
unixlib.c \
video_decoder.c \
video_processor.c \
wg_allocator.c \
wg_format.c \
......
/* H264 Decoder Transform
/* Generic Video Decoder Transform
*
* Copyright 2022 Rémi Bernon for CodeWeavers
* Copyright 2023 Shaun Ren for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -109,7 +110,10 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder)
attrs.low_latency = !!low_latency;
if (!(decoder->wg_transform = wg_transform_create(&input_format, &output_format, &attrs)))
{
ERR("Failed to create transform with input major_type %u.\n", input_format.major_type);
return E_FAIL;
}
return S_OK;
}
......@@ -898,3 +902,32 @@ HRESULT h264_decoder_create(REFIID riid, void **out)
IMFTransform_Release(iface);
return hr;
}
extern GUID MFVideoFormat_IV50;
static const GUID *const iv50_decoder_input_types[] =
{
&MFVideoFormat_IV50,
};
static const GUID *const iv50_decoder_output_types[] =
{
&MFVideoFormat_YV12,
&MFVideoFormat_YUY2,
&MFVideoFormat_NV11,
&MFVideoFormat_NV12,
&MFVideoFormat_RGB32,
&MFVideoFormat_RGB24,
&MFVideoFormat_RGB565,
&MFVideoFormat_RGB555,
&MFVideoFormat_RGB8,
};
HRESULT WINAPI winegstreamer_create_video_decoder(IMFTransform **out)
{
TRACE("out %p.\n", out);
if (!init_gstreamer())
return E_FAIL;
return video_decoder_create_with_types(iv50_decoder_input_types, ARRAY_SIZE(iv50_decoder_input_types),
iv50_decoder_output_types, ARRAY_SIZE(iv50_decoder_output_types), out);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment