Expand description
§m64-movie
A Rust library for reading and writing Mupen64 movie files. Only version 3 .m64 files are supported.
If you need more information regarding the semantics of the file type, please refer to the movie file documentation.
§Important Note
As Mupen64 continues to develop, additional changes may be made to the movie file definition. Feel free to open an issue or make a pull request if ever such change occurs.
Additionally, feel free to request changes, such as for a more convenient API.
§General Information
This crate provides two interfaces for working with .m64 files.
At a higher-level, Movie
exposes movie data through types and enum variants. This struct exposes only
what the movie file specifies. If the movie file provides a certain
extended-flag, then it will be accessible through an enum. However, missing flags that
are valid for movies containing different extended versions will not be
accessible here. Additionally, there is no access the reserved regions within
the movie file.
RawMovie is
instead a struct with access to all regions data, including reserved values. It
makes no attempt to limit what is and isn’t accessible, providing complete
freedom for working with m64 files. Only when reading or writing a movie is any
form of validation performed. Note that this struct may change if future
additions to the movie format occur.
§Usage
use m64_movie::{BinReadExt, Movie, RawMovie};
const MOVIE_BYTES: &[u8] = include_bytes!("path/to/my_movie.m64");
let movie = Movie::from_bytes(MOVIE_BYTES).expect("Failed to parse movie bytes");
let raw_movie = RawMovie::from_bytes(MOVIE_BYTES).expect("Failed to parse movie");
assert_eq!(
movie.recording_info.author_name.to_string(),
raw_movie.author_name.to_string()
);Modules§
- doc
- Additional implementation details documentation.
- parsed
- Parsed movie data structures guaranteed to be valid Mupen64 movie files.
- raw
- This module contains the raw data structures for the M64 file format.
- shared
- Shared types and traits for binary reading and writing.
Structs§
Enums§
- Controller
Button - An enum representing the buttons on a Mupen64 controller.
- Encoded
Fixed StrError - Error type for
EncodedFixedStrencoding and decoding. - Movie
Error - Error type for
RawMovieoperations. - Movie
Parse Error - Error type for
Movieparsing errors.
Traits§
- BinRead
Ext - Extensions for reading binary data.
- BinWrite
Ext - Extensions for writing binary data.