]> git.sesse.net Git - vlc/commitdiff
* Avoid useless stats_Get calls
authorClément Stenac <zorglub@videolan.org>
Sat, 4 Feb 2006 11:04:42 +0000 (11:04 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 4 Feb 2006 11:04:42 +0000 (11:04 +0000)
* Reduce vlc_object_find calls

16 files changed:
NEWS
include/main.h
include/vlc_messages.h
include/vlc_symbols.h
modules/stream_out/transcode.c
src/audio_output/dec.c
src/audio_output/input.c
src/input/decoder.c
src/input/es_out.c
src/input/stream.c
src/libvlc.c
src/misc/hashtables.c
src/misc/stats.c
src/network/httpd.c
src/stream_output/stream_output.c
src/video_output/video_output.c

diff --git a/NEWS b/NEWS
index 4870ed6c6069818ae05e4f6a1d3b4b9928a10a34..41dac0b756c4e13b69a59020dcf5b4556c446471 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Changes between 0.8.4a and 0.8.5-svn (not yet released):
 --------------------------------------------------------
 
 Core support:
+ * Statistics collection (bitrates, packets, connections, ...)
 
 Input:
  * Initial support for RTSP-over-HTTP (to allow NAT traversal)
@@ -49,11 +50,9 @@ OS X Port:
  * Root wrapper to avoid running VLC as root
 
 Developers:
+ * New libvlc API (not finished yet)
  * Java bindings
 
-
-
-
 Changes between 0.8.4 and 0.8.4a:
 ---------------------------------
 
index a2a5c35ac502bb30811bfdb59709d130b8c90055..8b05e2b46a48807586726b1aec2ca23f4085d8fd 100644 (file)
@@ -62,6 +62,7 @@ struct libvlc_t
 
     /* Do stats ? - We keep this boolean to avoid unneeded lookups */
     vlc_bool_t             b_stats;
+    stats_handler_t       *p_stats;
 
     /* Arch-specific variables */
 #if !defined( WIN32 )
index b1f2fbd6947c7066e150c8a237770d185a75f60f..feef6dea38ddcb1e3e813992d37b867eed6f0b7b 100644 (file)
@@ -249,8 +249,8 @@ struct stats_handler_t
 
 VLC_EXPORT( void, stats_HandlerDestroy, (stats_handler_t*) );
 
-#define stats_Update( a,b,c) __stats_Update( VLC_OBJECT( a ), b, c )
-VLC_EXPORT( int, __stats_Update, (vlc_object_t*, const char *, vlc_value_t) );
+#define stats_Update( a,b,c, d) __stats_Update( VLC_OBJECT( a ), b, c, d )
+VLC_EXPORT( int, __stats_Update, (vlc_object_t*, const char *, vlc_value_t, vlc_value_t *) );
 #define stats_Create( a,b,c,d ) __stats_Create( VLC_OBJECT(a), b, c, d )
 VLC_EXPORT( int, __stats_Create, (vlc_object_t*, const char *, int, int) );
 #define stats_Get( a,b,c,d ) __stats_Create( VLC_OBJECT(a), b, c, d )
@@ -277,21 +277,31 @@ static inline int __stats_GetFloat( vlc_object_t *p_obj, int i_id,
     *value = val.f_float;
     return i_ret;
 }
-#define stats_UpdateInteger( a,b,c ) __stats_UpdateInteger( VLC_OBJECT(a),b,c )
+#define stats_UpdateInteger( a,b,c,d ) __stats_UpdateInteger( VLC_OBJECT(a),b,c,d )
 static inline int __stats_UpdateInteger( vlc_object_t *p_obj,
-                                         const char *psz_name, int i )
+                                         const char *psz_name, int i, int *pi_new )
 {
+    int i_ret;
     vlc_value_t val;
+    vlc_value_t new_val;
     val.i_int = i;
-    return __stats_Update( p_obj, psz_name, val );
+    i_ret = __stats_Update( p_obj, psz_name, val , &new_val );
+    if( pi_new )
+        *pi_new = new_val.i_int;
+    return i_ret;
 }
