]> git.sesse.net Git - vlc/commitdiff
More stats.
authorChristophe Massiot <massiot@videolan.org>
Tue, 28 Nov 2000 19:58:14 +0000 (19:58 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 28 Nov 2000 19:58:14 +0000 (19:58 +0000)
NB : it is necessary to re-run ./configure

include/config.h.in
include/video_output.h
src/video_output/video_output.c
src/video_parser/video_parser.c

index 80015c2a1ab4675d8f11c6e2f529ee542a63bdda..f94ca152b6df14222fd698ac0879d596bf6e172a 100644 (file)
 #define VOUT_DEFAULT_FONT               "default8x9.psf"
 #define VOUT_LARGE_FONT                 "default8x16.psf"
 
+/* Statistics are displayed every n loops (=~ pictures) */
+#define VOUT_STATS_NB_LOOPS             100
+
 /*
  * Time settings
  */
index b4bf70cfc304f517708fc24572197232d05c6cf2..6f5c41bebe3cc32d91a8582fef4621f72c973e3f 100644 (file)
@@ -206,6 +206,10 @@ typedef struct vout_thread_s
     /* Bitmap fonts */
     p_vout_font_t       p_default_font;                      /* default font */
     p_vout_font_t       p_large_font;                          /* large font */
+
+#ifdef STATS
+    count_t             c_loops;
+#endif
 } vout_thread_t;
 
 /* Flags for changes - these flags are set in the i_changes field when another
index 17473518efe0bb67001791129ead4bb0acb3fa0b..556193e7f81fd2bc70f995bb5a20490162fce861 100644 (file)
@@ -913,6 +913,10 @@ static int InitThread( vout_thread_t *p_vout )
     intf_DbgMsg("\n");
     *p_vout->pi_status = THREAD_START;
 
+#ifdef STATS
+    p_vout->c_loops = 0;
+#endif
+
    /* Initialize output method - this function issues its own error messages */
     if( p_vout->p_sys_init( p_vout ) )
     {
@@ -973,6 +977,14 @@ static void RunThread( vout_thread_t *p_vout)
         p_subpic =      NULL;
         display_date =  0;
         current_date =  mdate();
+#ifdef STATS
+        p_vout->c_loops++;
+        if( !(p_vout->c_loops % VOUT_STATS_NB_LOOPS) )
+        {
+            intf_Msg("vout stats: picture heap: %d/%d\n",
+                     p_vout->i_pictures, VOUT_MAX_PICTURES);
+        }
+#endif
 
         /*
          * Find the picture to display - this operation does not need lock,
@@ -1712,7 +1724,7 @@ static void RenderPictureInfo( vout_thread_t *p_vout, picture_t *p_pic )
              (long) p_vout->c_fps_samples, (long) p_vout->render_time );
     Print( p_vout, 0, 0, LEFT_RALIGN, TOP_RALIGN, psz_buffer );
 
-#ifdef DEBUG
+#ifdef STATS
     /*
      * Print picture information in lower right corner
      */
index 90b6909c2e588f09640aa9a841eea15563838614..b27c51e7c47096e17c82153269257d628a5bbd9c 100644 (file)
@@ -418,6 +418,14 @@ static void EndThread( vpar_thread_t *p_vpar )
              p_vpar->pc_malformed_pictures[I_CODING_TYPE],
              p_vpar->pc_malformed_pictures[P_CODING_TYPE],
              p_vpar->pc_malformed_pictures[B_CODING_TYPE]);
+#define S   p_vpar->sequence
+    intf_Msg("vpar info: %s stream (%dx%d), %d/1001 pi/s\n",
+             S.b_mpeg2 ? "MPEG-2" : "MPEG-1",
+             S.i_width, S.i_height, S.i_frame_rate);
+    intf_Msg("vpar info: %s, %s, matrix_coeff: %d\n",
+             S.b_progressive ? "Progressive" : "Non-progressive",
+             S.i_scalable_mode ? "scalable" : "non-scalable",
+             S.i_matrix_coefficients);
 #endif
 
     /* Destroy thread structures allocated by InitThread */