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
afe4b134
Commit
afe4b134
authored
Jan 27, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Simplify clock notification handling.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6a6fd98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
session.c
dlls/mf/session.c
+12
-18
No files found.
dlls/mf/session.c
View file @
afe4b134
...
...
@@ -1976,6 +1976,13 @@ static HRESULT clock_change_state(struct presentation_clock *clock, enum clock_c
/* CLOCK_CMD_PAUSE */
MFCLOCK_STATE_PAUSED
,
/* CLOCK_CMD_SET_RATE */
0
,
/* Unused */
};
static
const
enum
clock_notification
notifications
[
CLOCK_CMD_MAX
]
=
{
/* CLOCK_CMD_START */
CLOCK_NOTIFY_START
,
/* CLOCK_CMD_STOP */
CLOCK_NOTIFY_STOP
,
/* CLOCK_CMD_PAUSE */
CLOCK_NOTIFY_PAUSE
,
/* CLOCK_CMD_SET_RATE */
CLOCK_NOTIFY_SET_RATE
,
};
enum
clock_notification
notification
;
struct
clock_sink
*
sink
;
IUnknown
*
notify_object
;
...
...
@@ -1994,26 +2001,13 @@ static HRESULT clock_change_state(struct presentation_clock *clock, enum clock_c
system_time
=
MFGetSystemTime
();
switch
(
command
)
if
(
command
==
CLOCK_CMD_START
&&
clock
->
state
==
MFCLOCK_STATE_PAUSED
&&
param
.
u
.
offset
==
PRESENTATION_CURRENT_POSITION
)
{
case
CLOCK_CMD_START
:
if
(
clock
->
state
==
MFCLOCK_STATE_PAUSED
&&
param
.
u
.
offset
==
PRESENTATION_CURRENT_POSITION
)
notification
=
CLOCK_NOTIFY_RESTART
;
else
notification
=
CLOCK_NOTIFY_START
;
break
;
case
CLOCK_CMD_STOP
:
notification
=
CLOCK_NOTIFY_STOP
;
break
;
case
CLOCK_CMD_PAUSE
:
notification
=
CLOCK_NOTIFY_PAUSE
;
break
;
case
CLOCK_CMD_SET_RATE
:
notification
=
CLOCK_NOTIFY_SET_RATE
;
break
;
default:
;
notification
=
CLOCK_NOTIFY_RESTART
;
}
else
notification
=
notifications
[
command
];
if
(
FAILED
(
hr
=
clock_call_state_change
(
system_time
,
param
,
notification
,
clock
->
time_source_sink
)))
return
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