[vlc-devel] [RFC-PATCH 10/12] core: added DecoderUpdateStatSpu
Filip Roséen
filip at videolabs.io
Wed May 11 18:56:55 CEST 2016
There are several cases where we want to update the statistics that
belong to a subtitle decoder, as such this function has been introduced.
---
src/input/decoder.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 0169c91..d94a027 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1266,6 +1266,19 @@ static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic )
vout_PutSubpicture( p_vout, p_subpic );
}
+static void DecoderUpdateStatSpu( decoder_t *p_dec, unsigned decoded )
+{
+ decoder_owner_sys_t *p_owner = p_dec->p_owner;
+ input_thread_t *p_input = p_owner->p_input;
+
+ if( p_input == NULL )
+ return;
+
+ vlc_mutex_lock( &p_input->p->counters.counters_lock);
+ stats_Update( p_input->p->counters.p_decoded_sub, decoded, NULL );
+ vlc_mutex_unlock( &p_input->p->counters.counters_lock);
+}
+
static int DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )
{
assert( p_spu );
--
2.8.2
More information about the vlc-devel
mailing list