-#define stats_UpdateFloat( a,b,c ) __stats_UpdateFloat( VLC_OBJECT(a),b,c )
+#define stats_UpdateFloat( a,b,c,d ) __stats_UpdateFloat( VLC_OBJECT(a),b,c,d )
 static inline int __stats_UpdateFloat( vlc_object_t *p_obj,
-                                       const char *psz_name, float f )
+                                       const char *psz_name, float f, float *pf_new )
 {
     vlc_value_t val;
+    int i_ret;
+    vlc_value_t new_val;
     val.f_float = f;
-    return __stats_Update( p_obj, psz_name, val );
+    i_ret =  __stats_Update( p_obj, psz_name, val, &new_val );
+    if( pf_new )
+        *pf_new = new_val.f_float;
+    return i_ret;
 }
 
 /******************
index e22d64f162442ae3035f757f862d147e3220a258..746d2e52b03d055434671becf88524a5fb73ee77 100644 (file)
@@ -124,7 +124,7 @@ void vlm_MessageDelete (vlm_message_t *);
 void vout_SynchroDecode (vout_synchro_t *);
 int playlist_Delete (playlist_t *, int);
 void aout_FiltersPlay (aout_instance_t * p_aout, aout_filter_t ** pp_filters, int i_nb_filters, aout_buffer_t ** pp_input_buffer);
-int __stats_Update (vlc_object_t*, const char *, vlc_value_t);
+int __stats_Update (vlc_object_t*, const char *, vlc_value_t, vlc_value_t *);
 int __stats_Get (vlc_object_t*, int, const char *, vlc_value_t*);
 char* httpd_ClientIP (httpd_client_t *cl, char *psz_ip);
 int __intf_UserProgress (vlc_object_t*, const char*, const char*, float);
@@ -897,7 +897,7 @@ struct module_symbols_t
     void (*__intf_UserProgressUpdate_inner) (vlc_object_t*, int, const char*, float);
     void (*__intf_UserHide_inner) (vlc_object_t *, int);
     int (*__stats_Create_inner) (vlc_object_t*, const char *, int, int);
-    int (*__stats_Update_inner) (vlc_object_t*, const char *, vlc_value_t);
+    int (*__stats_Update_inner) (vlc_object_t*, const char *, vlc_value_t, vlc_value_t *);
     int (*__stats_Get_inner) (vlc_object_t*, int, const char *, vlc_value_t*);
     void (*stats_ComputeInputStats_inner) (input_thread_t*, input_stats_t*);
     void (*stats_DumpInputStats_inner) (input_stats_t *);
index affb9fa426f5cf883d8d59a0ee65b3abdd9d3aba..043ed5e07cc95d8c29d9e4a27e3d9d8cb309447d 100644 (file)
@@ -1328,7 +1328,7 @@ static int transcode_audio_process( sout_stream_t *p_stream,
     while( (p_audio_buf = id->p_decoder->pf_decode_audio( id->p_decoder,
                                                           &in )) )
     {
-        stats_UpdateInteger( p_stream->p_parent->p_parent, "decoded_audio", 1 );
+        stats_UpdateInteger( p_stream->p_parent->p_parent, "decoded_audio", 1, NULL );
         if( p_sys->b_master_sync )
         {
             mtime_t i_dts = date_Get( &id->interpolated_pts ) + 1;
@@ -1731,7 +1731,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
     while( (p_pic = id->p_decoder->pf_decode_video( id->p_decoder, &in )) )
     {
         subpicture_t *p_subpic = 0;
-        stats_UpdateInteger( p_stream->p_parent->p_parent, "decoded_video", 1 );
+        stats_UpdateInteger( p_stream->p_parent->p_parent, "decoded_video", 1, NULL );
 
         if( p_stream->p_sout->i_out_pace_nocontrol && p_sys->b_hurry_up )
         {
index be81b099095f3760487bb82bf91ee5d910820ff4..5e721bb5c46b08c231742af6739f0f6a0e9b4f27 100644 (file)
@@ -312,7 +312,8 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input,
                   p_buffer->start_date - mdate());
         if( p_input->p_input_thread )
         {
-            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 );
+            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1,
+                                 NULL );
         }
         aout_BufferFree( p_buffer );
         return -1;
@@ -367,7 +368,7 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input,
     if( p_input->p_input_thread )
     {
         stats_UpdateInteger( p_input->p_input_thread,
-                            "played_abuffers", 1 );
+                            "played_abuffers", 1, NULL );
     }
     vlc_mutex_unlock( &p_aout->mixer_lock );
 
index 8bae89cc061f3dec21e08194e85ffa39f05eec9f..a7a5226e43435b6bc38f4a71ac43462a7f84a3da 100644 (file)
@@ -447,7 +447,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
         start_date = 0;
         if( p_input->p_input_thread )
         {
-            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 );
+            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1,
+                                 NULL );
         }
     }
 
@@ -459,7 +460,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
                   mdate() - p_buffer->start_date );
         if( p_input->p_input_thread )
         {
-            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 );
+            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1,
+                                 NULL );
         }
         aout_BufferFree( p_buffer );
         p_input->i_resampling_type = AOUT_RESAMPLING_NONE;
@@ -500,7 +502,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
         aout_BufferFree( p_buffer );
         if( p_input->p_input_thread )
         {
-            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 );
+            stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1,
+                                 NULL );
         }
         return 0;
     }
index 21cff07c8e560bf328fb0748903aadda5e60a5ee..c078dbba5494d29fbcf595b74e4d2ed95d621fdf 100644 (file)
@@ -627,7 +627,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
                     while( (p_aout_buf = p_dec->pf_decode_audio( p_dec,
                                                        &p_packetized_block )) )
                     {
-                        stats_UpdateInteger( p_dec->p_parent, "decoded_audio", 1 );
+                        stats_UpdateInteger( p_dec->p_parent, "decoded_audio", 1, NULL );
                         /* FIXME the best would be to handle the case start_date < preroll < end_date
                          * but that's not easy with non raw audio stream */
                         if( p_dec->p_owner->i_preroll_end > 0 &&
@@ -651,7 +651,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
         }
         else while( (p_aout_buf = p_dec->pf_decode_audio( p_dec, &p_block )) )
         {
-            stats_UpdateInteger( p_dec->p_parent, "decoded_audio", 1 );
+            stats_UpdateInteger( p_dec->p_parent, "decoded_audio", 1, NULL );
             if( p_dec->p_owner->i_preroll_end > 0 &&
                 p_aout_buf->start_date < p_dec->p_owner->i_preroll_end )
             {
@@ -698,7 +698,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
                                                        &p_packetized_block )) )
                     {
                         stats_UpdateInteger( p_dec->p_parent, "decoded_video",
-                                                             1 );
+                                                             1, NULL );
                         if( p_dec->p_owner->i_preroll_end > 0 &&
                             p_pic->date < p_dec->p_owner->i_preroll_end )
                         {
@@ -719,7 +719,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
         }
         else while( (p_pic = p_dec->pf_decode_video( p_dec, &p_block )) )
         {
-            stats_UpdateInteger( p_dec->p_parent, "decoded_video", 1 );
+            stats_UpdateInteger( p_dec->p_parent, "decoded_video", 1 , NULL);
             if( p_dec->p_owner->i_preroll_end > 0 &&
                 p_pic->date < p_dec->p_owner->i_preroll_end )
             {
@@ -739,7 +739,7 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
         subpicture_t *p_spu;
         while( (p_spu = p_dec->pf_decode_sub( p_dec, &p_block ) ) )
         {
-            stats_UpdateInteger( p_dec->p_parent, "decoded_sub", 1 );
+            stats_UpdateInteger( p_dec->p_parent, "decoded_sub", 1 , NULL);
             if( p_dec->p_owner->i_preroll_end > 0 &&
                 p_spu->i_start < p_dec->p_owner->i_preroll_end &&
                 ( p_spu->i_stop <= 0 || p_spu->i_stop <= p_dec->p_owner->i_preroll_end ) )
index 4525aeed583ac85a307f391c5eb3ea39f550d400..a919a309157ae2a0527a237ca452dadcb5162ba6 100644 (file)
@@ -1033,10 +1033,9 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
 
     if( p_input->p_libvlc->b_stats )
     {
-        stats_UpdateInteger( p_input, "demux_read", p_block->i_buffer );
-        stats_GetInteger( p_input, p_input->i_object_id, "demux_read",
-                          &i_total );
-        stats_UpdateFloat( p_input , "demux_bitrate", (float)i_total );
+        stats_UpdateInteger( p_input, "demux_read", p_block->i_buffer,
+                             &i_total );
+        stats_UpdateFloat( p_input , "demux_bitrate", (float)i_total, NULL );
     }
 
     /* Mark preroll blocks */
index 905248ff07ce7b5be7dcf844ae6722d37b2fac51..3ce55b270e88dc8820a861154c78a76b6ba793d6 100644 (file)
@@ -1580,12 +1580,11 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
     if( !p_sys->i_list )
     {
         i_read = p_access->pf_read( p_access, p_read, i_read );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read );
-        stats_GetInteger( s, s->p_parent->p_parent->i_object_id,
-                          "read_bytes", &i_total );
+        stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read,
+                             &i_total );
         stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
-                          (float)i_total );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 );
+                           (float)i_total, NULL );
+        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
         return i_read;
     }
 
