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
5009e5da
Commit
5009e5da
authored
Mar 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Set shutdown state flag for presentation clock.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
15657f68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
8 deletions
+51
-8
session.c
dlls/mf/session.c
+24
-4
mf.c
dlls/mf/tests/mf.c
+27
-4
No files found.
dlls/mf/session.c
View file @
5009e5da
...
...
@@ -239,6 +239,7 @@ struct presentation_clock
float
rate
;
LONGLONG
frequency
;
CRITICAL_SECTION
cs
;
BOOL
is_shut_down
;
};
struct
quality_manager
...
...
@@ -3332,16 +3333,35 @@ static ULONG WINAPI present_clock_shutdown_Release(IMFShutdown *iface)
static
HRESULT
WINAPI
present_clock_shutdown_Shutdown
(
IMFShutdown
*
iface
)
{
FIXME
(
"%p.
\n
"
,
iface
);
struct
presentation_clock
*
clock
=
impl_from_IMFShutdown
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p.
\n
"
,
iface
);
EnterCriticalSection
(
&
clock
->
cs
);
clock
->
is_shut_down
=
TRUE
;
LeaveCriticalSection
(
&
clock
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
present_clock_shutdown_GetShutdownStatus
(
IMFShutdown
*
iface
,
MFSHUTDOWN_STATUS
*
status
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
status
);
struct
presentation_clock
*
clock
=
impl_from_IMFShutdown
(
iface
);
HRESULT
hr
=
S_OK
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
status
);
if
(
!
status
)
return
E_INVALIDARG
;
EnterCriticalSection
(
&
clock
->
cs
);
if
(
clock
->
is_shut_down
)
*
status
=
MFSHUTDOWN_COMPLETED
;
else
hr
=
MF_E_INVALIDREQUEST
;
LeaveCriticalSection
(
&
clock
->
cs
);
return
hr
;
}
static
const
IMFShutdownVtbl
presentclockshutdownvtbl
=
...
...
dlls/mf/tests/mf.c
View file @
5009e5da
...
...
@@ -1776,6 +1776,10 @@ static void test_presentation_clock(void)
ok
(
rate
==
1
.
0
f
,
"Unexpected rate.
\n
"
);
ok
(
!
thin
,
"Unexpected thinning.
\n
"
);
hr
=
IMFPresentationClock_GetState
(
clock
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Failed to get clock state, hr %#x.
\n
"
,
hr
);
ok
(
state
==
MFCLOCK_STATE_PAUSED
,
"Unexpected state %d.
\n
"
,
state
);
hr
=
IMFPresentationClock_Start
(
clock
,
0
);
ok
(
hr
==
S_OK
,
"Failed to stop, hr %#x.
\n
"
,
hr
);
...
...
@@ -1809,18 +1813,37 @@ static void test_presentation_clock(void)
/* Shutdown behavior. */
hr
=
IMFShutdown_GetShutdownStatus
(
shutdown
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFShutdown_GetShutdownStatus
(
shutdown
,
&
status
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFShutdown_Shutdown
(
shutdown
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
time_source
=
NULL
;
hr
=
IMFPresentationClock_GetTimeSource
(
clock
,
&
time_source
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!!
time_source
,
"Unexpected instance %p.
\n
"
,
time_source
);
IMFPresentationTimeSource_Release
(
time_source
);
hr
=
IMFPresentationClock_GetTime
(
clock
,
&
time
);
ok
(
hr
==
S_OK
,
"Failed to get time, hr %#x.
\n
"
,
hr
);
hr
=
IMFShutdown_GetShutdownStatus
(
shutdown
,
&
status
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Failed to get status, hr %#x.
\n
"
,
hr
);
ok
(
status
==
MFSHUTDOWN_COMPLETED
,
"Unexpected status.
\n
"
);
}
hr
=
IMFPresentationClock_Start
(
clock
,
0
);
ok
(
hr
==
S_OK
,
"Failed to start the clock, hr %#x.
\n
"
,
hr
);
hr
=
IMFShutdown_GetShutdownStatus
(
shutdown
,
&
status
);
ok
(
hr
==
S_OK
,
"Failed to get status, hr %#x.
\n
"
,
hr
);
ok
(
status
==
MFSHUTDOWN_COMPLETED
,
"Unexpected status.
\n
"
);
hr
=
IMFShutdown_Shutdown
(
shutdown
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFShutdown_Release
(
shutdown
);
IMFPresentationClock_Release
(
clock
);
...
...
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