From: "Daniel Glöckner" <daniel-gl@gmx.net>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Rémi Denis-Courmont" <remi@remlab.net>,
"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [RFC] Monotonic clock usage in buffer timestamps
Date: Wed, 2 Nov 2011 10:10:46 +0100 [thread overview]
Message-ID: <20111102091046.GA14955@minime.bse> (raw)
In-Reply-To: <201111011349.47132.laurent.pinchart@ideasonboard.com>
Hello,
On Tue, Nov 01, 2011 at 01:49:46PM +0100, Laurent Pinchart wrote:
> > Nevertheless, I agree that the monotonic clock is better than the real
> > time clock.
> > In user space, VLC, Gstreamer already switched to monotonic a while ago as
> > far as I know.
> >
> > And I guess there is no way to detect this, other than detect ridiculously
> > large gap between the timestamp and the current clock value?
>
> That's right. We could add a device capability flag if needed, but that
> wouldn't help older applications that expect system time in the timestamps.
I just so happen to have tried to use V4L2 and ALSA timestamps in a
single application. In ALSA the core supports switching between
monotonic and realtime timestamps, with the library always using
monotonic available.
How about making all drivers record monotonic timestamps and doing
the conversion to/from realtime timestamps in v4l2-ioctl.c's
__video_do_ioctl if requested? We then just need an extension of the
spec to switch to monotonic, which can be implemented without touching
a single driver.
Daniel
next prev parent reply other threads:[~2011-11-02 9:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 12:24 [RFC] Monotonic clock usage in buffer timestamps Laurent Pinchart
2011-11-01 12:36 ` Rémi Denis-Courmont
2011-11-01 12:49 ` Laurent Pinchart
2011-11-02 9:10 ` Daniel Glöckner [this message]
2011-11-02 10:14 ` Sakari Ailus
2011-11-02 10:51 ` Laurent Pinchart
2011-11-02 10:58 ` Daniel Glöckner
2011-11-02 11:16 ` Rémi Denis-Courmont
2011-11-02 12:47 ` Sakari Ailus
2011-11-02 12:32 ` Sakari Ailus
2011-11-02 10:04 ` Sakari Ailus
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=20111102091046.GA14955@minime.bse \
--to=daniel-gl@gmx.net \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=remi@remlab.net \
/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