summaryrefslogtreecommitdiff
path: root/include/media/v4l2-common.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2012-09-15 14:51:47 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-21 16:53:43 +0400
commitabd23295648a9e3ae72a806e70a510d3dcd8b374 (patch)
treeee7c891cca5336c934c55daa6ddfcbca52e7729a /include/media/v4l2-common.h
parent1202ecdc24fc88d5b144824f55ec9c8899591caf (diff)
downloadlinux-abd23295648a9e3ae72a806e70a510d3dcd8b374.tar.xz
[media] v4l: Helper function for obtaining timestamps
v4l2_get_timestamp() produces a monotonic timestamp but unlike ktime_get_ts(), it uses struct timeval instead of struct timespec, saving the drivers the conversion job when getting timestamps for v4l2_buffer's timestamp field. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r--include/media/v4l2-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 1a0b2db4c5d3..ec7c9c00b256 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -225,4 +225,6 @@ bool v4l2_detect_gtf(unsigned frame_height, unsigned hfreq, unsigned vsync,
struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait);
+void v4l2_get_timestamp(struct timeval *tv);
+
#endif /* V4L2_COMMON_H_ */