[gst-devel] time handling
Baker, Steve
SBaker at CHELLO.com
Fri Apr 19 02:52:04 CEST 2002
> There was a brief discussion on IRC about time handling.
> Started off by
> noting gstbuffer.h in cvs has comment that says time field is in
> nanoseconds. Yet everything (?) uses microseconds right now.
I was under the impression that everything (?) used nanos.
> Ideally it would be nice to support runtime selection of time units as
> appropriate. Audio/video apps probably don't need ns while some apps
> might require ns accuracy. Changing at runtime will probably be slow,
> messy, ugly, or all of the above. Or maybe just a matter of using
> functions and flipping around function pointers to other converters.
If we're using a 64 bit type for timestamps anyway, why not just go for the
best resolution. The only reason I could think of for using microseconds is
to use it as a 32 bit type for optimisation. By all means we can have
macros to convert to microseconds.
I have asked Erik several times about timestamps and everytime he has said
that we standardise on nanos - maybe he could confirm this (hint hint).
Also, a while ago all of the timestamp types were changed from guint64 to
gint64. Apparently this is to support mpeg timestamps - Billy or Erik could
elaborate.
So I say Vote for Nano! 0 -> G_MAXINT64 in nanos is still a hell of a long
time.
cheers
More information about the gstreamer-devel
mailing list