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
0f18e5f8
Commit
0f18e5f8
authored
Apr 07, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Implement GetVideoWindow().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e3ca290a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
player.c
dlls/mfplay/player.c
+12
-6
mfplay.c
dlls/mfplay/tests/mfplay.c
+7
-1
No files found.
dlls/mfplay/player.c
View file @
0f18e5f8
...
...
@@ -69,6 +69,7 @@ struct media_player
IMFSourceResolver
*
resolver
;
MFP_CREATION_OPTIONS
options
;
HWND
event_window
;
HWND
output_window
;
};
struct
generic_event
...
...
@@ -862,11 +863,15 @@ static HRESULT WINAPI media_player_GetAspectRatioMode(IMFPMediaPlayer *iface,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
media_player_GetVideoWindow
(
IMFPMediaPlayer
*
iface
,
HWND
*
hwnd
)
static
HRESULT
WINAPI
media_player_GetVideoWindow
(
IMFPMediaPlayer
*
iface
,
HWND
*
window
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
hwnd
);
struct
media_player
*
player
=
impl_from_IMFPMediaPlayer
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
window
);
*
window
=
player
->
output_window
;
return
S_OK
;
}
static
HRESULT
WINAPI
media_player_UpdateVideo
(
IMFPMediaPlayer
*
iface
)
...
...
@@ -1166,12 +1171,12 @@ static const IMFAsyncCallbackVtbl media_player_events_callback_vtbl =
};
HRESULT
WINAPI
MFPCreateMediaPlayer
(
const
WCHAR
*
url
,
BOOL
start_playback
,
MFP_CREATION_OPTIONS
options
,
IMFPMediaPlayerCallback
*
callback
,
HWND
hwnd
,
IMFPMediaPlayer
**
player
)
IMFPMediaPlayerCallback
*
callback
,
HWND
window
,
IMFPMediaPlayer
**
player
)
{
struct
media_player
*
object
;
HRESULT
hr
;
TRACE
(
"%s, %d, %#x, %p, %p, %p.
\n
"
,
debugstr_w
(
url
),
start_playback
,
options
,
callback
,
hwnd
,
player
);
TRACE
(
"%s, %d, %#x, %p, %p, %p.
\n
"
,
debugstr_w
(
url
),
start_playback
,
options
,
callback
,
window
,
player
);
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
...
...
@@ -1184,9 +1189,10 @@ HRESULT WINAPI MFPCreateMediaPlayer(const WCHAR *url, BOOL start_playback, MFP_C
object
->
events_callback
.
lpVtbl
=
&
media_player_events_callback_vtbl
;
object
->
refcount
=
1
;
object
->
callback
=
callback
;
object
->
options
=
options
;
if
(
object
->
callback
)
IMFPMediaPlayerCallback_AddRef
(
object
->
callback
);
object
->
options
=
options
;
object
->
output_window
=
window
;
if
(
FAILED
(
hr
=
CreatePropertyStore
(
&
object
->
propstore
)))
goto
failed
;
if
(
FAILED
(
hr
=
MFCreateSourceResolver
(
&
object
->
resolver
)))
...
...
dlls/mfplay/tests/mfplay.c
View file @
0f18e5f8
...
...
@@ -83,6 +83,7 @@ static void test_create_player(void)
IPropertyStore
*
propstore
;
IMFPMediaPlayer
*
player
;
IUnknown
*
unk
,
*
unk2
;
HWND
window
;
HRESULT
hr
;
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
player
);
...
...
@@ -108,8 +109,13 @@ static void test_create_player(void)
IMFPMediaPlayer_Release
(
player
);
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
&
callback
,
NULL
,
&
player
);
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
&
callback
,
(
HWND
)
0x1
,
&
player
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_GetVideoWindow
(
player
,
&
window
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
window
==
(
HWND
)
0x1
,
"Unexpected window.
\n
"
);
IMFPMediaPlayer_Release
(
player
);
}
...
...
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