feat(quality): the creator sets the rate — per tier, persisted, clamped only at YouTube's floor
The tier table cannot know a creator's connection, so it should not pretend to. The Mbps box under the picker is theirs: the tier chooses geometry and frame rate, the box chooses bits. Stored per tier (`Video.Rate.<tier>`), so tuning 1080p60 does not touch 720p30, and none means "the shipped default" rather than zero. Clamped at the tier's YouTube minimum (`RateLadder`), because a target under it cannot hold the resolution; no ceiling otherwise, because a wrong guess is exactly what live step-down exists to catch, and a creator who types 25 on a fibre line should be allowed to find out. The tooltip carries YouTube's number for the tier. `MainViewModel.EffectiveQuality` is the single substitution point, and the encoder options, the step-down policy and the clip buffer all read it — so a rated tier can never stream at the shipped default because one call site was missed. One ordering trap found by the test: the constructor resolves the default tier before the layout store is open, so a read at that point must not cache, or the shipped default shadows the creator's stored rate for the whole run. 670 pass, 0 warnings.
This commit is contained in:
@@ -488,7 +488,11 @@ public partial class MainViewModel : ViewModelBase
|
||||
}
|
||||
|
||||
if (SetProperty(ref _selectedQuality, value))
|
||||
{
|
||||
ApplyStreamQuality(value);
|
||||
OnPropertyChanged(nameof(RatedMbps));
|
||||
OnPropertyChanged(nameof(RateHint));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +509,7 @@ public partial class MainViewModel : ViewModelBase
|
||||
private void ApplyStreamQuality(QualityOption quality)
|
||||
{
|
||||
var health = CurrentHealth;
|
||||
health.CurrentBitrate = quality.Bitrate;
|
||||
health.CurrentBitrate = EffectiveQuality(quality).Bitrate;
|
||||
health.FPS = quality.Fps;
|
||||
OnPropertyChanged(nameof(CurrentHealth));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user