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
6de2e994
Commit
6de2e994
authored
Dec 11, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: more comments, rename b_mc_running
parent
729849fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
modules/codec/omxil/mediacodec.c
modules/codec/omxil/mediacodec.c
+17
-9
No files found.
modules/codec/omxil/mediacodec.c
View file @
6de2e994
...
...
@@ -101,15 +101,21 @@ struct decoder_sys_t
dec_process_output_cb
pf_process_output
;
vlc_mutex_t
lock
;
vlc_thread_t
out_thread
;
/* Cond used to signal the output thread */
vlc_cond_t
cond
;
/* Cond used to signal the decoder thread */
vlc_cond_t
dec_cond
;
vlc_thread_t
out_thread
;
/* Set to true by pf_flush to signal the output thread to flush */
bool
b_out_thread_running
;
bool
b_flush_out
;
/* If true, the output thread will start to dequeue output pictures */
bool
b_output_ready
;
bool
b_mc_running
;
/* If true, the first input block was successfully dequeued */
bool
b_input_dequeued
;
bool
b_error
;
bool
b_error_signaled
;
// TODO remove
/* TODO: remove. See jni_EventHardwareAccelerationError */
bool
b_error_signaled
;
union
{
...
...
@@ -1061,9 +1067,9 @@ static void HEVCProcessBlock(decoder_t *p_dec, block_t *p_block,
static
void
DecodeFlushLocked
(
decoder_t
*
p_dec
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
bool
b_
was_running
=
p_sys
->
b_mc_running
;
bool
b_
had_input
=
p_sys
->
b_input_dequeued
;
p_sys
->
b_
mc_running
=
false
;
p_sys
->
b_
input_dequeued
=
false
;
p_sys
->
b_flush_out
=
true
;
p_sys
->
i_preroll_end
=
0
;
p_sys
->
b_output_ready
=
false
;
...
...
@@ -1072,7 +1078,7 @@ static void DecodeFlushLocked(decoder_t *p_dec)
p_sys
->
pf_on_flush
(
p_dec
);
if
(
b_
was_running
&&
p_sys
->
api
->
flush
(
p_sys
->
api
)
!=
VLC_SUCCESS
)
if
(
b_
had_input
&&
p_sys
->
api
->
flush
(
p_sys
->
api
)
!=
VLC_SUCCESS
)
{
p_sys
->
b_error
=
true
;
return
;
...
...
@@ -1141,6 +1147,7 @@ static void *OutThread(void *data)
goto
next
;
}
/* Process output returned by dequeue_out */
if
(
i_index
>=
0
||
i_index
==
MC_API_INFO_OUTPUT_FORMAT_CHANGED
||
i_index
==
MC_API_INFO_OUTPUT_BUFFERS_CHANGED
)
{
...
...
@@ -1285,7 +1292,7 @@ static int DecodeCommon(decoder_t *p_dec, block_t **pp_block)
{
bool
b_config
=
p_block
&&
(
p_block
->
i_flags
&
BLOCK_FLAG_CSD
);
mtime_t
i_ts
=
0
;
p_sys
->
b_
mc_running
=
true
;
p_sys
->
b_
input_dequeued
=
true
;
if
(
!
b_config
)
{
...
...
@@ -1303,7 +1310,7 @@ static int DecodeCommon(decoder_t *p_dec, block_t **pp_block)
if
(
p_block
->
i_flags
&
BLOCK_FLAG_PREROLL
)
p_sys
->
i_preroll_end
=
i_ts
;
/* One input buffer is queued,
unblock
OutThread that will
/* One input buffer is queued,
signal
OutThread that will
* fetch output buffers */
p_sys
->
b_output_ready
=
true
;
vlc_cond_broadcast
(
&
p_sys
->
cond
);
...
...
@@ -1360,7 +1367,8 @@ end:
if
(
p_sys
->
b_error
)
{
if
(
!
p_sys
->
b_error_signaled
)
{
/* Signal the error to the Java. */
/* Signal the error to the Java.
* TODO: remove this when there is a decoder fallback */
jni_EventHardwareAccelerationError
();
p_sys
->
b_error_signaled
=
true
;
vlc_cond_broadcast
(
&
p_sys
->
cond
);
...
...
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