Commit 99707422 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

winegstreamer: Expose the MF_MT_VIDEO_ROTATION attribute.

The stricter checks imposed by commit ac39b313, while being valid in general, require that media source attaches to media types the attributes that application can request. This patch exposes the MF_MT_VIDEO_ROTATION attribute, which is for example requested by Legend of Keepers. Signed-off-by: 's avatarGiovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent de89ce1b
......@@ -664,6 +664,7 @@ static void test_source_resolver(void)
HRESULT hr;
GUID guid;
float rate;
UINT32 rotation;
if (!pMFCreateSourceResolver)
{
......@@ -849,6 +850,12 @@ static void test_source_resolver(void)
ok(hr == S_OK, "Failed to get media sub type, hr %#x.\n", hr);
todo_wine
ok(IsEqualGUID(&guid, &MFVideoFormat_M4S2), "Unexpected sub type %s.\n", debugstr_guid(&guid));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_ROTATION, &rotation);
ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "Failed to get rotation, hr %#x.\n", hr);
if (hr == S_OK)
ok(rotation == MFVideoRotationFormat_0, "Got wrong rotation %u.\n", rotation);
IMFMediaType_Release(media_type);
hr = IMFPresentationDescriptor_SelectStream(descriptor, 0);
......
......@@ -596,6 +596,7 @@ static IMFMediaType *mf_media_type_from_wg_format_video(const struct wg_format *
make_uint64(format->u.video.fps_n, format->u.video.fps_d));
IMFMediaType_SetUINT32(type, &MF_MT_COMPRESSED, FALSE);
IMFMediaType_SetUINT32(type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE);
IMFMediaType_SetUINT32(type, &MF_MT_VIDEO_ROTATION, MFVideoRotationFormat_0);
return type;
}
......
......@@ -449,6 +449,14 @@ typedef enum _MFWaveFormatExConvertFlags
MFWaveFormatExConvertFlag_ForceExtensible = 1,
} MFWaveFormatExConvertFlags;
typedef enum _MFVideoRotationFormat
{
MFVideoRotationFormat_0 = 0,
MFVideoRotationFormat_90 = 90,
MFVideoRotationFormat_180 = 180,
MFVideoRotationFormat_270 = 270
} MFVideoRotationFormat;
enum _MFT_ENUM_FLAG
{
MFT_ENUM_FLAG_SYNCMFT = 0x00000001,
......
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