Store VariantStream attributes in more specific types and validate them

This commit is contained in:
Sebastian Dröge
2022-04-17 09:20:01 +03:00
committed by Sebastian Dröge
parent 0789098d7d
commit 6559e45b49
3 changed files with 224 additions and 32 deletions

View File

@ -217,16 +217,19 @@ fn create_and_parse_master_playlist_full() {
variants: vec![VariantStream {
is_i_frame: false,
uri: "masterplaylist-uri".into(),
bandwidth: "10010010".into(),
average_bandwidth: Some("10010010".into()),
bandwidth: 10010010,
average_bandwidth: Some(10010010),
codecs: Some("TheCODEC".into()),
resolution: Some("1000x3000".into()),
frame_rate: Some("60".into()),
hdcp_level: Some("NONE".into()),
resolution: Some(Resolution {
width: 1000,
height: 3000,
}),
frame_rate: Some(60.0),
hdcp_level: Some(HDCPLevel::None),
audio: Some("audio".into()),
video: Some("video".into()),
subtitles: Some("subtitles".into()),
closed_captions: Some("closed_captions".into()),
closed_captions: Some(ClosedCaptionGroupId::GroupId("closed_captions".into())),
}],
session_data: vec![SessionData {
data_id: "****".into(),