pub fn quality_options_for_source(
source_bitrate: Option<u64>,
) -> Vec<QualityOption>Expand description
Build the quality ladder as it applies to a source of a known bitrate.
Every rung is returned — the picker stays a fixed, predictable list rather
than one that changes length per item — but each is marked with whether it
would actually constrain this source. A rung whose ceiling is at or above
the source bitrate produces the same bytes as Original, so presenting it as
a distinct choice is noise.
source_bitrate is None when the server did not report one (it is absent
for some containers — the sampled library has avi files with no bitrate at
all). In that case nothing can be judged redundant and every rung is offered,
which is the safe direction: the viewer keeps every choice they had before.
TRACES: UR-070, UR-079 | DR-227, DR-121 | UT-212