From: jiajun <zhujiajun@gmail.com>
To: linux-media@vger.kernel.org
Subject: V4L Camera frame timestamp question
Date: Thu, 10 Jun 2010 03:24:05 +0000 (UTC) [thread overview]
Message-ID: <loom.20100610T052202-829@post.gmane.org> (raw)
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!
next reply other threads:[~2010-06-10 3:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 3:24 jiajun [this message]
2010-06-10 7:53 ` V4L Camera frame timestamp question Jean-Francois Moine
2010-06-10 9:20 ` Paulo Assis
[not found] ` <AANLkTilE1UKkTBeNHSStKo6ibs-7Hun87HfFbF7JdNig@mail.gmail.com>
2010-06-10 19:06 ` Paulo Assis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20100610T052202-829@post.gmane.org \
--to=zhujiajun@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox