Commit f666ec10 authored by Christophe Massiot's avatar Christophe Massiot

More stats.

NB : it is necessary to re-run ./configure
parent 8ccff3d7
......@@ -322,6 +322,9 @@
#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
*/
......
......@@ -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
......
......@@ -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
*/
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment