Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7980d049
Commit
7980d049
authored
Oct 26, 2021
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Invalidate media type on destination rectangle change.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a1c057c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
presenter.c
dlls/evr/presenter.c
+7
-1
evr.c
dlls/evr/tests/evr.c
+10
-9
No files found.
dlls/evr/presenter.c
View file @
7980d049
...
...
@@ -1295,8 +1295,14 @@ static HRESULT WINAPI video_presenter_control_SetVideoPosition(IMFVideoDisplayCo
video_presenter_set_mixer_rect
(
presenter
);
}
}
if
(
dst_rect
)
if
(
dst_rect
&&
!
EqualRect
(
dst_rect
,
&
presenter
->
dst_rect
))
{
presenter
->
dst_rect
=
*
dst_rect
;
hr
=
video_presenter_invalidate_media_type
(
presenter
);
/* Mixer's input type hasn't been configured yet, this is not an error. */
if
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
)
hr
=
S_OK
;
/* FIXME: trigger repaint */
}
}
LeaveCriticalSection
(
&
presenter
->
cs
);
...
...
dlls/evr/tests/evr.c
View file @
7980d049
...
...
@@ -2190,9 +2190,6 @@ static void test_presenter_media_type(void)
hr
=
IMFTransform_ProcessMessage
(
mixer
,
MFT_MESSAGE_SET_D3D_MANAGER
,
(
ULONG_PTR
)
manager
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
mixer
,
0
,
input_type
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -2204,12 +2201,20 @@ static void test_presenter_media_type(void)
hr
=
IMFVideoDisplayControl_SetVideoWindow
(
display_control
,
window
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Set destination rectangle before mixer types are configured. */
SetRect
(
&
dst
,
0
,
0
,
101
,
51
);
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
NULL
,
&
dst
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
mixer
,
0
,
input_type
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_INVALIDATEMEDIATYPE
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
get_output_aperture
(
mixer
,
&
frame_size
,
&
aperture
);
ok
(
frame_size
.
cx
==
10
0
&&
frame_size
.
cy
==
50
,
"Unexpected frame size %u x %u.
\n
"
,
frame_size
.
cx
,
frame_size
.
cy
);
ok
(
aperture
.
Area
.
cx
==
10
0
&&
aperture
.
Area
.
cy
==
50
,
"Unexpected size %u x %u.
\n
"
,
aperture
.
Area
.
cx
,
aperture
.
Area
.
cy
);
ok
(
frame_size
.
cx
==
10
1
&&
frame_size
.
cy
==
51
,
"Unexpected frame size %u x %u.
\n
"
,
frame_size
.
cx
,
frame_size
.
cy
);
ok
(
aperture
.
Area
.
cx
==
10
1
&&
aperture
.
Area
.
cy
==
51
,
"Unexpected size %u x %u.
\n
"
,
aperture
.
Area
.
cx
,
aperture
.
Area
.
cy
);
ok
(
!
aperture
.
OffsetX
.
value
&&
!
aperture
.
OffsetX
.
fract
&&
!
aperture
.
OffsetY
.
value
&&
!
aperture
.
OffsetY
.
fract
,
"Unexpected offset %u x %u.
\n
"
,
aperture
.
OffsetX
.
value
,
aperture
.
OffsetY
.
value
);
...
...
@@ -2218,10 +2223,8 @@ static void test_presenter_media_type(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
get_output_aperture
(
mixer
,
&
frame_size
,
&
aperture
);
todo_wine
{
ok
(
frame_size
.
cx
==
199
&&
frame_size
.
cy
==
298
,
"Unexpected frame size %u x %u.
\n
"
,
frame_size
.
cx
,
frame_size
.
cy
);
ok
(
aperture
.
Area
.
cx
==
199
&&
aperture
.
Area
.
cy
==
298
,
"Unexpected size %u x %u.
\n
"
,
aperture
.
Area
.
cx
,
aperture
.
Area
.
cy
);
}
ok
(
!
aperture
.
OffsetX
.
value
&&
!
aperture
.
OffsetX
.
fract
&&
!
aperture
.
OffsetY
.
value
&&
!
aperture
.
OffsetY
.
fract
,
"Unexpected offset %u x %u.
\n
"
,
aperture
.
OffsetX
.
value
,
aperture
.
OffsetY
.
value
);
...
...
@@ -2229,10 +2232,8 @@ todo_wine {
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
get_output_aperture
(
mixer
,
&
frame_size
,
&
aperture
);
todo_wine
{
ok
(
frame_size
.
cx
==
199
&&
frame_size
.
cy
==
298
,
"Unexpected frame size %u x %u.
\n
"
,
frame_size
.
cx
,
frame_size
.
cy
);
ok
(
aperture
.
Area
.
cx
==
199
&&
aperture
.
Area
.
cy
==
298
,
"Unexpected size %u x %u.
\n
"
,
aperture
.
Area
.
cx
,
aperture
.
Area
.
cy
);
}
ok
(
!
aperture
.
OffsetX
.
value
&&
!
aperture
.
OffsetX
.
fract
&&
!
aperture
.
OffsetY
.
value
&&
!
aperture
.
OffsetY
.
fract
,
"Unexpected offset %u x %u.
\n
"
,
aperture
.
OffsetX
.
value
,
aperture
.
OffsetY
.
value
);
...
...
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