Commit 437e8ef6 authored by Jean-Paul Saman's avatar Jean-Paul Saman

rawvideo: cleanup

parent c55c4fb6
......@@ -51,12 +51,6 @@ struct decoder_sys_t
* Common properties
*/
date_t pts;
/* stats */
mtime_t i_pts_start;
mtime_t i_pts_end;
int i_fps;
int i_pics;
};
/****************************************************************************
......@@ -169,7 +163,6 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->fmt_out.video.i_frame_rate_base);
date_Init( &p_sys->pts, 25, 1 );
}
p_sys->i_fps = 25;
/* Find out p_vdec->i_raw_size */
vout_InitFormat( &p_dec->fmt_out.video, p_dec->fmt_in.i_codec,
......@@ -205,34 +198,6 @@ static int OpenPacketizer( vlc_object_t *p_this )
return i_ret;
}
static inline FPSMeasurements( decoder_t *p_dec )
{
decoder_sys_t *p_sys = p_dec->p_sys;
p_sys->i_pics++;
if( p_sys->i_pics == 1 )
{
p_sys->i_pts_start = mdate();
}
if( p_sys->i_pics == p_sys->i_fps )
{
mtime_t i_diff; /* in us */
double f_fps;
p_sys->i_pts_end = mdate(); /* in us */
i_diff = (p_sys->i_pts_end - p_sys->i_pts_start);
f_fps = (double)((i_diff / (int64_t)p_sys->i_pics)); /* 1 frame per us */
f_fps = ((double)1/f_fps) * (double)1000000;
msg_Info( p_dec, "Packetizer: %d frames per %"PRId64" micro seconds (%4.2f fps)",
p_sys->i_pics, i_diff, f_fps );
/* reset timers */
p_sys->i_pics = 0;
p_sys->i_pts_start = p_sys->i_pts_end = (mtime_t)0;
}
}
/****************************************************************************
* DecodeBlock: the whole thing
****************************************************************************
......@@ -291,7 +256,6 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
date_Increment( &p_sys->pts, 1 );
*pp_block = NULL;
FPSMeasurements( p_dec );
return p_buf;
}
......
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