All of lore.kernel.org
 help / color / mirror / Atom feed
* V4L Camera frame timestamp question
@ 2010-06-10  3:24 jiajun
  2010-06-10  7:53 ` Jean-Francois Moine
  0 siblings, 1 reply; 4+ messages in thread
From: jiajun @ 2010-06-10  3:24 UTC (permalink / raw)
  To: linux-media

Hi, 

I'm currently using the V4L-DVB driver to control a few logitech webcams and
playstation eye cameras on a Gubuntu system.

Everything works just fine except one thing:  the buffer timestamp value seems
wrong.

The way I get the timestamp value is through the v4l2_buffer struct like this:

  struct v4l2_buffer buf;
  CLEAR(buf);
  buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
  buf.memory = V4L2_MEMORY_MMAP;
  assert(ioctl(fd_, VIDIOC_DQBUF, &buf));
  
  printf("timestamp = %.3f", buf.timestamp.tv_sec + buf.timestamp.tv_usec /
1000000);

this should be the timestamp of when the image is taken (similar to
gettimeofday() function)
but the value I got is something way smaller (e.g. 75000) than what it should be
(e.g. 1275931384)


Is this a known problem?


Thanks!


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-10 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  3:24 V4L Camera frame timestamp question jiajun
2010-06-10  7:53 ` Jean-Francois Moine
2010-06-10  9:20   ` Paulo Assis
     [not found]     ` <AANLkTilE1UKkTBeNHSStKo6ibs-7Hun87HfFbF7JdNig@mail.gmail.com>
2010-06-10 19:06       ` Paulo Assis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.