@@ -1614,12 +1613,11 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
     }
 
     /* Update read bytes in input */
-    stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read );
-    stats_GetInteger( s, s->p_parent->p_parent->i_object_id,
-                      "read_bytes", &i_total );
+    stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read,
+                         &i_total );
     stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
-                      (float)i_total );
-    stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 );
+                      (float)i_total, NULL );
+    stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
     return i_read;
 }
 
@@ -1638,12 +1636,10 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
         if( p_block && p_access->p_libvlc->b_stats )
         {
             stats_UpdateInteger( s->p_parent->p_parent, "read_bytes",
-                                 p_block->i_buffer );
-            stats_GetInteger( s, s->p_parent->p_parent->i_object_id,
-                              "read_bytes", &i_total );
+                                 p_block->i_buffer, &i_total );
             stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
-                              (float)i_total );
-            stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 );
+                              (float)i_total, NULL );
+            stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
         }
         return p_block;
     }
@@ -1675,12 +1671,10 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
     if( p_block )
     {
         stats_UpdateInteger( s->p_parent->p_parent, "read_bytes",
-                             p_block->i_buffer );
-        stats_GetInteger( s, s->p_parent->p_parent->i_object_id,
-                          "read_bytes", &i_total );
+                             p_block->i_buffer, &i_total );
         stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
