[vlc-devel] [PATCH 13/13] decoder: don't pass always 1 value
Steve Lhomme
robux4 at ycbcr.xyz
Mon Sep 2 16:20:20 CEST 2019
If we need to pass new stats where the decoded amount didn't change we can
always reintroduce it.
---
src/input/decoder.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 88a17d25d2..f9eed279e8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -78,7 +78,7 @@ struct decoder_owner
vlc_thread_t thread;
- void (*pf_update_stat)( struct decoder_owner *, unsigned decoded, unsigned lost );
+ void (*pf_update_stat)( struct decoder_owner *, unsigned lost );
/* Some decoders require already packetized data (ie. not truncated) */
decoder_t *p_packetizer;
@@ -1053,7 +1053,7 @@ static int DecoderPlayVideo_internal( struct decoder_owner *p_owner, picture_t *
}
static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,
- unsigned decoded, unsigned lost )
+ unsigned lost )
{
unsigned displayed = 0;
@@ -1065,7 +1065,7 @@ static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,
lost += vout_lost;
}
- decoder_Notify(p_owner, on_new_video_stats, decoded, lost, displayed);
+ decoder_Notify(p_owner, on_new_video_stats, 1, lost, displayed);
}
static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )
@@ -1075,7 +1075,7 @@ static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )
int success = DecoderPlayVideo_internal( p_owner, p_pic );
- p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
+ p_owner->pf_update_stat( p_owner, success != VLC_SUCCESS ? 1 : 0 );
}
static int thumbnailer_update_format( decoder_t *p_dec )
@@ -1175,7 +1175,7 @@ static int DecoderPlayAudio_internal( struct decoder_owner *p_owner, block_t *p_
}
static void DecoderUpdateStatAudio( struct decoder_owner *p_owner,
- unsigned decoded, unsigned lost )
+ unsigned lost )
{
unsigned played = 0;
@@ -1187,7 +1187,7 @@ static void DecoderUpdateStatAudio( struct decoder_owner *p_owner,
lost += aout_lost;
}
- decoder_Notify(p_owner, on_new_audio_stats, decoded, lost, played);
+ decoder_Notify(p_owner, on_new_audio_stats, 1, lost, played);
}
static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )
@@ -1196,7 +1196,7 @@ static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )
int success = DecoderPlayAudio_internal( p_owner, p_aout_buf );
- p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
+ p_owner->pf_update_stat( p_owner, success != VLC_SUCCESS ? 1 : 0 );
}
static void DecoderPlaySpu_internal( struct decoder_owner *p_owner, subpicture_t *p_subpic )
@@ -1234,9 +1234,9 @@ static void DecoderPlaySpu_internal( struct decoder_owner *p_owner, subpicture_t
}
static void DecoderUpdateStatSpu( struct decoder_owner *p_owner,
- unsigned decoded, unsigned lost )
+ unsigned lost )
{
- (void) p_owner; (void) decoded; (void) lost;
+ (void) p_owner; (void) lost;
}
static void DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )
@@ -1272,7 +1272,7 @@ static void DecoderDecode_internal( struct decoder_owner *p_owner, block_t *p_bl
switch( ret )
{
case VLCDEC_SUCCESS:
- p_owner->pf_update_stat( p_owner, 1, 0 );
+ p_owner->pf_update_stat( p_owner, 0 );
break;
case VLCDEC_ECRITICAL:
p_owner->error = true;
--
2.17.1
More information about the vlc-devel
mailing list