From b6755a70004a445a475e6c4b1c2d289e908cf2a9 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sun, 1 Mar 2009 19:55:26 +0100 Subject: Wait for a frame to become available before capturing it Use GstPoll to wait for the fd of the video device to become readable before trying to capture a frame. This speeds up stopping v4l2src a lot as it no longer has to wait for the next frame, especially when capturing with low framerates or when the video device just never generates a frame (which seems a common issue for uvcvideo devices) Fixes bug #563574. --- sys/v4l2/gstv4l2object.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/v4l2/gstv4l2object.h') diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h index 5eb557ed..c5bc3cb7 100644 --- a/sys/v4l2/gstv4l2object.h +++ b/sys/v4l2/gstv4l2object.h @@ -71,6 +71,7 @@ struct _GstV4l2Object { /* the video-device's file descriptor */ gint video_fd; + GstPoll * poll; /* the video buffer (mmap()'ed) */ guint8 **buffer; -- cgit