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
94b2db85
Commit
94b2db85
authored
Oct 05, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Set VIDEO_ZOOM_RECT on SetVideoPosition().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f859a4d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
presenter.c
dlls/evr/presenter.c
+28
-1
evr.c
dlls/evr/tests/evr.c
+1
-5
No files found.
dlls/evr/presenter.c
View file @
94b2db85
...
...
@@ -357,6 +357,25 @@ static ULONG WINAPI video_presenter_service_client_Release(IMFTopologyServiceLoo
return
IMFVideoPresenter_Release
(
&
presenter
->
IMFVideoPresenter_iface
);
}
static
void
video_presenter_set_mixer_rect
(
struct
video_presenter
*
presenter
)
{
IMFAttributes
*
attributes
;
HRESULT
hr
;
if
(
!
presenter
->
mixer
)
return
;
if
(
SUCCEEDED
(
IMFTransform_GetAttributes
(
presenter
->
mixer
,
&
attributes
)))
{
if
(
FAILED
(
hr
=
IMFAttributes_SetBlob
(
attributes
,
&
VIDEO_ZOOM_RECT
,
(
const
UINT8
*
)
&
presenter
->
src_rect
,
sizeof
(
presenter
->
src_rect
))))
{
WARN
(
"Failed to set zoom rectangle attribute, hr %#x.
\n
"
,
hr
);
}
IMFAttributes_Release
(
attributes
);
}
}
static
HRESULT
video_presenter_attach_mixer
(
struct
video_presenter
*
presenter
,
IMFTopologyServiceLookup
*
service_lookup
)
{
IMFVideoDeviceID
*
device_id
;
...
...
@@ -389,6 +408,8 @@ static HRESULT video_presenter_attach_mixer(struct video_presenter *presenter, I
presenter
->
mixer
=
NULL
;
}
video_presenter_set_mixer_rect
(
presenter
);
return
hr
;
}
...
...
@@ -528,7 +549,13 @@ static HRESULT WINAPI video_presenter_control_SetVideoPosition(IMFVideoDisplayCo
else
{
if
(
src_rect
)
presenter
->
src_rect
=
*
src_rect
;
{
if
(
memcmp
(
&
presenter
->
src_rect
,
src_rect
,
sizeof
(
*
src_rect
)))
{
presenter
->
src_rect
=
*
src_rect
;
video_presenter_set_mixer_rect
(
presenter
);
}
}
if
(
dst_rect
)
presenter
->
dst_rect
=
*
dst_rect
;
}
...
...
dlls/evr/tests/evr.c
View file @
94b2db85
...
...
@@ -1414,16 +1414,13 @@ static void test_presenter_video_position(void)
hr
=
IMFAttributes_GetCount
(
mixer_attributes
,
&
count
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
count
==
1
,
"Unexpected count %u.
\n
"
,
count
);
memset
(
&
src_rect
,
0
,
sizeof
(
src_rect
));
hr
=
IMFAttributes_GetBlob
(
mixer_attributes
,
&
VIDEO_ZOOM_RECT
,
(
UINT8
*
)
&
src_rect
,
sizeof
(
src_rect
),
NULL
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
src_rect
.
left
==
0
.
0
f
&&
src_rect
.
top
==
0
.
0
f
&&
src_rect
.
right
==
1
.
0
f
&&
src_rect
.
bottom
==
1
.
0
f
,
"Unexpected source rectangle.
\n
"
);
}
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoDisplayControl
,
(
void
**
)
&
display_control
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1505,11 +1502,10 @@ todo_wine {
/* Presenter updates mixer attribute. */
memset
(
&
src_rect
,
0
,
sizeof
(
src_rect
));
hr
=
IMFAttributes_GetBlob
(
mixer_attributes
,
&
VIDEO_ZOOM_RECT
,
(
UINT8
*
)
&
src_rect
,
sizeof
(
src_rect
),
NULL
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
src_rect
.
left
==
0
.
1
f
&&
src_rect
.
top
==
0
.
2
f
&&
src_rect
.
right
==
0
.
8
f
&&
src_rect
.
bottom
==
0
.
9
f
,
"Unexpected source rectangle.
\n
"
);
}
hr
=
IMFVideoDisplayControl_GetVideoPosition
(
display_control
,
&
src_rect
,
&
dst_rect
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
src_rect
.
left
==
0
.
1
f
&&
src_rect
.
top
==
0
.
2
f
&&
src_rect
.
right
==
0
.
8
f
&&
...
...
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