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
848f2a4b
Commit
848f2a4b
authored
Oct 25, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Update destination rectangle on SetVideoSourceRect().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98a91c2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
player.c
dlls/mfplay/player.c
+5
-2
mfplay.c
dlls/mfplay/tests/mfplay.c
+43
-0
No files found.
dlls/mfplay/player.c
View file @
848f2a4b
...
@@ -1373,13 +1373,16 @@ static HRESULT WINAPI media_player_SetVideoSourceRect(IMFPMediaPlayer *iface,
...
@@ -1373,13 +1373,16 @@ static HRESULT WINAPI media_player_SetVideoSourceRect(IMFPMediaPlayer *iface,
{
{
struct
media_player
*
player
=
impl_from_IMFPMediaPlayer
(
iface
);
struct
media_player
*
player
=
impl_from_IMFPMediaPlayer
(
iface
);
IMFVideoDisplayControl
*
display_control
;
IMFVideoDisplayControl
*
display_control
;
RECT
dst_rect
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
rect
);
TRACE
(
"%p, %p.
\n
"
,
iface
,
rect
);
if
(
SUCCEEDED
(
hr
=
media_player_get_display_control
(
player
,
&
display_control
)))
if
(
!
GetClientRect
(
player
->
output_window
,
&
dst_rect
))
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
else
if
(
SUCCEEDED
(
hr
=
media_player_get_display_control
(
player
,
&
display_control
)))
{
{
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
rect
,
NULL
);
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
rect
,
&
dst_rect
);
IMFVideoDisplayControl_Release
(
display_control
);
IMFVideoDisplayControl_Release
(
display_control
);
}
}
...
...
dlls/mfplay/tests/mfplay.c
View file @
848f2a4b
...
@@ -261,6 +261,49 @@ static void test_video_control(void)
...
@@ -261,6 +261,49 @@ static void test_video_control(void)
hr
=
IMFPMediaPlayer_SetVideoSourceRect
(
player
,
&
rect
);
hr
=
IMFPMediaPlayer_SetVideoSourceRect
(
player
,
&
rect
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetVideoSourceRect
(
player
,
NULL
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetBorderColor
(
player
,
0
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetAspectRatioMode
(
player
,
MFVideoARMode_None
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetVideoSourceRect
(
player
,
&
rect
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetBorderColor
(
player
,
&
color
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetAspectRatioMode
(
player
,
&
mode
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetIdealVideoSize
(
player
,
&
size
,
&
size
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetNativeVideoSize
(
player
,
&
size
,
&
size
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_UpdateVideo
(
player
);
todo_wine
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFPMediaPlayer_Release
(
player
);
/* No active media item, no output window.*/
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
player
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
rect
.
left
=
rect
.
top
=
0
.
0
f
;
rect
.
right
=
rect
.
bottom
=
1
.
0
f
;
hr
=
IMFPMediaPlayer_SetVideoSourceRect
(
player
,
&
rect
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetVideoSourceRect
(
player
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetBorderColor
(
player
,
0
);
hr
=
IMFPMediaPlayer_SetBorderColor
(
player
,
0
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
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