
Functions | |
| static int | CounterUpdate (vlc_object_t *p_handler, counter_t *p_counter, vlc_value_t val, vlc_value_t *new_val) |
| Update a statistics counter, according to its type If needed, perform a bit of computation (derivative, mostly) This function must be entered with stats handler lock. | |
| static void | TimerDump (vlc_object_t *p_this, counter_t *p_counter, bool) |
| counter_t * | stats_CounterCreate (vlc_object_t *p_this, int i_type, int i_compute_type) |
| Create a statistics counter. | |
| int | stats_Update (vlc_object_t *p_this, counter_t *p_counter, vlc_value_t val, vlc_value_t *val_new) |
| Update a counter element with new values. | |
| int | stats_Get (vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val) |
| Get the aggregated value for a counter. | |
| input_stats_t * | stats_NewInputStats (input_thread_t *p_input) |
| void | stats_ComputeInputStats (input_thread_t *p_input, input_stats_t *p_stats) |
| void | stats_ReinitInputStats (input_stats_t *p_stats) |
| void | stats_DumpInputStats (input_stats_t *p_stats) |
| void | stats_TimerStart (vlc_object_t *p_obj, const char *psz_name, unsigned int i_id) |
| void | stats_TimerStop (vlc_object_t *p_obj, unsigned int i_id) |
| void | stats_TimerDump (vlc_object_t *p_obj, unsigned int i_id) |
| void | stats_TimersDumpAll (vlc_object_t *p_obj) |
| void | stats_TimerClean (vlc_object_t *p_obj, unsigned int i_id) |
| void | stats_TimersCleanAll (vlc_object_t *p_obj) |
| void | stats_CounterClean (counter_t *p_c) |
| static int CounterUpdate | ( | vlc_object_t * | p_handler, | |
| counter_t * | p_counter, | |||
| vlc_value_t | val, | |||
| vlc_value_t * | new_val | |||
| ) | [static] |
Update a statistics counter, according to its type If needed, perform a bit of computation (derivative, mostly) This function must be entered with stats handler lock.
| p_counter | the counter to update | |
| val | the "new" value |
References counter_sample_t::date, vlc_value_t::f_float, counter_t::i_compute_type, vlc_value_t::i_int, counter_t::i_samples, counter_t::i_type, INSERT_ELEM, counter_t::last_update, mdate(), msg_Err, counter_t::pp_samples, counter_t::psz_name, vlc_value_t::psz_string, REMOVE_ELEM, STATS_COUNTER, STATS_DERIVATIVE, STATS_LAST, STATS_MAX, STATS_MIN, counter_t::update_interval, counter_sample_t::value, VLC_EGENERIC, VLC_SUCCESS, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.
Referenced by stats_Update().
| void stats_ComputeInputStats | ( | input_thread_t * | p_input, | |
| input_stats_t * | p_stats | |||
| ) |
References input_thread_private_t::counters, input_thread_private_t::counters_lock, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats_t::i_sent_bytes, input_stats_t::i_sent_packets, libvlc_stats, input_stats_t::lock, input_thread_t::p, input_thread_private_t::p_decoded_audio, input_thread_private_t::p_decoded_video, input_thread_private_t::p_demux_bitrate, input_thread_private_t::p_demux_corrupted, input_thread_private_t::p_demux_discontinuity, input_thread_private_t::p_demux_read, input_thread_private_t::p_displayed_pictures, input_thread_private_t::p_input_bitrate, input_thread_private_t::p_lost_abuffers, input_thread_private_t::p_lost_pictures, input_thread_private_t::p_played_abuffers, input_thread_private_t::p_read_bytes, input_thread_private_t::p_read_packets, input_thread_private_t::p_sout_send_bitrate, input_thread_private_t::p_sout_sent_bytes, input_thread_private_t::p_sout_sent_packets, stats_GetFloat, stats_GetInteger, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by End(), and MainLoopStatistic().
| void stats_CounterClean | ( | counter_t * | p_c | ) |
References i, counter_t::i_samples, counter_t::pp_samples, counter_t::psz_name, and REMOVE_ELEM.
Referenced by stats_TimerClean(), and stats_TimersCleanAll().
| counter_t* stats_CounterCreate | ( | vlc_object_t * | p_this, | |
| int | i_type, | |||
| int | i_compute_type | |||
| ) |
Create a statistics counter.
| p_this | a VLC object | |
| i_type | the type of stored data. One of VLC_VAR_STRING, VLC_VAR_INTEGER, VLC_VAR_FLOAT | |
| i_compute_type | the 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::i_type, counter_t::last_update, counter_t::pp_samples, counter_t::psz_name, and counter_t::update_interval.
| void stats_DumpInputStats | ( | input_stats_t * | p_stats | ) |
References input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_demux_read_bytes, input_stats_t::i_demux_read_packets, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
| int stats_Get | ( | vlc_object_t * | p_this, | |
| counter_t * | p_counter, | |||
| vlc_value_t * | val | |||
| ) |
Get the aggregated value for a counter.
| p_this | an object | |
| p_counter | the counter | |
| val | a pointer to an initialized vlc_value union. It will contain the retrieved value |
References counter_sample_t::date, vlc_value_t::f_float, counter_t::i_compute_type, vlc_value_t::i_int, counter_t::i_samples, counter_t::i_type, libvlc_stats, counter_t::pp_samples, STATS_COUNTER, STATS_DERIVATIVE, STATS_LAST, STATS_MAX, STATS_MIN, counter_sample_t::value, VLC_EGENERIC, VLC_SUCCESS, and VLC_VAR_INTEGER.
| input_stats_t* stats_NewInputStats | ( | input_thread_t * | p_input | ) |
References input_stats_t::lock, stats_ReinitInputStats(), and vlc_mutex_init().
Referenced by Create().
| void stats_ReinitInputStats | ( | input_stats_t * | p_stats | ) |
References input_stats_t::f_average_demux_bitrate, input_stats_t::f_average_input_bitrate, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_demux_read_packets, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats_t::i_sent_bytes, input_stats_t::i_sent_packets, input_stats_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by stats_NewInputStats().
| int stats_Update | ( | vlc_object_t * | p_this, | |
| counter_t * | p_counter, | |||
| vlc_value_t | val, | |||
| vlc_value_t * | val_new | |||
| ) |
Update a counter element with new values.
| p_this | a VLC object | |
| p_counter | the counter to update | |
| val | the vlc_value union containing the new value to aggregate. For more information on how data is aggregated, |
| val_new | a pointer that will be filled with new data |
References CounterUpdate(), libvlc_stats, and VLC_EGENERIC.
Referenced by stats_UpdateFloat(), and stats_UpdateInteger().
| static void TimerDump | ( | vlc_object_t * | p_this, | |
| counter_t * | p_counter, | |||
| bool | b_total | |||
| ) | [static] |
References vlc_value_t::b_bool, counter_sample_t::date, vlc_value_t::i_int, counter_t::i_samples, mdate(), msg_Dbg, msg_Err, counter_t::pp_samples, counter_t::psz_name, and counter_sample_t::value.
Referenced by stats_TimerDump(), and stats_TimersDumpAll().
1.5.6