[vlc-commits] input: remove dead stats function

Rémi Denis-Courmont git at videolan.org
Mon Dec 11 21:02:17 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 11 20:53:27 2017 +0200| [7eab3b805ca312d5a76622e0faa0ca4f28b6b064] | committer: Rémi Denis-Courmont

input: remove dead stats function

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7eab3b805ca312d5a76622e0faa0ca4f28b6b064
---

 src/input/input.c           | 40 ----------------------------------------
 src/input/input_interface.h | 20 --------------------
 2 files changed, 60 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index f751b41299..a515526271 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3406,46 +3406,6 @@ static char *input_SubtitleFile2Uri( input_thread_t *p_input,
     return psz_uri;
 }
 
-/*****************************************************************************
- * Statistics
- *****************************************************************************/
-void input_UpdateStatistic( input_thread_t *p_input,
-                            input_statistic_t i_type, int i_delta )
-{
-    assert( input_priv(p_input)->i_state != INIT_S );
-
-    vlc_mutex_lock( &input_priv(p_input)->counters.counters_lock);
-    switch( i_type )
-    {
-#define I(c) stats_Update( input_priv(p_input)->counters.c, i_delta, NULL )
-    case INPUT_STATISTIC_DECODED_VIDEO:
-        I(p_decoded_video);
-        break;
-    case INPUT_STATISTIC_DECODED_AUDIO:
-        I(p_decoded_audio);
-        break;
-    case INPUT_STATISTIC_DECODED_SUBTITLE:
-        I(p_decoded_sub);
-        break;
-    case INPUT_STATISTIC_SENT_PACKET:
-        I(p_sout_sent_packets);
-        break;
-#undef I
-    case INPUT_STATISTIC_SENT_BYTE:
-    {
-        uint64_t bytes;
-
-        stats_Update( input_priv(p_input)->counters.p_sout_sent_bytes, i_delta, &bytes );
-        stats_Update( input_priv(p_input)->counters.p_sout_send_bitrate, bytes, NULL );
-        break;
-    }
-    default:
-        msg_Err( p_input, "Invalid statistic type %d (internal error)", i_type );
-        break;
-    }
-    vlc_mutex_unlock( &input_priv(p_input)->counters.counters_lock);
-}
-
 /**/
 /* TODO FIXME nearly the same logic that snapshot code */
 char *input_CreateFilename(input_thread_t *input, const char *dir,
diff --git a/src/input/input_interface.h b/src/input/input_interface.h
index b5f9795bd9..a98d3998b4 100644
--- a/src/input/input_interface.h
+++ b/src/input/input_interface.h
@@ -69,24 +69,4 @@ void input_resource_TerminateSout( input_resource_t *p_resource );
  */
 bool input_resource_HasVout( input_resource_t *p_resource );
 
-/* input.c */
-
-/* */
-typedef enum
-{
-    INPUT_STATISTIC_DECODED_VIDEO,
-    INPUT_STATISTIC_DECODED_AUDIO,
-    INPUT_STATISTIC_DECODED_SUBTITLE,
-
-    /* Use them only if you do not goes through a access_out module */
-    INPUT_STATISTIC_SENT_PACKET,
-    INPUT_STATISTIC_SENT_BYTE,
-
-} input_statistic_t;
-/**
- * It will update internal input statistics from external sources.
- * XXX For now, the only one allowed to do it is stream_out and input core.
- */
-void input_UpdateStatistic( input_thread_t *, input_statistic_t, int i_delta );
-
 #endif



More information about the vlc-commits mailing list