- stats_CounterCreate( p_input, VLC_VAR_##type, STATS_##compute);
- if( p_input->p_libvlc->b_stats )
- {
- INIT_COUNTER( read_bytes, INTEGER, COUNTER );
- INIT_COUNTER( read_packets, INTEGER, COUNTER );
- INIT_COUNTER( demux_read, INTEGER, COUNTER );
- INIT_COUNTER( input_bitrate, FLOAT, DERIVATIVE );
- INIT_COUNTER( demux_bitrate, FLOAT, DERIVATIVE );
- INIT_COUNTER( played_abuffers, INTEGER, COUNTER );
- INIT_COUNTER( lost_abuffers, INTEGER, COUNTER );
- INIT_COUNTER( displayed_pictures, INTEGER, COUNTER );
- INIT_COUNTER( lost_pictures, INTEGER, COUNTER );
- INIT_COUNTER( decoded_audio, INTEGER, COUNTER );
- INIT_COUNTER( decoded_video, INTEGER, COUNTER );
- INIT_COUNTER( decoded_sub, INTEGER, COUNTER );
- 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_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;
- }
-
- /* Find a usable sout and attach it to p_input */
- psz = var_GetString( p_input, "sout" );
- if( *psz && strncasecmp( p_input->p->input.p_item->psz_uri, "vlc:", 4 ) )
- {
- /* Check the validity of the provided sout */
- if( p_input->p->p_sout )
- {
- if( strcmp( p_input->p->p_sout->psz_sout, psz ) )
- {
- msg_Dbg( p_input, "destroying unusable sout" );
+ stats_CounterCreate( p_input, VLC_VAR_##type, STATS_##compute);
+ if( libvlc_stats (p_input) )
+ {
+ INIT_COUNTER( read_bytes, INTEGER, COUNTER );
+ INIT_COUNTER( read_packets, INTEGER, COUNTER );
+ INIT_COUNTER( demux_read, INTEGER, COUNTER );
+ INIT_COUNTER( input_bitrate, FLOAT, DERIVATIVE );
+ INIT_COUNTER( demux_bitrate, FLOAT, DERIVATIVE );
+ INIT_COUNTER( played_abuffers, INTEGER, COUNTER );
+ INIT_COUNTER( lost_abuffers, INTEGER, COUNTER );
+ INIT_COUNTER( displayed_pictures, INTEGER, COUNTER );
+ INIT_COUNTER( lost_pictures, INTEGER, COUNTER );
+ INIT_COUNTER( decoded_audio, INTEGER, COUNTER );
+ INIT_COUNTER( decoded_video, INTEGER, COUNTER );
+ INIT_COUNTER( decoded_sub, INTEGER, COUNTER );
+ 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_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;
+ }
+}