vlc | branch: master | Jean-Paul Saman <[email protected]> | Fri Dec  3 
16:09:10 2010 +0100| [4fb8ca6785699cba7129fbd9991dc925c33903a1] | committer: 
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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4fb8ca6785699cba7129fbd9991dc925c33903a1
---

 modules/access/v4l2.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 7fbd04b..7d79b41 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -567,7 +567,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;
 
@@ -581,7 +580,6 @@ struct demux_sys_t
     /* Controls */
     char *psz_set_ctrls;
 
-
 #ifdef HAVE_LIBV4L2
     /* */
     int (*pf_open)(const char *, int, ...);
@@ -707,8 +705,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" )];
 
@@ -1352,15 +1348,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 )
     {
@@ -1481,7 +1468,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;

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to