Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7598556b
Commit
7598556b
authored
Mar 06, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Test that aperture is dropped with VIDEOINFOHEADER2.
But preserved with MFVIDEOFORMAT.
parent
4fdb45f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+46
-1
No files found.
dlls/mfplat/tests/mfplat.c
View file @
7598556b
...
...
@@ -7143,8 +7143,10 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void)
WAVEFORMATEXTENSIBLE
*
wave_format_ext
;
VIDEOINFOHEADER
*
video_info
;
WAVEFORMATEX
*
wave_format
;
IMFMediaType
*
media_type
;
IMFMediaType
*
media_type
,
*
other_type
;
AM_MEDIA_TYPE
am_type
;
MFVideoArea
*
area
;
UINT32
value32
;
HRESULT
hr
;
hr
=
MFCreateMediaType
(
&
media_type
);
...
...
@@ -7713,6 +7715,49 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void)
CoTaskMemFree
(
am_type
.
pbFormat
);
IMFMediaType_DeleteAllItems
(
media_type
);
/* aperture is lost with VIDEOINFOHEADER(2), preserved with MFVIDEOFORMAT */
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Video
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_SUBTYPE
,
&
MFVideoFormat_NV12
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT64
(
media_type
,
&
MF_MT_FRAME_SIZE
,
(
UINT64
)
1920
<<
32
|
1088
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetBlob
(
media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
));
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateMediaType
(
&
other_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_VideoInfo
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitMediaTypeFromAMMediaType
(
other_type
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_GetAllocatedBlob
(
other_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
**
)
&
area
,
&
value32
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaType_DeleteAllItems
(
other_type
);
CoTaskMemFree
(
am_type
.
pbFormat
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_VideoInfo2
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitMediaTypeFromAMMediaType
(
other_type
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_GetAllocatedBlob
(
other_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
**
)
&
area
,
&
value32
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IMFMediaType_DeleteAllItems
(
other_type
);
CoTaskMemFree
(
am_type
.
pbFormat
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_MFVideoFormat
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitMediaTypeFromAMMediaType
(
other_type
,
&
am_type
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_GetAllocatedBlob
(
other_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
**
)
&
area
,
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
CoTaskMemFree
(
area
);
IMFMediaType_DeleteAllItems
(
other_type
);
CoTaskMemFree
(
am_type
.
pbFormat
);
IMFMediaType_Release
(
other_type
);
IMFMediaType_Release
(
media_type
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment