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
5371d6b8
Commit
5371d6b8
authored
Jun 07, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Raise sample request events for sample grabber stream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c7badafb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
samplegrabber.c
dlls/mf/samplegrabber.c
+13
-0
No files found.
dlls/mf/samplegrabber.c
View file @
5371d6b8
...
...
@@ -613,6 +613,11 @@ static struct scheduled_sample *stream_get_next_sample(struct sample_grabber_str
return
sample
;
}
static
void
sample_grabber_stream_request_sample
(
struct
sample_grabber_stream
*
stream
)
{
IMFStreamSink_QueueEvent
(
&
stream
->
IMFStreamSink_iface
,
MEStreamSinkRequestSample
,
&
GUID_NULL
,
S_OK
,
NULL
);
}
static
HRESULT
WINAPI
sample_grabber_stream_timer_callback_Invoke
(
IMFAsyncCallback
*
iface
,
IMFAsyncResult
*
result
)
{
struct
sample_grabber_stream
*
stream
=
impl_from_IMFAsyncCallback
(
iface
);
...
...
@@ -634,6 +639,7 @@ static HRESULT WINAPI sample_grabber_stream_timer_callback_Invoke(IMFAsyncCallba
if
(
FAILED
(
hr
=
stream_schedule_sample
(
stream
,
sample
)))
WARN
(
"Failed to schedule a sample, hr %#x.
\n
"
,
hr
);
}
sample_grabber_stream_request_sample
(
stream
);
}
LeaveCriticalSection
(
&
stream
->
cs
);
...
...
@@ -950,6 +956,7 @@ static void sample_grabber_set_state(struct sample_grabber *grabber, enum sink_s
MEStreamSinkStarted
,
/* SINK_STATE_RUNNING */
};
BOOL
set_state
=
FALSE
;
unsigned
int
i
;
EnterCriticalSection
(
&
grabber
->
cs
);
...
...
@@ -970,6 +977,12 @@ static void sample_grabber_set_state(struct sample_grabber *grabber, enum sink_s
if
(
set_state
)
{
grabber
->
stream
->
state
=
state
;
if
(
state
==
SINK_STATE_RUNNING
)
{
/* Every transition to running state sends a bunch requests to build up initial queue. */
for
(
i
=
0
;
i
<
4
;
++
i
)
sample_grabber_stream_request_sample
(
grabber
->
stream
);
}
IMFStreamSink_QueueEvent
(
&
grabber
->
stream
->
IMFStreamSink_iface
,
events
[
state
],
&
GUID_NULL
,
S_OK
,
NULL
);
}
}
...
...
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