Skip to content

feat: type RESOLUTION as a Resolution struct - #17

Merged
includeamin merged 1 commit into
mainfrom
feat/typed-resolution
Nov 21, 2026
Merged

includeamin merged 1 commit into
mainfrom
feat/typed-resolution

Conversation

@includeamin

Copy link
Copy Markdown
Owner

Summary

  • Add Resolution { width: u32, height: u32 } with Display and FromStr for the <width>x<height> form
  • ExtXStreamInf and ExtXIFrameStreamInf now hold resolution: Option<Resolution> instead of Option<String>
  • A malformed value is a SyntaxError::InvalidAttributeValue for RESOLUTION; both parts must be plain decimal digits that fit in a u32
  • PlaylistBuilder::stream_inf and iframe_stream_inf take Option<Resolution> instead of Option<&str>

Notes

Breaking for 0.x: the public field types and two builder signatures changed. A value such as 0960x540 is normalised to 960x540 when written back.

Test plan

  • cargo test (94 unit + 5 doc tests)
  • cargo clippy --all-targets
  • fuzz crate still compiles

@includeamin
includeamin merged commit ad86c18 into main Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant