Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
132f872d
Commit
132f872d
authored
Mar 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: add input_DecoderDrain()
parent
d173264a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
include/vlc_input.h
include/vlc_input.h
+1
-0
src/input/decoder.c
src/input/decoder.c
+19
-1
src/libvlccore.sym
src/libvlccore.sym
+1
-0
No files found.
include/vlc_input.h
View file @
132f872d
...
...
@@ -617,6 +617,7 @@ static inline int input_ModifyPcrSystem( input_thread_t *p_input, bool b_absolut
VLC_API
decoder_t
*
input_DecoderCreate
(
vlc_object_t
*
,
const
es_format_t
*
,
input_resource_t
*
)
VLC_USED
;
VLC_API
void
input_DecoderDelete
(
decoder_t
*
);
VLC_API
void
input_DecoderDecode
(
decoder_t
*
,
block_t
*
,
bool
b_do_pace
);
VLC_API
void
input_DecoderDrain
(
decoder_t
*
);
VLC_API
void
input_DecoderFlush
(
decoder_t
*
);
/**
...
...
src/input/decoder.c
View file @
132f872d
...
...
@@ -1925,6 +1925,24 @@ bool input_DecoderIsEmpty( decoder_t * p_dec )
return
b_empty
;
}
/**
* Signals that there are no further blocks to decode, and requests that the
* decoder drain all pending buffers. This is used to ensure that all
* intermediate buffers empty and no samples get lost at the end of the stream.
*
* @note The function does not actually wait for draining. It just signals that
* draining should be performed once the decoder has emptied FIFO.
*/
void
input_DecoderDrain
(
decoder_t
*
p_dec
)
{
block_t
*
p_block
=
block_Alloc
(
0
);
if
(
unlikely
(
p_block
==
NULL
)
)
return
;
p_block
->
i_flags
|=
BLOCK_FLAG_CORE_EOS
;
input_DecoderDecode
(
p_dec
,
p_block
,
false
);
}
static
void
DecoderFlush
(
decoder_t
*
p_dec
)
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
...
...
@@ -1951,7 +1969,7 @@ static void DecoderFlush( decoder_t *p_dec )
/**
* Requests that the decoder immediately discard all pending buffers.
* This is useful
at end of stream,
when seeking or when deselecting a stream.
* This is useful when seeking or when deselecting a stream.
*/
void
input_DecoderFlush
(
decoder_t
*
p_dec
)
{
...
...
src/libvlccore.sym
View file @
132f872d
...
...
@@ -177,6 +177,7 @@ input_CreateFilename
input_DecoderCreate
input_DecoderDelete
input_DecoderDecode
input_DecoderDrain
input_DecoderFlush
input_GetItem
input_item_AddInfo
...
...
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