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
f8537c5a
Commit
f8537c5a
authored
May 31, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Forward GetTime() calls to time source.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bd2e2141
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
9 deletions
+46
-9
session.c
dlls/mf/session.c
+19
-8
mf.c
dlls/mf/tests/mf.c
+27
-1
No files found.
dlls/mf/session.c
View file @
f8537c5a
...
...
@@ -842,15 +842,13 @@ static ULONG WINAPI present_clock_Release(IMFPresentationClock *iface)
static
HRESULT
WINAPI
present_clock_GetClockCharacteristics
(
IMFPresentationClock
*
iface
,
DWORD
*
flags
)
{
struct
presentation_clock
*
clock
=
impl_from_IMFPresentationClock
(
iface
);
HRESULT
hr
;
HRESULT
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
flags
);
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
time_source
)
hr
=
IMFPresentationTimeSource_GetClockCharacteristics
(
clock
->
time_source
,
flags
);
else
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
LeaveCriticalSection
(
&
clock
->
cs
);
return
hr
;
...
...
@@ -889,15 +887,13 @@ static HRESULT WINAPI present_clock_GetState(IMFPresentationClock *iface, DWORD
static
HRESULT
WINAPI
present_clock_GetProperties
(
IMFPresentationClock
*
iface
,
MFCLOCK_PROPERTIES
*
props
)
{
struct
presentation_clock
*
clock
=
impl_from_IMFPresentationClock
(
iface
);
HRESULT
hr
;
HRESULT
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
props
);
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
time_source
)
hr
=
IMFPresentationTimeSource_GetProperties
(
clock
->
time_source
,
props
);
else
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
LeaveCriticalSection
(
&
clock
->
cs
);
return
hr
;
...
...
@@ -939,6 +935,9 @@ static HRESULT WINAPI present_clock_GetTimeSource(IMFPresentationClock *iface,
TRACE
(
"%p, %p.
\n
"
,
iface
,
time_source
);
if
(
!
time_source
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
time_source
)
{
...
...
@@ -954,9 +953,21 @@ static HRESULT WINAPI present_clock_GetTimeSource(IMFPresentationClock *iface,
static
HRESULT
WINAPI
present_clock_GetTime
(
IMFPresentationClock
*
iface
,
MFTIME
*
time
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
time
);
struct
presentation_clock
*
clock
=
impl_from_IMFPresentationClock
(
iface
);
HRESULT
hr
=
MF_E_CLOCK_NO_TIME_SOURCE
;
MFTIME
systime
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
time
);
if
(
!
time
)
return
E_POINTER
;
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
time_source
)
hr
=
IMFPresentationTimeSource_GetCorrelatedTime
(
clock
->
time_source
,
0
,
time
,
&
systime
);
LeaveCriticalSection
(
&
clock
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
present_clock_AddClockStateSink
(
IMFPresentationClock
*
iface
,
IMFClockStateSink
*
state_sink
)
...
...
dlls/mf/tests/mf.c
View file @
f8537c5a
...
...
@@ -1431,10 +1431,10 @@ static void test_presentation_clock(void)
IMFRateControl
*
rate_control
;
IMFPresentationClock
*
clock
;
IMFShutdown
*
shutdown
;
MFTIME
systime
,
time
;
LONGLONG
clock_time
;
MFCLOCK_STATE
state
;
IMFTimer
*
timer
;
MFTIME
systime
;
unsigned
int
i
;
DWORD
value
;
HRESULT
hr
;
...
...
@@ -1448,9 +1448,21 @@ static void test_presentation_clock(void)
hr
=
IMFPresentationClock_GetTimeSource
(
clock
,
&
time_source
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetTimeSource
(
clock
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetClockCharacteristics
(
clock
,
&
value
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetClockCharacteristics
(
clock
,
NULL
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetTime
(
clock
,
&
time
);
ok
(
hr
==
MF_E_CLOCK_NO_TIME_SOURCE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetTime
(
clock
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
value
=
1
;
hr
=
IMFPresentationClock_GetContinuityKey
(
clock
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1538,6 +1550,20 @@ todo_wine
ok
(
state
==
clock_state_change
[
i
].
clock_state
,
"%u: unexpected state %d.
\n
"
,
i
,
state
);
}
/* Clock time stamps. */
hr
=
IMFPresentationClock_Start
(
clock
,
10
);
ok
(
hr
==
S_OK
,
"Failed to start presentation clock, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_Pause
(
clock
);
ok
(
hr
==
S_OK
,
"Failed to pause presentation clock, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationClock_GetTime
(
clock
,
&
time
);
ok
(
hr
==
S_OK
,
"Failed to get clock time, hr %#x.
\n
"
,
hr
);
hr
=
IMFPresentationTimeSource_GetCorrelatedTime
(
time_source
,
0
,
&
clock_time
,
&
systime
);
ok
(
hr
==
S_OK
,
"Failed to get time source time, hr %#x.
\n
"
,
hr
);
ok
(
time
==
clock_time
,
"Unexpected clock time.
\n
"
);
IMFPresentationTimeSource_Release
(
time_source
);
hr
=
IMFPresentationClock_QueryInterface
(
clock
,
&
IID_IMFRateControl
,
(
void
**
)
&
rate_control
);
...
...
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