-                          (float)i_total );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 );
+                          (float)i_total, NULL );
+        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 , NULL);
     }
 
     return p_block;
index 56ee835faf9ec64cc524611f7ad6db663f499d0f..a81ba730e607ca0dc145e0be03652619bab888ac 100644 (file)
@@ -691,6 +691,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
     }
 
     libvlc.b_stats = config_GetInt( p_vlc, "stats" );
+    libvlc.p_stats = NULL;
 
     /*
      * Initialize hotkey handling
index c4c04568861a82fb44d80e70ce040ba68233e5d4..67185b298c1861df3d7774e7f02486b03b5601a2 100644 (file)
@@ -218,7 +218,7 @@ static uint64_t HashString( const char *psz_string, int i_id )
         i_hash ^= i_hash >> 8;
     }
 
-    i_hash += ( i_id << 32 );
+    i_hash += ( (uint64_t)i_id << 32 );
 
     return i_hash;
 }
index fe04bb154d638ad3007df882e9558b23ba610a49..a34e090f9dad42c52e6bed6813e1643f12e38ed6 100644 (file)
@@ -36,7 +36,7 @@ static counter_t *GetCounter( stats_handler_t *p_handler, int i_object_id,
                               const char *psz_name );
 static int stats_CounterUpdate( stats_handler_t *p_handler,
                                 counter_t *p_counter,
-                                vlc_value_t val );
+                                vlc_value_t val, vlc_value_t * );
 static stats_handler_t* stats_HandlerCreate( vlc_object_t *p_this );
 static stats_handler_t *stats_HandlerGet( vlc_object_t *p_this );
 
@@ -126,7 +126,7 @@ int __stats_Create( vlc_object_t *p_this, const char *psz_name, int i_type,
  * more information on how data is aggregated, \see __stats_Create
  */
 int __stats_Update( vlc_object_t *p_this, const char *psz_name,
-                    vlc_value_t val )
+                    vlc_value_t val, vlc_value_t *val_new )
 {
     int i_ret;
     counter_t *p_counter;
@@ -151,7 +151,7 @@ int __stats_Update( vlc_object_t *p_this, const char *psz_name,
         return VLC_ENOOBJ;
     }
 
-    i_ret = stats_CounterUpdate( p_handler, p_counter, val );
+    i_ret = stats_CounterUpdate( p_handler, p_counter, val, val_new );
     vlc_mutex_unlock( &p_handler->object_lock );
 
     return i_ret;
@@ -492,7 +492,7 @@ void __stats_TimersDumpAll( vlc_object_t *p_obj )
  */
 static int stats_CounterUpdate( stats_handler_t *p_handler,
                                 counter_t *p_counter,
-                                vlc_value_t val )
+                                vlc_value_t val, vlc_value_t *new_val )
 {
     switch( p_counter->i_compute_type )
     {
@@ -544,6 +544,7 @@ static int stats_CounterUpdate( stats_handler_t *p_handler,
                     free( p_counter->pp_samples[0]->value.psz_string );
                 }
                 p_counter->pp_samples[0]->value = val;
+                *new_val = p_counter->pp_samples[0]->value;
             }
         }
         break;
