1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Congestion control plugin seam.
//!
//! The default congestion control in this kit is Google Congestion Control (GoogCC),
//! implemented inside str0m and surfaced via [`BandwidthEstimate`][crate::BandwidthEstimate]
//! events. This trait provides a plugin point for alternative algorithms (SCReAMv2, L4S)
//! when Rust implementations become available.
//!
//! # Current state
//!
//! - **GoogCC (default):** fully functional via str0m 0.18 trendline estimator.
//! No code required; use [`BandwidthEstimate`][crate::BandwidthEstimate] events.
//! - **SCReAMv2 (RFC 8298 + IETF 125 updates):** no Rust implementation exists yet.
//! Reference: `EricssonResearch/scream` (Apache-2.0, C++).
//! - **L4S (RFC 9330):** requires kernel + network-path cooperation (ECT(1) / DualPI2).
//! Chromium rollout in progress; not deployable in general-purpose SFUs today.
//!
//! When a Rust SCReAMv2 or L4S crate is available, implement this trait and pass it
//! to [`SfuConfig`][crate::SfuConfig].
use Instant;
/// Plugin interface for replacing the default GoogCC congestion controller.
///
/// Implement this trait to inject a custom algorithm (SCReAM, L4S, etc.).
/// The kit feeds incoming TWCC feedback packets; the impl returns a bitrate estimate.
///
/// # Stability note
///
/// This trait is `#[non_exhaustive]`-equivalent for now: it will gain methods as
/// integration deepens. Implement with a `#[allow(unused)]` if forward-compatibility
/// is needed.
/// Default congestion control — delegates to str0m's built-in GoogCC.
///
/// This is a no-op implementation: str0m already runs GoogCC internally and
/// surfaces the result via `Event::EgressBitrateEstimate`. Using this default
/// means no additional TWCC processing is done at the kit level.
;