Conversation
Adds a `view` module with `MatroskaView` and `SegmentView` structs.
Introduces `MatroskaView` and `SegmentView` structs to enable parsing Matroska files without loading Cluster data into memory, improving performance. The implementation includes both synchronous and asynchronous (tokio) versions for flexible integration.
Refactors segment parsing to handle multiple segments within a single Matroska file. Now returns a `Vec` from the `SegmentView::new` and `SegmentView::new_async` functions. Also implements logic to find next segment using SeekHead information to skip to the next segment when a Cluster is encountered.
Adds integration tests for the Matroska view functionality, including tests for basic segment parsing, segments without clusters, multiple segments, and un-sized segments. This ensures that the view parsing logic correctly handles various Matroska file structures. Also introduces `WriteElement` trait for writing structs from the `element` module.
Refactors the segment view parsing logic to correctly handle edge cases, such as segments without clusters and segments with unknown sizes. Specifically, it skips to the end of the segment if a cluster is not found and the segment size is known. Adds comprehensive asynchronous tests to validate the functionality of MatroskaView, including handling multiple segments, segments without clusters, and segments with unknown sizes.
Enables a new `utils` feature that introduces utility modules, such as the `view` module, for easier interaction with Matroska files. The `view` module provides `MatroskaView` and `SegmentView` structs, designed for efficiently parsing MKV file metadata without the need to load the entire cluster data into memory, which is useful for large files. Also enables the `utils` feature in the integration tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
MatroskaViewandSegmentViewstructs for efficiently parsing Matroska files without loading cluster data into memory. This allows for faster analysis of file metadata.