Commit a40c6777 authored by Jean-Paul Saman's avatar Jean-Paul Saman

access/v4l2: remove framerate reduction code.

The framerate reduction code is not needed. If the user did not set
the requested framerate, then the v4l2 module asks the driver for its
default value. When fps is specified by the user then that one is used.
parent 5abe9f8f
......@@ -568,7 +568,6 @@ struct demux_sys_t
int i_height;
unsigned int i_aspect;
float f_fps; /* <= 0.0 mean to grab at full rate */
mtime_t i_video_pts; /* only used when f_fps > 0 */
int i_fourcc;
uint32_t i_block_flags;
......@@ -582,7 +581,6 @@ struct demux_sys_t
/* Controls */
char *psz_set_ctrls;
#ifdef HAVE_LIBV4L2
/* */
int (*pf_open)(const char *, int, ...);
......@@ -708,8 +706,6 @@ static int DemuxOpen( vlc_object_t *p_this )
*****************************************************************************/
static void GetV4L2Params( demux_sys_t *p_sys, vlc_object_t *p_obj )
{
p_sys->i_video_pts = -1;
p_sys->i_selected_standard_id =
i_standards_list[var_CreateGetInteger( p_obj, "v4l2-standard" )];
......@@ -1354,15 +1350,6 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys )
struct v4l2_buffer buf;
ssize_t i_ret;
if( p_sys->f_fps >= 0.1 && p_sys->i_video_pts > 0 )
{
mtime_t i_dur = (mtime_t)((double)1000000 / (double)p_sys->f_fps);
/* Did we wait long enough ? (frame rate reduction) */
if( p_sys->i_video_pts + i_dur > mdate() )
return NULL;
}
/* Grab Video Frame */
switch( p_sys->io )
{
......@@ -1483,7 +1470,7 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys )
}
/* Timestamp */
p_sys->i_video_pts = p_block->i_pts = p_block->i_dts = mdate();
p_block->i_pts = p_block->i_dts = mdate();
p_block->i_flags |= p_sys->i_block_flags;
return p_block;
......
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