{
int i_ret;
vlc_value_t val; val.i_int = 0;
+ if( !p_counter ) return VLC_EGENERIC;
i_ret = __stats_Get( p_obj, p_counter, &val );
*value = val.i_int;
return i_ret;
{
int i_ret;
vlc_value_t val; val.f_float = 0.0;
+ if( !p_counter ) return VLC_EGENERIC;
i_ret = __stats_Get( p_obj, p_counter, &val );
*value = val.f_float;
return i_ret;
int i_ret;
vlc_value_t val;
vlc_value_t new_val; new_val.i_int = 0;
+ if( !p_co ) return VLC_EGENERIC;
val.i_int = i;
i_ret = __stats_Update( p_obj, p_co, val, &new_val );
if( pi_new )
vlc_value_t val;
int i_ret;
vlc_value_t new_val;new_val.f_float = 0.0;
+ if( !p_co ) return VLC_EGENERIC;
val.f_float = f;
i_ret = __stats_Update( p_obj, p_co, val, &new_val );
if( pf_new )
counter_t * __stats_CounterCreate( vlc_object_t *p_this,
int i_type, int i_compute_type )
{
- counter_t *p_counter;
- if( !p_this->p_libvlc->b_stats ) return NULL;
-
- p_counter = (counter_t*) malloc( sizeof( counter_t ) ) ;
+ counter_t *p_counter = (counter_t*) malloc( sizeof( counter_t ) ) ;
p_counter->i_compute_type = i_compute_type;
p_counter->i_type = i_type;