[vlc-devel] commit: Remove remaining global stats code ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 28 18:47:09 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 28 19:19:45 2009 +0200| [2f1189df0a232b1e9fcd78328b87b7937666a00f] | committer: Rémi Denis-Courmont 

Remove remaining global stats code

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

 include/vlc_common.h   |    1 -
 include/vlc_messages.h |   18 ------------------
 src/libvlccore.sym     |    1 -
 src/misc/stats.c       |   37 -------------------------------------
 4 files changed, 0 insertions(+), 57 deletions(-)

diff --git a/include/vlc_common.h b/include/vlc_common.h
index 23f27a0..931c3ac 100644
--- a/include/vlc_common.h
+++ b/include/vlc_common.h
@@ -361,7 +361,6 @@ typedef struct counter_t     counter_t;
 typedef struct counter_sample_t counter_sample_t;
 typedef struct stats_handler_t stats_handler_t;
 typedef struct input_stats_t input_stats_t;
-typedef struct global_stats_t global_stats_t;
 
 /* Update */
 typedef struct update_t update_t;
diff --git a/include/vlc_messages.h b/include/vlc_messages.h
index bf8d2dd..7257ef0 100644
--- a/include/vlc_messages.h
+++ b/include/vlc_messages.h
@@ -299,24 +299,6 @@ VLC_EXPORT( void, stats_ComputeInputStats, (input_thread_t*, input_stats_t*) );
 VLC_EXPORT( void, stats_ReinitInputStats, (input_stats_t *) );
 VLC_EXPORT( void, stats_DumpInputStats, (input_stats_t *) );
 
-/********************
- * Global stats
- *******************/
-struct global_stats_t
-{
-    vlc_mutex_t lock;
-
-    float f_input_bitrate;
-    float f_demux_bitrate;
-    float f_output_bitrate;
-
-    int i_http_clients;
-};
-
-#define stats_ComputeGlobalStats(a,b) __stats_ComputeGlobalStats( VLC_OBJECT(a),b)
-VLC_EXPORT( void, __stats_ComputeGlobalStats, (vlc_object_t*,global_stats_t*));
-
-
 /*********
  * Timing
  ********/
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 45497fc..c7b3110 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -343,7 +343,6 @@ spu_DisplaySubpicture
 spu_Init
 spu_RenderSubpictures
 spu_SortSubpictures
-__stats_ComputeGlobalStats
 stats_ComputeInputStats
 stats_CounterClean
 __stats_CounterCreate
diff --git a/src/misc/stats.c b/src/misc/stats.c
index b2e03ef..da4e10d 100644
--- a/src/misc/stats.c
+++ b/src/misc/stats.c
@@ -238,43 +238,6 @@ void stats_DumpInputStats( input_stats_t *p_stats  )
     vlc_mutex_unlock( &p_stats->lock );
 }
 
-void __stats_ComputeGlobalStats( vlc_object_t *p_obj, global_stats_t *p_stats )
-{
-    vlc_list_t *p_list;
-    int i_index;
-
-    if( !libvlc_stats (p_obj) ) return;
-
-    vlc_mutex_lock( &p_stats->lock );
-
-    p_list = vlc_list_find( p_obj, VLC_OBJECT_INPUT, FIND_ANYWHERE );
-    if( p_list )
-    {
-        float f_total_in = 0, f_total_out = 0,f_total_demux = 0;
-        for( i_index = 0; i_index < p_list->i_count ; i_index ++ )
-        {
-            float f_in = 0, f_out = 0, f_demux = 0;
-            input_thread_t *p_input = (input_thread_t *)
-                             p_list->p_values[i_index].p_object;
-            vlc_mutex_lock( &p_input->p->counters.counters_lock );
-            stats_GetFloat( p_obj, p_input->p->counters.p_input_bitrate, &f_in );
-            if( p_input->p->counters.p_sout_send_bitrate )
-                stats_GetFloat( p_obj, p_input->p->counters.p_sout_send_bitrate,
-                                    &f_out );
-            stats_GetFloat( p_obj, p_input->p->counters.p_demux_bitrate,
-                                &f_demux );
-            vlc_mutex_unlock( &p_input->p->counters.counters_lock );
-            f_total_in += f_in; f_total_out += f_out;f_total_demux += f_demux;
-        }
-        p_stats->f_input_bitrate = f_total_in;
-        p_stats->f_output_bitrate = f_total_out;
-        p_stats->f_demux_bitrate = f_total_demux;
-        vlc_list_release( p_list );
-    }
-
-    vlc_mutex_unlock( &p_stats->lock );
-}
-
 void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
                          unsigned int i_id )
 {




More information about the vlc-devel mailing list