[alsa-devel] Monotonic timestamps

Lennart Poettering mznyfn at 0pointer.de
Thu Apr 10 16:15:13 CEST 2008


On Thu, 10.04.08 09:03, Pieter Palmers (pieterp at joow.be) wrote:

> > I find it very strange that ALSA just switches to monotonic timestamps
> > just like that, anyway. Programs written for wallclack timestamps will
> > break if they run on a system where ALSA uses monotonic timestamps!
> > 
> > There's a function missing that enables monotonic timestamps
> > explicitly, or at least one that can be used to query if they are
> > monotonic or not.
> The clean solution would (IMHO) be to have ALSA provide a function to 
> obtain 'current time', thereby making the timestamp system 
> self-contained. Maybe it already does...

This wouldn't help much since timestamps might also come from other
libraries. i.e. being able to relate timestamps from ALSA with
timestamps from the application itself is not enough. They also need
to be relatable to timestamps from other code, which might not
necessarily be linked against ALSA.

i.e. think of gstreamer that uses timestamps attached to each video
frame. Do you really expect gst to move their timestamp source over to
ALSA just because one of the plugins for gst supports ALSA?

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the Alsa-devel mailing list