russelltg/srt-rs

Possibility to variate the latency

aegroto opened this issue · 2 comments

I am not aware if this bound is given by the SRT protocol itself or by this implementation, but I didn't find a way to change latency after the connection has been established.
The issue is that if the latency is set at 100ms, the receiver will never return a packet before 100ms, even when using a local socket where the delay is more or less zero. Reducing the latency when network seems more stable may be useful in a lot of contexts, is it possible to do so or is it somehow intrinsic in the protocol specifications?

I'm not aware of anything in the SRT protocol that would allow that. However, it is possible to create a new SRT connected to the same endpoint that would have a new latency, and move data over that instead.

Fixed latency is typically considered a feature of SRT, as it makes the player application not responsible for buffering the output and making sure there is enough latency to allow for high quality delivery.

Ok, thanks for the reply. I already though about using a new connection each time, but I guess that initializing a new one it's not convenient in case of sudden changes that may happen even more than one time per second. Maybe an alternative is to use a pool of different connection initialized a-priori, but I should experiment on that. Thanks again!