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
cbb34356
Commit
cbb34356
authored
Jan 23, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 16, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite/reader: Introduce source_reader_queue_sample helper.
parent
dfe2b717
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
reader.c
dlls/mfreadwrite/reader.c
+13
-14
No files found.
dlls/mfreadwrite/reader.c
View file @
cbb34356
...
...
@@ -463,6 +463,17 @@ static HRESULT source_reader_queue_response(struct source_reader *reader, struct
return
S_OK
;
}
static
HRESULT
source_reader_queue_sample
(
struct
source_reader
*
reader
,
struct
media_stream
*
stream
,
IMFSample
*
sample
)
{
LONGLONG
timestamp
=
0
;
if
(
FAILED
(
IMFSample_GetSampleTime
(
sample
,
&
timestamp
)))
WARN
(
"Sample time wasn't set.
\n
"
);
return
source_reader_queue_response
(
reader
,
stream
,
S_OK
,
0
,
timestamp
,
sample
);
}
static
HRESULT
source_reader_request_sample
(
struct
source_reader
*
reader
,
struct
media_stream
*
stream
)
{
HRESULT
hr
=
S_OK
;
...
...
@@ -650,7 +661,6 @@ static HRESULT source_reader_pull_stream_samples(struct source_reader *reader, s
MFT_OUTPUT_DATA_BUFFER
out_buffer
;
unsigned
int
buffer_size
;
IMFMediaBuffer
*
buffer
;
LONGLONG
timestamp
;
DWORD
status
;
HRESULT
hr
;
...
...
@@ -688,11 +698,7 @@ static HRESULT source_reader_pull_stream_samples(struct source_reader *reader, s
break
;
}
timestamp
=
0
;
if
(
FAILED
(
IMFSample_GetSampleTime
(
out_buffer
.
pSample
,
&
timestamp
)))
WARN
(
"Sample time wasn't set.
\n
"
);
source_reader_queue_response
(
reader
,
stream
,
S_OK
/* FIXME */
,
0
,
timestamp
,
out_buffer
.
pSample
);
source_reader_queue_sample
(
reader
,
stream
,
out_buffer
.
pSample
);
if
(
out_buffer
.
pSample
)
IMFSample_Release
(
out_buffer
.
pSample
);
if
(
out_buffer
.
pEvents
)
...
...
@@ -705,17 +711,10 @@ static HRESULT source_reader_pull_stream_samples(struct source_reader *reader, s
static
HRESULT
source_reader_process_sample
(
struct
source_reader
*
reader
,
struct
media_stream
*
stream
,
IMFSample
*
sample
)
{
LONGLONG
timestamp
;
HRESULT
hr
;
if
(
!
stream
->
decoder
.
transform
)
{
timestamp
=
0
;
if
(
FAILED
(
IMFSample_GetSampleTime
(
sample
,
&
timestamp
)))
WARN
(
"Sample time wasn't set.
\n
"
);
return
source_reader_queue_response
(
reader
,
stream
,
S_OK
,
0
,
timestamp
,
sample
);
}
return
source_reader_queue_sample
(
reader
,
stream
,
sample
);
/* It's assumed that decoder has 1 input and 1 output, both id's are 0. */
...
...
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