Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for more tags from rfc #3

Merged
merged 9 commits into from
Nov 5, 2024
Merged

Conversation

includeamin
Copy link
Owner

No description provided.

@includeamin includeamin force-pushed the chore/improve-builder branch 2 times, most recently from e471c86 to f46f4d9 Compare November 4, 2024 22:23
Expanded support for RFC 8216 compliant tags in the playlist builder. Additional tags such as 'ExtXKey', 'ExtXMap', 'ExtXProgramDateTime', and others were added. Error handling for invalid formats for numerous fields were integrated, ensuring robustness. We verified compliance by validating every tag according to their respective rules.
Enhancements have been made to the m3u8 module. The target_duration function now accepts a u64 value instead of a u32, expanding possible duration values. We've also added `#[allow(clippy::too_many_arguments)]` to bypass Clippy's warnings for the media and stream_inf function. Also, more meaningful error messages have been added and the code is now streamlined for improved tag extraction. For validation.rs, we replaced the u32 data type with the u64 in InvalidTargetDuration to match the change in builder.rs.
@includeamin includeamin force-pushed the chore/improve-builder branch from f46f4d9 to c221cb1 Compare November 4, 2024 22:23
This commit refactors test cases and updates revisions in the M3U8 playlist parsing code. Changes include an update in version numbers from 3 to 7, and adjustments in parsing and building logic. Commented out explanations for the playlist builder were also removed. The changes were necessary to keep the tests consistent with the updates in the parsing logic.
This commit introduces the `ExtXPlaylistType` tag to the M3U8 playlist parser, which provides mutability information about the playlist. It also updates the builder to support adding this tag, and includes a new Makefile for testing and linting with cargo.
@includeamin includeamin force-pushed the chore/improve-builder branch from c221cb1 to a72d41b Compare November 4, 2024 22:24
This commit changes builder methods to use string references (`&str`) instead of `String` for several fields. This improves performance by avoiding unnecessary allocations and simplifies the function signatures. Corresponding test adjustments have also been made to reflect these changes.
Implemented the `Clone` trait for `Tag` and refactored `PlaylistBuilder` to use `Rc<RefCell<Vec<Tag>>>` for better state management. Additionally, added `cargo fmt` to the `check` target in the `Makefile` to enforce consistent code formatting.
Invalid media sequence number error handling has been deemed unnecessary and thus removed from validation.rs and playlist/mod.rs. Other existing validation errors remain unaffected.
@includeamin includeamin force-pushed the chore/improve-builder branch from c242716 to 6beaf4d Compare November 4, 2024 22:49
Revised the structure of the `ExtInf` tag to encapsulate the URI directly within it, removing the need for separate `Uri` tags. This change simplifies the tag structure and ensures better cohesion by combining related data into a single tag.
Added regex as a new dependency in Cargo.toml. Removed EXT-X-DATE-RANGE support and related tests from the codebase. Updated Playlist parsing to process lines more efficiently using regex.
@includeamin includeamin merged commit 46d2b89 into main Nov 5, 2024
1 check passed
@includeamin includeamin deleted the chore/improve-builder branch November 5, 2024 21:03
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