VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
stats.c File Reference
Include dependency graph for stats.c:

Functions

counter_tstats_CounterCreate (int i_compute_type)
 Create a statistics counter.
static int64_t stats_GetTotal (const counter_t *counter)
static float stats_GetRate (const counter_t *counter)
input_stats_tstats_NewInputStats (input_thread_t *p_input)
void stats_ComputeInputStats (input_thread_t *input, input_stats_t *st)
void stats_ReinitInputStats (input_stats_t *p_stats)
void stats_CounterClean (counter_t *p_c)
void stats_Update (counter_t *p_counter, uint64_t val, uint64_t *new_val)
 Update a counter element with new values.

Function Documentation

void stats_ComputeInputStats ( input_thread_t input,
input_stats_t st 
)
void stats_CounterClean ( counter_t p_c)
counter_t* stats_CounterCreate ( int  i_compute_type)

Create a statistics counter.

Parameters
i_compute_typethe aggregation type. One of STATS_LAST (always keep the last value), STATS_COUNTER (increment by the passed value), STATS_MAX (keep the maximum passed value), STATS_MIN, or STATS_DERIVATIVE (keep a time derivative of the value)

References counter_t::i_compute_type, counter_t::i_samples, counter_t::last_update, and counter_t::pp_samples.

static float stats_GetRate ( const counter_t counter)
inlinestatic
static int64_t stats_GetTotal ( const counter_t counter)
inlinestatic
input_stats_t* stats_NewInputStats ( input_thread_t p_input)
void stats_ReinitInputStats ( input_stats_t p_stats)
void stats_Update ( counter_t p_counter,
uint64_t  val,
uint64_t *  new_val 
)

Update a counter element with new values.

Parameters
p_counterthe counter to update
valthe vlc_value union containing the new value to aggregate. For more information on how data is aggregated,
See Also
stats_Create
Parameters
val_newa pointer that will be filled with new data

References CLOCK_FREQ, counter_sample_t::date, counter_t::i_compute_type, counter_t::i_samples, INSERT_ELEM, counter_t::last_update, mdate(), counter_t::pp_samples, REMOVE_ELEM, STATS_COUNTER, STATS_DERIVATIVE, and counter_sample_t::value.

Referenced by AReadBlock(), AReadStream(), DecoderDecodeAudio(), DecoderDecodeVideo(), DecoderProcessSpu(), EsOutSend(), and input_UpdateStatistic().