Improve playback, preroll and TV experience

This commit is contained in:
ponzischeme89
2026-08-10 07:11:14 +12:00
parent 598a4f5c75
commit d2f2eb62be
30 changed files with 1380 additions and 142 deletions
@@ -32,3 +32,23 @@ func TestAndroidTVProfileConstrainsCodecLevelAndResolution(t *testing.T) {
t.Fatalf("codec profiles = %#v", codecProfiles)
}
}
func TestForcedTranscodeProfileCannotStreamCopyHEVC(t *testing.T) {
profile := androidTVDeviceProfile(PlaybackCapabilities{
HEVC: true, HEVCMain: true, HEVCMain10: true,
})
forceH264TranscodeProfile(profile)
if direct := profile["DirectPlayProfiles"].([]map[string]string); len(direct) != 0 {
t.Fatalf("direct profiles = %#v", direct)
}
transcode := profile["TranscodingProfiles"].([]map[string]string)
if len(transcode) != 1 || transcode[0]["VideoCodec"] != "h264" {
t.Fatalf("transcoding profiles = %#v", transcode)
}
for _, codecProfile := range profile["CodecProfiles"].([]map[string]any) {
if codecProfile["Codec"] == "hevc" {
t.Fatalf("HEVC constraint survived fallback: %#v", codecProfile)
}
}
}