mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
mfreadwrite/reader: Fixup MFVideoFormat_ABGR32 subtype to enumerate the video processor.
This commit is contained in:
parent
f131faaa5a
commit
f0e77b163d
2 changed files with 14 additions and 1 deletions
|
@ -41,6 +41,8 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
|
||||
|
||||
DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8);
|
||||
|
||||
struct stream_response
|
||||
{
|
||||
struct list entry;
|
||||
|
@ -2036,6 +2038,17 @@ static HRESULT source_reader_create_transform(struct source_reader *reader, BOOL
|
|||
entry->min_buffer_size = max(entry->min_buffer_size, bytes_per_second);
|
||||
}
|
||||
|
||||
if (IsEqualGUID(&out_type.guidMajorType, &MFMediaType_Video) && IsEqualGUID(&out_type.guidSubtype, &MFVideoFormat_ABGR32)
|
||||
&& IsEqualGUID(&category, &MFT_CATEGORY_VIDEO_PROCESSOR))
|
||||
{
|
||||
/* The video processor isn't registered for MFVideoFormat_ABGR32, and native even only supports that format when
|
||||
* D3D-enabled, we still want to instantiate a video processor in such case, so fixup the subtype for MFTEnumEx.
|
||||
*/
|
||||
WARN("Fixing up MFVideoFormat_ABGR32 subtype for the video processor\n");
|
||||
out_type.guidSubtype = MFVideoFormat_RGB32;
|
||||
}
|
||||
|
||||
|
||||
count = 0;
|
||||
if (SUCCEEDED(hr = MFTEnumEx(category, 0, &in_type, allow_processor ? NULL : &out_type, &activates, &count)))
|
||||
{
|
||||
|
|
|
@ -3417,7 +3417,7 @@ static void test_source_reader_transforms_d3d11(void)
|
|||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
init_media_type(media_type, abgr32_stream_type_desc, -1);
|
||||
hr = IMFSourceReader_SetCurrentMediaType(reader, 0, NULL, media_type);
|
||||
todo_wine ok(hr == S_OK || broken(hr == MF_E_INVALIDMEDIATYPE) /* needs a GPU */, "Unexpected hr %#lx.\n", hr);
|
||||
ok(hr == S_OK || broken(hr == MF_E_INVALIDMEDIATYPE) /* needs a GPU */, "Unexpected hr %#lx.\n", hr);
|
||||
IMFMediaType_Release(media_type);
|
||||
|
||||
if (hr == S_OK)
|
||||
|
|
Loading…
Reference in a new issue