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
7a530806
Commit
7a530806
authored
Mar 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: add input_DecoderFlush()
parent
984aadb5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
include/vlc_input.h
include/vlc_input.h
+1
-0
src/input/decoder.c
src/input/decoder.c
+16
-3
src/libvlccore.sym
src/libvlccore.sym
+3
-2
No files found.
include/vlc_input.h
View file @
7a530806
...
@@ -617,6 +617,7 @@ static inline int input_ModifyPcrSystem( input_thread_t *p_input, bool b_absolut
...
@@ -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
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_DecoderDelete
(
decoder_t
*
);
VLC_API
void
input_DecoderDecode
(
decoder_t
*
,
block_t
*
,
bool
b_do_pace
);
VLC_API
void
input_DecoderDecode
(
decoder_t
*
,
block_t
*
,
bool
b_do_pace
);
VLC_API
void
input_DecoderFlush
(
decoder_t
*
);
/**
/**
* This function creates a sane filename path.
* This function creates a sane filename path.
...
...
src/input/decoder.c
View file @
7a530806
...
@@ -514,15 +514,28 @@ void input_DecoderChangeDelay( decoder_t *p_dec, mtime_t i_delay )
...
@@ -514,15 +514,28 @@ void input_DecoderChangeDelay( decoder_t *p_dec, mtime_t i_delay )
vlc_mutex_unlock
(
&
p_owner
->
lock
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
}
}
/**
* Requests that the decoder immediately discard all pending buffers.
* This is useful at end of stream, when seeking or when deselecting a stream.
*/
void
input_DecoderFlush
(
decoder_t
*
p_dec
)
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
vlc_mutex_lock
(
&
p_owner
->
lock
);
DecoderFlush
(
p_dec
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
}
void
input_DecoderStartWait
(
decoder_t
*
p_dec
)
void
input_DecoderStartWait
(
decoder_t
*
p_dec
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
assert
(
!
p_owner
->
b_waiting
);
assert
(
!
p_owner
->
b_waiting
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
input_DecoderFlush
(
p_dec
);
DecoderFlush
(
p_dec
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
p_owner
->
b_first
=
true
;
p_owner
->
b_first
=
true
;
p_owner
->
b_has_data
=
false
;
p_owner
->
b_has_data
=
false
;
p_owner
->
b_waiting
=
true
;
p_owner
->
b_waiting
=
true
;
...
@@ -579,6 +592,7 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration )
...
@@ -579,6 +592,7 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration )
else
else
{
{
/* TODO subtitle should not be flushed */
/* TODO subtitle should not be flushed */
p_owner
->
b_waiting
=
false
;
DecoderFlush
(
p_dec
);
DecoderFlush
(
p_dec
);
}
}
vlc_mutex_unlock
(
&
p_owner
->
lock
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
...
@@ -942,7 +956,6 @@ static void DecoderFlush( decoder_t *p_dec )
...
@@ -942,7 +956,6 @@ static void DecoderFlush( decoder_t *p_dec )
/* Empty the fifo */
/* Empty the fifo */
block_FifoEmpty
(
p_owner
->
p_fifo
);
block_FifoEmpty
(
p_owner
->
p_fifo
);
p_owner
->
b_waiting
=
false
;
/* Monitor for flush end */
/* Monitor for flush end */
p_owner
->
b_flushing
=
true
;
p_owner
->
b_flushing
=
true
;
vlc_cond_signal
(
&
p_owner
->
wait_request
);
vlc_cond_signal
(
&
p_owner
->
wait_request
);
...
...
src/libvlccore.sym
View file @
7a530806
...
@@ -174,9 +174,10 @@ input_Control
...
@@ -174,9 +174,10 @@ input_Control
input_Create
input_Create
input_CreateAndStart
input_CreateAndStart
input_CreateFilename
input_CreateFilename
input_DecoderDecode
input_DecoderDelete
input_DecoderCreate
input_DecoderCreate
input_DecoderDelete
input_DecoderDecode
input_DecoderFlush
input_GetItem
input_GetItem
input_item_AddInfo
input_item_AddInfo
input_item_AddOption
input_item_AddOption
...
...
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