[NUT-devel] Another suggestion for broadcast [PATCH]
Måns Rullgård
mans at mansr.com
Tue Feb 12 00:05:52 CET 2008
Michael Niedermayer <michaelni at gmx.at> writes:
>> > The time difference can of course be computed from the difference
>> > in buffer fullness and the received bitrate, it merely takes a
>> > little more work on the receiver side.
>>
>> instead of transmit_ts one can use
>> internal_clock_ts + (buffer_fullness < real_fullness ? D : -D)
>> That should provide a pretty good reference for the PLL IMHO
>
> Also what i forgot to say was that a correction by +D/-D is much more
> robust than correcting by transmit_ts - internal_clock_ts.
> Its not a big issue with real broadcast and checksum protected transmit_ts.
> But if either the transmit_ts is unprotected or there is a significant
> randomness in the latency like UDP/TCP over the internet. Then limiting
> the correction to the worst case clock drift should work much better than
> compensating for the whole apparent drift.
> So at least clip(transmit_ts, internal_clock_ts - D, internal_clock_ts + D)
> should be used in practice and and not transmit_ts as such.
Some sanity checking on the input values is always advisable. This is
completely orthogonal to the question of what those values are to
represent.
--
Måns Rullgård
mans at mansr.com
More information about the NUT-devel
mailing list