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
76774451
Commit
76774451
authored
Mar 25, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Request one sample at a time from the stream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63e0b3a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
main.c
dlls/mfreadwrite/main.c
+10
-1
No files found.
dlls/mfreadwrite/main.c
View file @
76774451
...
...
@@ -94,6 +94,11 @@ enum media_source_state
SOURCE_STATE_STARTED
,
};
enum
media_stream_flags
{
STREAM_FLAG_SAMPLE_REQUESTED
=
0x1
,
};
struct
media_stream
{
IMFMediaStream
*
stream
;
...
...
@@ -107,6 +112,7 @@ struct media_stream
enum
media_stream_state
state
;
BOOL
selected
;
BOOL
presented
;
DWORD
flags
;
};
struct
source_reader
...
...
@@ -507,6 +513,7 @@ static HRESULT source_reader_media_sample_handler(struct source_reader *reader,
{
EnterCriticalSection
(
&
reader
->
streams
[
i
].
cs
);
reader
->
streams
[
i
].
flags
&=
~
STREAM_FLAG_SAMPLE_REQUESTED
;
hr
=
source_reader_process_sample
(
&
reader
->
streams
[
i
],
sample
);
LeaveCriticalSection
(
&
reader
->
streams
[
i
].
cs
);
...
...
@@ -1235,10 +1242,12 @@ static HRESULT source_reader_read_sample(struct source_reader *reader, DWORD ind
{
while
(
list_empty
(
&
stream
->
responses
)
&&
stream
->
state
!=
STREAM_STATE_EOS
)
{
if
(
stream
->
stream
)
if
(
stream
->
stream
&&
!
(
stream
->
flags
&
STREAM_FLAG_SAMPLE_REQUESTED
)
)
{
if
(
FAILED
(
hr
=
IMFMediaStream_RequestSample
(
stream
->
stream
,
NULL
)))
WARN
(
"Sample request failed, hr %#x.
\n
"
,
hr
);
else
stream
->
flags
|=
STREAM_FLAG_SAMPLE_REQUESTED
;
}
SleepConditionVariableCS
(
&
stream
->
sample_event
,
&
stream
->
cs
,
INFINITE
);
}
...
...
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