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
d0c996b2
Commit
d0c996b2
authored
Feb 17, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/mediatype: Map rcSource to MF_MT_(PAN_SCAN|MINIMUM_DISPLAY)_APERTURE.
parent
66ea15f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
19 deletions
+14
-19
mediatype.c
dlls/mfplat/mediatype.c
+14
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+0
-19
No files found.
dlls/mfplat/mediatype.c
View file @
d0c996b2
...
...
@@ -3794,6 +3794,20 @@ HRESULT WINAPI MFInitMediaTypeFromVideoInfoHeader2(IMFMediaType *media_type, con
if
(
vih
->
bmiHeader
.
biSizeImage
)
mediatype_set_uint32
(
media_type
,
&
MF_MT_SAMPLE_SIZE
,
vih
->
bmiHeader
.
biSizeImage
,
&
hr
);
if
(
vih
->
rcSource
.
left
||
vih
->
rcSource
.
top
||
vih
->
rcSource
.
right
||
vih
->
rcSource
.
bottom
)
{
MFVideoArea
aperture
=
{{
0
}};
aperture
.
OffsetX
.
value
=
vih
->
rcSource
.
left
;
aperture
.
OffsetY
.
value
=
vih
->
rcSource
.
top
;
aperture
.
Area
.
cx
=
vih
->
rcSource
.
right
-
vih
->
rcSource
.
left
;
aperture
.
Area
.
cy
=
vih
->
rcSource
.
bottom
-
vih
->
rcSource
.
top
;
mediatype_set_uint32
(
media_type
,
&
MF_MT_PAN_SCAN_ENABLED
,
1
,
&
hr
);
mediatype_set_blob
(
media_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
hr
);
mediatype_set_blob
(
media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
hr
);
}
return
hr
;
}
...
...
dlls/mfplat/tests/mfplat.c
View file @
d0c996b2
...
...
@@ -10084,28 +10084,20 @@ static void test_MFInitMediaTypeFromVideoInfoHeader(void)
value32
=
0xdeadbeef
;
memset
(
&
aperture
,
0xcd
,
sizeof
(
aperture
));
hr
=
IMFMediaType_GetBlob
(
media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
sizeof
(
aperture
),
"got %d.
\n
"
,
value32
);
todo_wine
ok
(
!
memcmp
(
&
aperture
,
&
expect_aperture
,
sizeof
(
aperture
)),
"unexpected aperture
\n
"
);
value32
=
0xdeadbeef
;
hr
=
IMFMediaType_GetUINT32
(
media_type
,
&
MF_MT_PAN_SCAN_ENABLED
,
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
1
,
"got %d.
\n
"
,
(
UINT32
)
value32
);
value32
=
0xdeadbeef
;
memset
(
&
aperture
,
0xcd
,
sizeof
(
aperture
));
hr
=
IMFMediaType_GetBlob
(
media_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
sizeof
(
aperture
),
"got %d.
\n
"
,
value32
);
todo_wine
ok
(
!
memcmp
(
&
aperture
,
&
expect_aperture
,
sizeof
(
aperture
)),
"unexpected aperture
\n
"
);
hr
=
IMFMediaType_GetItem
(
media_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
NULL
);
...
...
@@ -10407,28 +10399,20 @@ static void test_MFInitMediaTypeFromVideoInfoHeader2(void)
value32
=
0xdeadbeef
;
memset
(
&
aperture
,
0xcd
,
sizeof
(
aperture
));
hr
=
IMFMediaType_GetBlob
(
media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
sizeof
(
aperture
),
"got %d.
\n
"
,
value32
);
todo_wine
ok
(
!
memcmp
(
&
aperture
,
&
expect_aperture
,
sizeof
(
aperture
)),
"unexpected aperture
\n
"
);
value32
=
0xdeadbeef
;
hr
=
IMFMediaType_GetUINT32
(
media_type
,
&
MF_MT_PAN_SCAN_ENABLED
,
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
1
,
"got %d.
\n
"
,
(
UINT32
)
value32
);
value32
=
0xdeadbeef
;
memset
(
&
aperture
,
0xcd
,
sizeof
(
aperture
));
hr
=
IMFMediaType_GetBlob
(
media_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
sizeof
(
aperture
),
"got %d.
\n
"
,
value32
);
todo_wine
ok
(
!
memcmp
(
&
aperture
,
&
expect_aperture
,
sizeof
(
aperture
)),
"unexpected aperture
\n
"
);
hr
=
IMFMediaType_GetItem
(
media_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
NULL
);
...
...
@@ -10706,11 +10690,8 @@ static void test_MFInitMediaTypeFromAMMediaType(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
value32
==
12345678
,
"got %d.
\n
"
,
(
UINT32
)
value32
);
hr
=
IMFMediaType_GetBlob
(
media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value32
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value32
==
sizeof
(
aperture
),
"got %d.
\n
"
,
value32
);
todo_wine
ok
(
!
memcmp
(
&
aperture
,
&
expect_aperture
,
sizeof
(
aperture
)),
"unexpected aperture
\n
"
);
vih
.
bmiHeader
.
biHeight
=
24
;
...
...
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