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
de1d2223
Commit
de1d2223
authored
Nov 03, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Add support for MESessionScrubSampleComplete event.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
483085ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
session.c
dlls/mf/session.c
+53
-0
No files found.
dlls/mf/session.c
View file @
de1d2223
...
...
@@ -160,6 +160,7 @@ struct transform_stream
enum
topo_node_flags
{
TOPO_NODE_END_OF_STREAM
=
0x1
,
TOPO_NODE_SCRUB_SAMPLE_COMPLETE
=
0x2
,
};
struct
topo_node
...
...
@@ -3317,6 +3318,30 @@ static BOOL session_nodes_is_mask_set(struct media_session *session, MF_TOPOLOGY
return
TRUE
;
}
static
void
session_nodes_unset_mask
(
struct
media_session
*
session
,
MF_TOPOLOGY_TYPE
node_type
,
unsigned
int
flags
)
{
struct
media_source
*
source
;
struct
topo_node
*
node
;
if
(
node_type
==
MF_TOPOLOGY_MAX
)
{
LIST_FOR_EACH_ENTRY
(
source
,
&
session
->
presentation
.
sources
,
struct
media_source
,
entry
)
{
source
->
flags
&=
~
flags
;
}
}
else
{
LIST_FOR_EACH_ENTRY
(
node
,
&
session
->
presentation
.
nodes
,
struct
topo_node
,
entry
)
{
if
(
node
->
type
==
node_type
)
{
node
->
flags
&=
~
flags
;
}
}
}
}
static
void
session_raise_end_of_presentation
(
struct
media_session
*
session
)
{
if
(
!
(
session_nodes_is_mask_set
(
session
,
MF_TOPOLOGY_SOURCESTREAM_NODE
,
TOPO_NODE_END_OF_STREAM
)))
...
...
@@ -3387,6 +3412,28 @@ static void session_sink_stream_marker(struct media_session *session, IMFStreamS
}
}
static
void
session_sink_stream_scrub_complete
(
struct
media_session
*
session
,
IMFStreamSink
*
stream_sink
)
{
struct
topo_node
*
node
;
if
(
!
(
node
=
session_get_node_object
(
session
,
(
IUnknown
*
)
stream_sink
,
MF_TOPOLOGY_OUTPUT_NODE
))
||
node
->
flags
&
TOPO_NODE_SCRUB_SAMPLE_COMPLETE
)
{
return
;
}
node
->
flags
|=
TOPO_NODE_SCRUB_SAMPLE_COMPLETE
;
/* Scrubbing event is not limited to the started state transition, or even the started state.
Events are processed and forwarded at any point after transition from initial idle state. */
if
(
session
->
presentation
.
flags
&
SESSION_FLAG_SOURCES_SUBSCRIBED
&&
session_nodes_is_mask_set
(
session
,
MF_TOPOLOGY_OUTPUT_NODE
,
TOPO_NODE_SCRUB_SAMPLE_COMPLETE
))
{
IMFMediaEventQueue_QueueEventParamVar
(
session
->
event_queue
,
MESessionScrubSampleComplete
,
&
GUID_NULL
,
S_OK
,
NULL
);
session_nodes_unset_mask
(
session
,
MF_TOPOLOGY_OUTPUT_NODE
,
TOPO_NODE_SCRUB_SAMPLE_COMPLETE
);
}
}
static
HRESULT
WINAPI
session_events_callback_Invoke
(
IMFAsyncCallback
*
iface
,
IMFAsyncResult
*
result
)
{
struct
media_session
*
session
=
impl_from_events_callback_IMFAsyncCallback
(
iface
);
...
...
@@ -3524,6 +3571,12 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
LeaveCriticalSection
(
&
session
->
cs
);
break
;
case
MEStreamSinkScrubSampleComplete
:
EnterCriticalSection
(
&
session
->
cs
);
session_sink_stream_scrub_complete
(
session
,
(
IMFStreamSink
*
)
event_source
);
LeaveCriticalSection
(
&
session
->
cs
);
break
;
case
MEMediaSample
:
EnterCriticalSection
(
&
session
->
cs
);
...
...
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