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
a9e2044a
Commit
a9e2044a
authored
May 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add a helper to set paused state for the session.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b68a765b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
session.c
dlls/mf/session.c
+11
-14
No files found.
dlls/mf/session.c
View file @
a9e2044a
...
...
@@ -812,6 +812,14 @@ static void session_start(struct media_session *session, const GUID *time_format
LeaveCriticalSection
(
&
session
->
cs
);
}
static
void
session_set_paused
(
struct
media_session
*
session
,
HRESULT
status
)
{
session
->
state
=
SESSION_STATE_PAUSED
;
if
(
SUCCEEDED
(
status
))
session_set_caps
(
session
,
session
->
caps
&
~
MFSESSIONCAP_PAUSE
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionPaused
,
&
GUID_NULL
,
status
,
NULL
);
}
static
void
session_set_closed
(
struct
media_session
*
session
,
HRESULT
status
)
{
session
->
state
=
SESSION_STATE_CLOSED
;
...
...
@@ -840,10 +848,7 @@ static void session_pause(struct media_session *session)
}
if
(
FAILED
(
hr
))
{
session
->
state
=
SESSION_STATE_PAUSED
;
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionPaused
,
&
GUID_NULL
,
hr
,
NULL
);
}
session_set_paused
(
session
,
hr
);
LeaveCriticalSection
(
&
session
->
cs
);
}
...
...
@@ -2185,12 +2190,7 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
if
(
!
session_is_source_nodes_state
(
session
,
OBJ_STATE_PAUSED
))
break
;
session
->
state
=
SESSION_STATE_PAUSED
;
session_set_caps
(
session
,
session
->
caps
&
~
MFSESSIONCAP_PAUSE
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionPaused
,
&
GUID_NULL
,
S_OK
,
NULL
);
session_set_paused
(
session
,
S_OK
);
break
;
case
SESSION_STATE_STOPPING_SOURCES
:
if
(
!
session_is_source_nodes_state
(
session
,
OBJ_STATE_STOPPED
))
...
...
@@ -2291,10 +2291,7 @@ static void session_set_sink_stream_state(struct media_session *session, IMFStre
}
if
(
FAILED
(
hr
))
{
session
->
state
=
SESSION_STATE_PAUSED
;
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionPaused
,
&
GUID_NULL
,
hr
,
NULL
);
}
session_set_paused
(
session
,
hr
);
break
;
case
SESSION_STATE_STOPPING_SINKS
:
...
...
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