* the global stats. Check if there is already someone doing this */
if( p_input->p_libvlc->p_stats && !b_quick )
{
+ libvlc_priv_t *priv = libvlc_priv (p_input->p_libvlc);
vlc_mutex_lock( &p_input->p_libvlc->p_stats->lock );
- if( p_input->p_libvlc->p_stats_computer == NULL )
- {
- p_input->p_libvlc->p_stats_computer = p_input;
- }
+ if( priv->p_stats_computer == NULL )
+ priv->p_stats_computer = p_input;
vlc_mutex_unlock( &p_input->p_libvlc->p_stats->lock );
}
{
stats_ComputeInputStats( p_input, p_input->p->input.p_item->p_stats );
/* Are we the thread responsible for computing global stats ? */
- if( p_input->p_libvlc->p_stats_computer == p_input )
+ if( libvlc_priv (p_input->p_libvlc)->p_stats_computer == p_input )
{
stats_ComputeGlobalStats( p_input->p_libvlc,
- p_input->p_libvlc->p_stats );
+ p_input->p_libvlc->p_stats );
}
}
}
#define CL_CO( c ) stats_CounterClean( p_input->p->counters.p_##c ); p_input->p->counters.p_##c = NULL;
if( libvlc_stats (p_input) )
{
+ libvlc_priv_t *priv = libvlc_priv (p_input->p_libvlc);
+
/* make sure we are up to date */
stats_ComputeInputStats( p_input, p_input->p->input.p_item->p_stats );
- if( p_input->p_libvlc->p_stats_computer == p_input )
+ if( priv->p_stats_computer == p_input )
{
stats_ComputeGlobalStats( p_input->p_libvlc,
p_input->p_libvlc->p_stats );
- p_input->p_libvlc->p_stats_computer = NULL;
+ priv->p_stats_computer = NULL;
}
CL_CO( read_bytes );
CL_CO( read_packets );
int i_timers; ///< Number of timers
bool b_stats; ///< Whether to collect stats
+ void *p_stats_computer; ///< Input thread computing stats
+ /// (needs cleanup)
+
module_t *p_memcpy_module; ///< Fast memcpy plugin used
vlm_t *p_vlm; ///< VLM if created from libvlc-common.c
vlc_object_t *p_interaction; ///< interface interaction object