diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2012-10-22 16:10:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 08:20:51 -0500 |
commit | 1b18e7a0be859911b22138ce27258687efc528b8 (patch) | |
tree | 13a6a83e0e6d2b1b83eb9554c102422d08553aa3 /drivers/media/usb/usbvision | |
parent | 8e6057b510aad354e017c6dfca7f386a0eb91b63 (diff) |
[media] v4l: Tell user space we're using monotonic timestamps
Set buffer timestamp flags for videobuf, videobuf2 and drivers that use
neither.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/usbvision')
-rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index 5c36a57e6590..c6bc8ce67375 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -761,7 +761,7 @@ static int vidioc_querybuf(struct file *file, | |||
761 | if (vb->index >= usbvision->num_frames) | 761 | if (vb->index >= usbvision->num_frames) |
762 | return -EINVAL; | 762 | return -EINVAL; |
763 | /* Updating the corresponding frame state */ | 763 | /* Updating the corresponding frame state */ |
764 | vb->flags = 0; | 764 | vb->flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; |
765 | frame = &usbvision->frame[vb->index]; | 765 | frame = &usbvision->frame[vb->index]; |
766 | if (frame->grabstate >= frame_state_ready) | 766 | if (frame->grabstate >= frame_state_ready) |
767 | vb->flags |= V4L2_BUF_FLAG_QUEUED; | 767 | vb->flags |= V4L2_BUF_FLAG_QUEUED; |
@@ -843,7 +843,8 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *vb) | |||
843 | vb->memory = V4L2_MEMORY_MMAP; | 843 | vb->memory = V4L2_MEMORY_MMAP; |
844 | vb->flags = V4L2_BUF_FLAG_MAPPED | | 844 | vb->flags = V4L2_BUF_FLAG_MAPPED | |
845 | V4L2_BUF_FLAG_QUEUED | | 845 | V4L2_BUF_FLAG_QUEUED | |
846 | V4L2_BUF_FLAG_DONE; | 846 | V4L2_BUF_FLAG_DONE | |
847 | V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
847 | vb->index = f->index; | 848 | vb->index = f->index; |
848 | vb->sequence = f->sequence; | 849 | vb->sequence = f->sequence; |
849 | vb->timestamp = f->timestamp; | 850 | vb->timestamp = f->timestamp; |