Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357030
b: refs/heads/master
c: abd2329
h: refs/heads/master
v: v3
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent 2659a0e commit 93029eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1202ecdc24fc88d5b144824f55ec9c8899591caf
refs/heads/master: abd23295648a9e3ae72a806e70a510d3dcd8b374
10 changes: 10 additions & 0 deletions trunk/drivers/media/v4l2-core/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,3 +978,13 @@ const struct v4l2_frmsize_discrete *v4l2_find_nearest_format(
return best;
}
EXPORT_SYMBOL_GPL(v4l2_find_nearest_format);

void v4l2_get_timestamp(struct timeval *tv)
{
struct timespec ts;

ktime_get_ts(&ts);
tv->tv_sec = ts.tv_sec;
tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
}
EXPORT_SYMBOL_GPL(v4l2_get_timestamp);
2 changes: 2 additions & 0 deletions trunk/include/media/v4l2-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */

0 comments on commit 93029eb

Please sign in to comment.