]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_output.c
Stop using strings to index stats, use integers. The list is not sorted yet, though
[vlc] / src / video_output / video_output.c
index 11567495682af69c4b1638f01110559d0fcbdf6f..129e361ae4ad53b109e21893f95ae9b954f55cdd 100644 (file)
@@ -229,9 +229,10 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
         return NULL;
     }
 
-    stats_Create( p_vout, "displayed_pictures", VLC_VAR_INTEGER,
-                                                 STATS_COUNTER );
-    stats_Create( p_vout, "lost_pictures", VLC_VAR_INTEGER, STATS_COUNTER );
+    stats_Create( p_vout, "displayed_pictures",STATS_DISPLAYED_PICTURES,
+                  VLC_VAR_INTEGER, STATS_COUNTER );
+    stats_Create( p_vout, "lost_pictures", STATS_LOST_PICTURES,
+                  VLC_VAR_INTEGER, STATS_COUNTER );
 
     /* Initialize pictures - translation tables and functions
      * will be initialized later in InitThread */
@@ -814,7 +815,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 , NULL);
+                stats_UpdateInteger( p_vout, STATS_LOST_PICTURES, 1 , NULL);
                 vlc_mutex_unlock( &p_vout->picture_lock );
 
                 continue;
@@ -837,7 +838,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, NULL );
+                stats_UpdateInteger( p_vout, STATS_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 +896,7 @@ static void RunThread( vout_thread_t *p_vout)
         /*
          * Perform rendering
          */
-        stats_UpdateInteger( p_vout, "displayed_pictures", 1, NULL );
+        stats_UpdateInteger( p_vout, STATS_DISPLAYED_PICTURES, 1, NULL );
         p_directbuffer = vout_RenderPicture( p_vout, p_picture, p_subpic );
 
         /*