@@ -596,9 +597,14 @@ static int stats_CounterUpdate( stats_handler_t *p_handler,
             switch( p_counter->i_type )
             {
             case VLC_VAR_INTEGER:
-            case VLC_VAR_FLOAT:
                 p_counter->pp_samples[0]->value.i_int += val.i_int;
+                if( new_val )
+                    new_val->i_int = p_counter->pp_samples[0]->value.i_int;
                 break;
+            case VLC_VAR_FLOAT:
+                p_counter->pp_samples[0]->value.f_float += val.f_float;
+                if( new_val )
+                    new_val->f_float = p_counter->pp_samples[0]->value.f_float;
             default:
                 msg_Err( p_handler, "Trying to increment invalid variable %s",
                          p_counter->psz_name );
@@ -621,9 +627,7 @@ static counter_t *GetCounter( stats_handler_t *p_handler, int i_object_id,
 
 static stats_handler_t *stats_HandlerGet( vlc_object_t *p_this )
 {
-    stats_handler_t *p_handler = (stats_handler_t*)
-                          vlc_object_find( p_this->p_vlc, VLC_OBJECT_STATS,
-                                           FIND_ANYWHERE );
+    stats_handler_t *p_handler = p_this->p_libvlc->p_stats;
     if( !p_handler )
     {
         p_handler = stats_HandlerCreate( p_this );
@@ -631,8 +635,8 @@ static stats_handler_t *stats_HandlerGet( vlc_object_t *p_this )
         {
             return NULL;
         }
-        vlc_object_yield( p_handler );
     }
+    vlc_object_yield( p_handler );
     return p_handler;
 }
 
@@ -657,11 +661,13 @@ static stats_handler_t* stats_HandlerCreate( vlc_object_t *p_this )
         return NULL;
     }
     p_handler->i_counters = 0;
-    p_handler->p_counters = (hashtable_entry_t *) malloc( 5 * sizeof( variable_t ) );
+    p_handler->p_counters = (hashtable_entry_t *) malloc( 4 * sizeof( variable_t ) );
 
     /// \bug is it p_vlc or p_libvlc ?
     vlc_object_attach( p_handler, p_this->p_vlc );
 
+    p_this->p_libvlc->p_stats = p_handler;
+
     return p_handler;
 }
 
index 931798b38626970b6cbe9d0b52a224079f32836a..c1ddfc98b600687f4ee66472b0cbdd54fc564a03 100644 (file)
@@ -2106,7 +2106,7 @@ static void httpd_HostThread( httpd_host_t *host )
                     cl->i_activity_date+cl->i_activity_timeout < mdate()) ) ) )
             {
                 httpd_ClientClean( cl );
-                stats_UpdateInteger( host, "active_connections", -1 );
+                stats_UpdateInteger( host, "active_connections", -1, NULL );
                 TAB_REMOVE( host->i_client, host->client, cl );
                 free( cl );
                 i_client--;
@@ -2560,8 +2560,10 @@ static void httpd_HostThread( httpd_host_t *host )
                     if( fd >= 0 )
                     {
                         httpd_client_t *cl;
-                        stats_UpdateInteger( host, "client_connections", 1 );
-                        stats_UpdateInteger( host, "active_connections", 1 );
+                        stats_UpdateInteger( host, "client_connections", 1,
+                                             NULL );
+                        stats_UpdateInteger( host, "active_connections", 1,
+                                             NULL );
                         cl = httpd_ClientNew( fd, &sock, i_sock_size, p_tls );
                         p_tls = NULL;
                         vlc_mutex_lock( &host->lock );
index a673fd77a5152ada1dced883198b33dab29fdbe1..4bfd91dab19c4a0cbf9a08f221bae2e3df88274c 100644 (file)
@@ -381,14 +381,11 @@ int sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer )
                                                FIND_PARENT );
         if( p_input )
         {
-            stats_UpdateInteger( p_input, "sout_sent_packets", 10 );
+            stats_UpdateInteger( p_input, "sout_sent_packets", 10, NULL );
             stats_UpdateInteger( p_input, "sout_sent_bytes",
-                                 p_access->i_sent_bytes );
-            stats_GetInteger( p_input,
-                              p_access->p_parent->p_parent->i_object_id,
-                              "sout_sent_bytes", &i_total );
-            stats_UpdateFloat( p_input, "sout_send_bitrate", (float)i_total );
-
+                                 p_access->i_sent_bytes, &i_total );
+            stats_UpdateFloat( p_input, "sout_send_bitrate", (float)i_total,
+                               NULL );
             p_access->i_sent_bytes = 0;
             vlc_object_release( p_input );
         }
