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
39d177b8
Commit
39d177b8
authored
Jan 29, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfmediaengine: Use presentation clock interface from the session.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
be3bab5e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
main.c
dlls/mfmediaengine/main.c
+11
-7
No files found.
dlls/mfmediaengine/main.c
View file @
39d177b8
...
@@ -126,7 +126,7 @@ struct media_engine
...
@@ -126,7 +126,7 @@ struct media_engine
MF_MEDIA_ENGINE_READY
ready_state
;
MF_MEDIA_ENGINE_READY
ready_state
;
MF_MEDIA_ENGINE_PRELOAD
preload
;
MF_MEDIA_ENGINE_PRELOAD
preload
;
IMFMediaSession
*
session
;
IMFMediaSession
*
session
;
IMFClock
*
clock
;
IMF
Presentation
Clock
*
clock
;
IMFSourceResolver
*
resolver
;
IMFSourceResolver
*
resolver
;
BSTR
current_source
;
BSTR
current_source
;
struct
video_frame
video_frame
;
struct
video_frame
video_frame
;
...
@@ -982,7 +982,7 @@ static void free_media_engine(struct media_engine *engine)
...
@@ -982,7 +982,7 @@ static void free_media_engine(struct media_engine *engine)
if
(
engine
->
callback
)
if
(
engine
->
callback
)
IMFMediaEngineNotify_Release
(
engine
->
callback
);
IMFMediaEngineNotify_Release
(
engine
->
callback
);
if
(
engine
->
clock
)
if
(
engine
->
clock
)
IMFClock_Release
(
engine
->
clock
);
IMF
Presentation
Clock_Release
(
engine
->
clock
);
if
(
engine
->
session
)
if
(
engine
->
session
)
IMFMediaSession_Release
(
engine
->
session
);
IMFMediaSession_Release
(
engine
->
session
);
if
(
engine
->
attributes
)
if
(
engine
->
attributes
)
...
@@ -1208,16 +1208,14 @@ static BOOL WINAPI media_engine_IsSeeking(IMFMediaEngine *iface)
...
@@ -1208,16 +1208,14 @@ static BOOL WINAPI media_engine_IsSeeking(IMFMediaEngine *iface)
static
double
WINAPI
media_engine_GetCurrentTime
(
IMFMediaEngine
*
iface
)
static
double
WINAPI
media_engine_GetCurrentTime
(
IMFMediaEngine
*
iface
)
{
{
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
struct
media_engine
*
engine
=
impl_from_IMFMediaEngine
(
iface
);
LONGLONG
clocktime
;
double
ret
=
0
.
0
;
double
ret
=
0
.
0
;
MFTIME
sys
time
;
MFTIME
clock
time
;
TRACE
(
"%p.
\n
"
,
iface
);
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
engine
->
cs
);
EnterCriticalSection
(
&
engine
->
cs
);
if
(
SUCCEEDED
(
IMF
Clock_GetCorrelatedTime
(
engine
->
clock
,
0
,
&
clocktime
,
&
sys
time
)))
if
(
SUCCEEDED
(
IMF
PresentationClock_GetTime
(
engine
->
clock
,
&
clock
time
)))
{
{
/* Assume 100ns clock. */
ret
=
(
double
)
clocktime
/
10000000
.
0
;
ret
=
(
double
)
clocktime
/
10000000
.
0
;
}
}
LeaveCriticalSection
(
&
engine
->
cs
);
LeaveCriticalSection
(
&
engine
->
cs
);
...
@@ -1854,6 +1852,7 @@ static HRESULT init_media_engine(DWORD flags, IMFAttributes *attributes, struct
...
@@ -1854,6 +1852,7 @@ static HRESULT init_media_engine(DWORD flags, IMFAttributes *attributes, struct
{
{
DXGI_FORMAT
output_format
;
DXGI_FORMAT
output_format
;
UINT64
playback_hwnd
;
UINT64
playback_hwnd
;
IMFClock
*
clock
;
HRESULT
hr
;
HRESULT
hr
;
engine
->
IMFMediaEngine_iface
.
lpVtbl
=
&
media_engine_vtbl
;
engine
->
IMFMediaEngine_iface
.
lpVtbl
=
&
media_engine_vtbl
;
...
@@ -1877,7 +1876,12 @@ static HRESULT init_media_engine(DWORD flags, IMFAttributes *attributes, struct
...
@@ -1877,7 +1876,12 @@ static HRESULT init_media_engine(DWORD flags, IMFAttributes *attributes, struct
if
(
FAILED
(
hr
=
MFCreateMediaSession
(
NULL
,
&
engine
->
session
)))
if
(
FAILED
(
hr
=
MFCreateMediaSession
(
NULL
,
&
engine
->
session
)))
return
hr
;
return
hr
;
if
(
FAILED
(
hr
=
IMFMediaSession_GetClock
(
engine
->
session
,
&
engine
->
clock
)))
if
(
FAILED
(
hr
=
IMFMediaSession_GetClock
(
engine
->
session
,
&
clock
)))
return
hr
;
hr
=
IMFClock_QueryInterface
(
clock
,
&
IID_IMFPresentationClock
,
(
void
**
)
&
engine
->
clock
);
IMFClock_Release
(
clock
);
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
if
(
FAILED
(
hr
=
IMFMediaSession_BeginGetEvent
(
engine
->
session
,
&
engine
->
session_events
,
NULL
)))
if
(
FAILED
(
hr
=
IMFMediaSession_BeginGetEvent
(
engine
->
session
,
&
engine
->
session_events
,
NULL
)))
...
...
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