Module: wine Branch: master Commit: 73b6049c8a320d24d5f6cc93274cee39aa93b36c URL: https://gitlab.winehq.org/wine/wine/-/commit/73b6049c8a320d24d5f6cc93274cee3...
Author: Rémi Bernon rbernon@codeweavers.com Date: Fri Apr 26 11:52:49 2024 +0200
winegstreamer: Set other aperture attributes on video media types.
---
dlls/mf/tests/transform.c | 20 ++++++++++---------- dlls/winegstreamer/mfplat.c | 4 ++++ dlls/winegstreamer/video_decoder.c | 16 ++++++++++++++++ 3 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 6a4653cccee..d1d52d62458 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -4090,8 +4090,8 @@ static void test_h264_decoder(void) ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1), ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16), - ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16, .todo = TRUE), - ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16, .todo = TRUE), + ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16), + ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16), }, { ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), @@ -4106,8 +4106,8 @@ static void test_h264_decoder(void) ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1), ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16), - ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16, .todo = TRUE), - ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16, .todo = TRUE), + ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16), + ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16), }, { ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), @@ -4122,8 +4122,8 @@ static void test_h264_decoder(void) ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1), ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16), - ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16, .todo = TRUE), - ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16, .todo = TRUE), + ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16), + ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16), }, { ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), @@ -4138,8 +4138,8 @@ static void test_h264_decoder(void) ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1), ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16), - ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16, .todo = TRUE), - ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16, .todo = TRUE), + ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16), + ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16), }, { ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), @@ -4154,8 +4154,8 @@ static void test_h264_decoder(void) ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1), ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1), ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16), - ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16, .todo = TRUE), - ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16, .todo = TRUE), + ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16), + ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16), }, }; const MFT_OUTPUT_STREAM_INFO initial_output_info = diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index 2344e22b12b..bba5df5e1b7 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -545,6 +545,10 @@ static IMFMediaType *mf_media_type_from_wg_format_video(const struct wg_format *
IMFMediaType_SetBlob(type, &MF_MT_MINIMUM_DISPLAY_APERTURE, (BYTE *)&aperture, sizeof(aperture)); + IMFMediaType_SetBlob(type, &MF_MT_GEOMETRIC_APERTURE, + (BYTE *)&aperture, sizeof(aperture)); + IMFMediaType_SetBlob(type, &MF_MT_PAN_SCAN_APERTURE, + (BYTE *)&aperture, sizeof(aperture)); }
return type; diff --git a/dlls/winegstreamer/video_decoder.c b/dlls/winegstreamer/video_decoder.c index 8cdab7cdb8b..676f3336b91 100644 --- a/dlls/winegstreamer/video_decoder.c +++ b/dlls/winegstreamer/video_decoder.c @@ -186,6 +186,22 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI goto done; }
+ if (SUCCEEDED(IMFMediaType_GetBlob(stream_type, &MF_MT_GEOMETRIC_APERTURE, + (BYTE *)&aperture, sizeof(aperture), &value))) + { + if (FAILED(hr = IMFVideoMediaType_SetBlob(video_type, &MF_MT_GEOMETRIC_APERTURE, + (BYTE *)&aperture, sizeof(aperture)))) + goto done; + } + + if (SUCCEEDED(IMFMediaType_GetBlob(stream_type, &MF_MT_PAN_SCAN_APERTURE, + (BYTE *)&aperture, sizeof(aperture), &value))) + { + if (FAILED(hr = IMFVideoMediaType_SetBlob(video_type, &MF_MT_PAN_SCAN_APERTURE, + (BYTE *)&aperture, sizeof(aperture)))) + goto done; + } + done: if (SUCCEEDED(hr)) *media_type = (IMFMediaType *)video_type;