Commit 2f1189df authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove remaining global stats code

parent 3d729748
......@@ -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;
......
......@@ -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
********/
......
......@@ -343,7 +343,6 @@ spu_DisplaySubpicture
spu_Init
spu_RenderSubpictures
spu_SortSubpictures
__stats_ComputeGlobalStats
stats_ComputeInputStats
stats_CounterClean
__stats_CounterCreate
......
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment