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
10ba5a90
Commit
10ba5a90
authored
Jul 21, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Add a helper to send events while completing commands.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b3a300c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
session.c
dlls/mf/session.c
+12
-12
No files found.
dlls/mf/session.c
View file @
10ba5a90
...
...
@@ -826,6 +826,13 @@ static void session_command_complete(struct media_session *session)
}
}
static
void
session_command_complete_with_event
(
struct
media_session
*
session
,
MediaEventType
event
,
HRESULT
status
,
const
PROPVARIANT
*
param
)
{
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
event
,
&
GUID_NULL
,
status
,
param
);
session_command_complete
(
session
);
}
static
void
session_start
(
struct
media_session
*
session
,
const
GUID
*
time_format
,
const
PROPVARIANT
*
start_position
)
{
struct
media_source
*
source
;
...
...
@@ -863,9 +870,7 @@ static void session_start(struct media_session *session, const GUID *time_format
session_command_complete
(
session
);
break
;
default:
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionStarted
,
&
GUID_NULL
,
MF_E_INVALIDREQUEST
,
NULL
);
session_command_complete
(
session
);
session_command_complete_with_event
(
session
,
MESessionStarted
,
MF_E_INVALIDREQUEST
,
NULL
);
break
;
}
}
...
...
@@ -911,8 +916,7 @@ static void session_set_paused(struct media_session *session, unsigned int state
if
(
state
!=
~
0u
)
session
->
state
=
state
;
if
(
SUCCEEDED
(
status
))
session_set_caps
(
session
,
session
->
caps
&
~
MFSESSIONCAP_PAUSE
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionPaused
,
&
GUID_NULL
,
status
,
NULL
);
session_command_complete
(
session
);
session_command_complete_with_event
(
session
,
MESessionPaused
,
status
,
NULL
);
}
static
void
session_set_closed
(
struct
media_session
*
session
,
HRESULT
status
)
...
...
@@ -920,8 +924,7 @@ static void session_set_closed(struct media_session *session, HRESULT status)
session
->
state
=
SESSION_STATE_CLOSED
;
if
(
SUCCEEDED
(
status
))
session_set_caps
(
session
,
session
->
caps
&
~
(
MFSESSIONCAP_START
|
MFSESSIONCAP_SEEK
));
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionClosed
,
&
GUID_NULL
,
status
,
NULL
);
session_command_complete
(
session
);
session_command_complete_with_event
(
session
,
MESessionClosed
,
status
,
NULL
);
}
static
void
session_pause
(
struct
media_session
*
session
)
...
...
@@ -1007,8 +1010,7 @@ static void session_stop(struct media_session *session)
hr
=
S_OK
;
/* fallthrough */
default:
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionStopped
,
&
GUID_NULL
,
hr
,
NULL
);
session_command_complete
(
session
);
session_command_complete_with_event
(
session
,
MESessionStopped
,
hr
,
NULL
);
break
;
}
}
...
...
@@ -1077,9 +1079,7 @@ static void session_clear_topologies(struct media_session *session)
hr
=
MF_E_INVALIDREQUEST
;
else
session_clear_queued_topologies
(
session
);
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionTopologiesCleared
,
&
GUID_NULL
,
hr
,
NULL
);
session_command_complete
(
session
);
session_command_complete_with_event
(
session
,
MESessionTopologiesCleared
,
hr
,
NULL
);
}
static
struct
media_source
*
session_get_media_source
(
struct
media_session
*
session
,
IMFMediaSource
*
source
)
...
...
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