Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ enum State {
Connected,
}

const ENCODED_MEDIA_QUEUE_CAPACITY: usize = 8;
/// When a lost packet is retransmitted, the reorder queue releases every frame it held behind
/// the gap at once: up to 52 ms of video, 7 frames at 120 fps or 13 at 240, and more when
/// several waits overlap. A frame that does not fit is dropped and costs a keyframe, so leave
/// room for such a release.
const ENCODED_MEDIA_QUEUE_CAPACITY: usize = 32;
const NVST_RECOVERY_ATTEMPT_LIMIT: usize = 1;
const NATIVE_INPUT_POLL_INTERVAL: Duration = Duration::from_micros(250);
const MAX_STREAM_FPS: u32 = 360;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ impl SessionConfig {
// retires a large frame or reallocates surfaces. Four frames is
// too small for a 120 Hz stream and turns a harmless burst into a
// decoder reset. Keep this bounded, but absorb roughly two frame
// batches before initiating keyframe recovery.
encoded_queue_depth: 16,
// batches before initiating keyframe recovery. A repaired network gap
// releases every frame held behind it at once (13 at 240 fps).
encoded_queue_depth: 32,
decoded_queue_depth: 3,
audio: Some(AudioConfig::default()),
}
Expand Down