default jpeg

This commit is contained in:
KingKDot
2026-07-30 14:39:10 -05:00
parent 9979955a49
commit 91e9b3196a
5 changed files with 47 additions and 96 deletions
@@ -77,6 +77,20 @@ func TestDesktopAndBackstageCodecSelectionsAreIndependent(t *testing.T) {
}
}
func TestBackstageCodecIsAlwaysJPEG(t *testing.T) {
t.Cleanup(resetCodecSelectionForTest)
for _, requested := range []string{"", "raw", "rgba", "h264", "hevc", "invalid-codec"} {
SetBackstageQualityAndCodec(73, requested)
if got := backstageCodec(); got != "jpeg" {
t.Fatalf("backstage codec = %q after requesting %q, want jpeg", got, requested)
}
}
if got := backstageJPEGQuality(); got != 73 {
t.Fatalf("backstage quality = %d, want 73", got)
}
}
func TestSwitchingToH264RequestsRecoveryPoint(t *testing.T) {
if !h264Available() {
t.Skip("h264 is unavailable in this build")