[vlc-devel] [PATCH 1/2] return decoded subs with input stats
Francois Cartegnie
fcvlcdev at free.fr
Mon Mar 2 18:39:08 CET 2015
---
include/vlc/libvlc_media.h | 1 +
include/vlc_input_item.h | 1 +
lib/media.c | 1 +
src/input/stats.c | 3 ++-
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 7fc718a..8591535 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -135,6 +135,7 @@ typedef struct libvlc_media_stats_t
/* Decoders */
int i_decoded_video;
int i_decoded_audio;
+ int i_decoded_subs;
/* Video Output */
int i_displayed_pictures;
diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 8502dd3..0ce9dc9 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -321,6 +321,7 @@ struct input_stats_t
/* Decoders */
int64_t i_decoded_audio;
int64_t i_decoded_video;
+ int64_t i_decoded_subs;
/* Vout */
int64_t i_displayed_pictures;
diff --git a/lib/media.c b/lib/media.c
index 9ccfb25..07f333d 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -651,6 +651,7 @@ int libvlc_media_get_stats( libvlc_media_t *p_md,
p_stats->i_decoded_video = p_itm_stats->i_decoded_video;
p_stats->i_decoded_audio = p_itm_stats->i_decoded_audio;
+ p_stats->i_decoded_subs = p_itm_stats->i_decoded_subs;
p_stats->i_displayed_pictures = p_itm_stats->i_displayed_pictures;
p_stats->i_lost_pictures = p_itm_stats->i_lost_pictures;
diff --git a/src/input/stats.c b/src/input/stats.c
index ba13f05..4d4c717 100644
--- a/src/input/stats.c
+++ b/src/input/stats.c
@@ -98,6 +98,7 @@ void stats_ComputeInputStats(input_thread_t *input, input_stats_t *st)
/* Decoders */
st->i_decoded_video = stats_GetTotal(input->p->counters.p_decoded_video);
st->i_decoded_audio = stats_GetTotal(input->p->counters.p_decoded_audio);
+ st->i_decoded_subs = stats_GetTotal(input->p->counters.p_decoded_sub);
/* Sout */
if (input->p->counters.p_sout_send_bitrate)
@@ -129,7 +130,7 @@ void stats_ReinitInputStats( input_stats_t *p_stats )
p_stats->i_demux_corrupted = p_stats->i_demux_discontinuity =
p_stats->i_displayed_pictures = p_stats->i_lost_pictures =
p_stats->i_played_abuffers = p_stats->i_lost_abuffers =
- p_stats->i_decoded_video = p_stats->i_decoded_audio =
+ p_stats->i_decoded_video = p_stats->i_decoded_audio = p_stats->i_decoded_subs =
p_stats->i_sent_bytes = p_stats->i_sent_packets = p_stats->f_send_bitrate
= 0;
vlc_mutex_unlock( &p_stats->lock );
--
2.1.0
More information about the vlc-devel
mailing list