Re: [PATCH v4] uvcvideo: add a metadata device node

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

 



On 07/26/17 14:29, Guennadi Liakhovetski wrote:
> On Tue, 25 Jul 2017, Guennadi Liakhovetski wrote:
> 
> [snip]
> 
>>>> +struct uvc_meta_buf {
>>>> +	struct timespec ts;
>>>
>>> timespec has a different size on 32-bit and 64-bit architectures, so there
>>> could be issues on 32-bit userspace running on a 64-bit kernel.
>>>
>>> Additionally, on 32-bit platforms, timespec is not year 2038-safe. I thought
>>> that timespec64 was exposed to userspace nowadays, but it doesn't seem to be
>>> the case. I'm not sure how to handle this.
>>
>> Oh, that isn't good :-/ I'll have to think more about this. If you get any 
>> more ideas, I'd be glad to hear them too.
> 
> Shall we just use nanoseconds here too then, as returned by 
> timespec_to_ns(), just like in frame timestamps?

That's what I use and what Arnd recommended for use in public APIs. It's a u64, so easy
to work with.

Don't use timespec/timeval in any new public APIs, that will only cause a mess later.

Regards,

	Hans



[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