[ogg-dev] Seeking to granules in discontinuous streams
ogg.k.ogg.k at googlemail.com
ogg.k.ogg.k at googlemail.com
Thu Feb 14 09:43:44 PST 2008
After some more thought on this, I'm trying to work out whether the back link
offset needs precision.
Semantically, the only need we have for this is to be able to seek
back to a point
before the start of the earliest event still active at the time of the
original seek.
As far as I know, and please correct me if I'm wrong, nothing in Ogg
mandates that
this backlink actually resolves to a a particular "existing"
granulepos in the stream,
right ? The hypothetic canonical seek algorithm will bisect till it
finds the latest page
that has a granulepos equal or less than the granulepos we're seeking
to. Therefore,
it should be OK if the backlink links to somewhere before the actual
position of the
backlink. If this is fine, which I think it is, then we can blithely
drop precision on that
backlink (eg, remove the low bits and add 1 to the remaining value,
which is always
overestimating it). If the precision loss isn't too great, then we
won't throw an undue
extra load onto the seeker, which will seek to the same page most of
the time, if the
precision loss is kept to acceptable limits.
Additionally, though I'm a bit uncomfortable with this, one could
mandate a maximum
lifetime for an event. Events passing that lifetime would have to be
sent again. If the
max lifetime is long enough, the extra bandwidth would be negligible
(only needed for
those very long events). This would have to be balanced against the
bits we take off
that backlink (low bits for precision, high bits for lifetime).
And we get those bits back as granulespace fodder.
Am I missing something here that would make this unworkable or breaking spec ?
Thanks
More information about the ogg-dev
mailing list