Files
obs-studio/libobs
Dennis Sädtler e4c39eb648 libobs: Allow interleaver to recover from temporary stalls
The interleaver requires packets with sufficiently high timestamps from
all encoders to be available to send out before it outputs a packet.
This means that if one encoder stalls and does not submit packets for
a while the interleaver can end up with a permanent increase to its
delay due to multiple packets being received from the other encoders
without being able to send any.

This change introduces a recovery mechanism that relies on an upper
bound for the amount of packets that may become "streamable" at a time
being calculated, and flushing additional packets if that bound is
violated.

The upper bound is based on the largest expected interval between
packets and how many packets for each encoder could arrive within
double that interval (to give us a bit of wiggle room since not
all encoders will deliver frames 100% consistently).

This ensures that we still send data at a steady rate but allow the
buffer to drain if it becomes larger than it needs to be.
2025-08-20 18:42:11 -04:00
..
2022-07-19 09:28:51 -03:00
2025-08-20 18:05:15 -04:00
2025-08-20 18:05:15 -04:00
2025-04-02 12:39:46 -04:00
2025-07-25 16:55:48 -04:00
2023-05-20 01:31:18 -07:00
2023-05-20 01:31:18 -07:00
2025-04-02 12:39:46 -04:00