Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
741016dd
Commit
741016dd
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 for session commands without parameters.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23543f20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
36 deletions
+17
-36
session.c
dlls/mf/session.c
+17
-36
No files found.
dlls/mf/session.c
View file @
741016dd
...
...
@@ -536,6 +536,19 @@ static HRESULT session_submit_command(struct media_session *session, struct sess
return
hr
;
}
static
HRESULT
session_submit_simple_command
(
struct
media_session
*
session
,
enum
session_command
command
)
{
struct
session_op
*
op
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
create_session_op
(
command
,
&
op
)))
return
hr
;
hr
=
session_submit_command
(
session
,
op
);
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
}
static
void
session_clear_topologies
(
struct
media_session
*
session
)
{
struct
queued_topology
*
ptr
,
*
next
;
...
...
@@ -1499,18 +1512,10 @@ static HRESULT WINAPI mfsession_SetTopology(IMFMediaSession *iface, DWORD flags,
static
HRESULT
WINAPI
mfsession_ClearTopologies
(
IMFMediaSession
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFMediaSession
(
iface
);
struct
session_op
*
op
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
iface
);
if
(
FAILED
(
hr
=
create_session_op
(
SESSION_CMD_CLEAR_TOPOLOGIES
,
&
op
)))
return
hr
;
hr
=
session_submit_command
(
session
,
op
);
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
return
session_submit_simple_command
(
session
,
SESSION_CMD_CLEAR_TOPOLOGIES
);
}
static
HRESULT
WINAPI
mfsession_Start
(
IMFMediaSession
*
iface
,
const
GUID
*
format
,
const
PROPVARIANT
*
start_position
)
...
...
@@ -1541,52 +1546,28 @@ static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format
static
HRESULT
WINAPI
mfsession_Pause
(
IMFMediaSession
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFMediaSession
(
iface
);
struct
session_op
*
op
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
iface
);
if
(
FAILED
(
hr
=
create_session_op
(
SESSION_CMD_PAUSE
,
&
op
)))
return
hr
;
hr
=
session_submit_command
(
session
,
op
);
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
return
session_submit_simple_command
(
session
,
SESSION_CMD_PAUSE
);
}
static
HRESULT
WINAPI
mfsession_Stop
(
IMFMediaSession
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFMediaSession
(
iface
);
struct
session_op
*
op
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
iface
);
if
(
FAILED
(
hr
=
create_session_op
(
SESSION_CMD_STOP
,
&
op
)))
return
hr
;
hr
=
session_submit_command
(
session
,
op
);
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
return
session_submit_simple_command
(
session
,
SESSION_CMD_STOP
);
}
static
HRESULT
WINAPI
mfsession_Close
(
IMFMediaSession
*
iface
)
{
struct
media_session
*
session
=
impl_from_IMFMediaSession
(
iface
);
struct
session_op
*
op
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
iface
);
if
(
FAILED
(
hr
=
create_session_op
(
SESSION_CMD_CLOSE
,
&
op
)))
return
hr
;
hr
=
session_submit_command
(
session
,
op
);
IUnknown_Release
(
&
op
->
IUnknown_iface
);
return
hr
;
return
session_submit_simple_command
(
session
,
SESSION_CMD_CLOSE
);
}
static
HRESULT
WINAPI
mfsession_Shutdown
(
IMFMediaSession
*
iface
)
...
...
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