index 7e77af015a728f6d9b181509108b013ef56d5813..11567495682af69c4b1638f01110559d0fcbdf6f 100644 (file)
@@ -814,7 +814,7 @@ static void RunThread( vout_thread_t *p_vout)
                 }
                 msg_Warn( p_vout, "late picture skipped ("I64Fd")",
                                   current_date - display_date );
-                stats_UpdateInteger( p_vout, "lost_pictures", 1 );
+                stats_UpdateInteger( p_vout, "lost_pictures", 1 , NULL);
                 vlc_mutex_unlock( &p_vout->picture_lock );
 
                 continue;
@@ -837,7 +837,7 @@ static void RunThread( vout_thread_t *p_vout)
                     p_picture->i_status = DESTROYED_PICTURE;
                     p_vout->i_heap_size--;
                 }
-                stats_UpdateInteger( p_vout, "lost_pictures", 1 );
+                stats_UpdateInteger( p_vout, "lost_pictures", 1, NULL );
                 msg_Warn( p_vout, "vout warning: early picture skipped "
                           "("I64Fd")", display_date - current_date
                           - p_vout->i_pts_delay );
@@ -895,7 +895,7 @@ static void RunThread( vout_thread_t *p_vout)
         /*
          * Perform rendering
          */
-        stats_UpdateInteger( p_vout, "displayed_pictures", 1 );
+        stats_UpdateInteger( p_vout, "displayed_pictures", 1, NULL );
         p_directbuffer = vout_RenderPicture( p_vout, p_picture, p_subpic );
 
         /*