Re: V4L Camera frame timestamp question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/6/10 Jean-Francois Moine <moinejf@xxxxxxx>:
> On Thu, 10 Jun 2010 03:24:05 +0000 (UTC)
> jiajun <zhujiajun@xxxxxxxxx> wrote:
>
>> 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.
>        [snip]
>> 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?
>
> Hi,
>
> No, I did not know it! Thank you. I will try to fix it for the kernel
> 2.6.35.
>

You can't use gettimeofday for timestamps or you will have big
problems if your clock changes when you are grabbing video.
You must use a monotonic clock, this is what gspca and uvc are doing,
they now use ktime, a monotonic highres clock.
This prevents time shifts that can break the video stream playback,
also gettimeofday as problems in multicore cpus since for most
processors
the internal cpus are not exactly in sync.

So PLEASE leave it like it is now, also other drivers should really
move into using ktime nad not gettimeofday.

You are converting the timestamp to seconds this will produce a
smaller value, you should really convert it to ms, then you would get
a value closer to what you want.

Best Regards,
Paulo

> Best regards.
>
> --
> Ken ar c'hentañ |             ** Breizh ha Linux atav! **
> Jef             |               http://moinejf.free.fr/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux