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

Hard-code stats update interval

Only 1 second interval has ever been used.
parent a1f861a0
...@@ -872,10 +872,6 @@ static void InitStatistics( input_thread_t * p_input ) ...@@ -872,10 +872,6 @@ static void InitStatistics( input_thread_t * p_input )
p_input->p->counters.p_sout_send_bitrate = NULL; p_input->p->counters.p_sout_send_bitrate = NULL;
p_input->p->counters.p_sout_sent_packets = NULL; p_input->p->counters.p_sout_sent_packets = NULL;
p_input->p->counters.p_sout_sent_bytes = NULL; p_input->p->counters.p_sout_sent_bytes = NULL;
if( p_input->p->counters.p_demux_bitrate )
p_input->p->counters.p_demux_bitrate->update_interval = 1000000;
if( p_input->p->counters.p_input_bitrate )
p_input->p->counters.p_input_bitrate->update_interval = 1000000;
} }
} }
...@@ -903,9 +899,6 @@ static int InitSout( input_thread_t * p_input ) ...@@ -903,9 +899,6 @@ static int InitSout( input_thread_t * p_input )
INIT_COUNTER( sout_sent_packets, INTEGER, COUNTER ); INIT_COUNTER( sout_sent_packets, INTEGER, COUNTER );
INIT_COUNTER( sout_sent_bytes, INTEGER, COUNTER ); INIT_COUNTER( sout_sent_bytes, INTEGER, COUNTER );
INIT_COUNTER( sout_send_bitrate, FLOAT, DERIVATIVE ); INIT_COUNTER( sout_send_bitrate, FLOAT, DERIVATIVE );
if( p_input->p->counters.p_sout_send_bitrate )
p_input->p->counters.p_sout_send_bitrate->update_interval =
1000000;
} }
} }
else else
......
...@@ -241,7 +241,6 @@ typedef struct counter_t ...@@ -241,7 +241,6 @@ typedef struct counter_t
int i_samples; int i_samples;
counter_sample_t ** pp_samples; counter_sample_t ** pp_samples;
mtime_t update_interval;
mtime_t last_update; mtime_t last_update;
} counter_t; } counter_t;
......
...@@ -63,7 +63,6 @@ counter_t * stats_CounterCreate( int i_type, int i_compute_type ) ...@@ -63,7 +63,6 @@ counter_t * stats_CounterCreate( int i_type, int i_compute_type )
p_counter->i_samples = 0; p_counter->i_samples = 0;
p_counter->pp_samples = NULL; p_counter->pp_samples = NULL;
p_counter->update_interval = 0;
p_counter->last_update = 0; p_counter->last_update = 0;
return p_counter; return p_counter;
...@@ -253,7 +252,7 @@ static int CounterUpdate( counter_t *p_counter, ...@@ -253,7 +252,7 @@ static int CounterUpdate( counter_t *p_counter,
{ {
counter_sample_t *p_new, *p_old; counter_sample_t *p_new, *p_old;
mtime_t now = mdate(); mtime_t now = mdate();
if( now - p_counter->last_update < p_counter->update_interval ) if( now - p_counter->last_update < CLOCK_FREQ )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
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