[][src]Crate mpls

A movie playlist file (MPLS) parser.

The entry point into this crate is the Mpls struct. You can obtain an instance of that struct through its parse method.

For the basic tasks of extracting the playlist angles and segments, this crate provides easy-to-use helper methods (see the example below). Beyond that, however, this crate only provides a structured form of the playlist data and does not re-interpret the movie playlist contents in any way.

Documentation of the individual structs and properties is unfortunately scarce. The MPLS file format seems to not be officially documented, and this parser relies heavily on the excellent third-party file specs in the lw/BluRay repository as well as the bdinfo/mpls Wikibooks page. Refer to those for more in-depth information.

See also Angle and Clip.

Examples

use std::fs::File;
use mpls::Mpls;

// open the playlist file
let mut file = File::open("00800.mpls")?;

// parse the play list
let mpls = Mpls::from(&file).expect("failed to parse MPLS file.");

// extract the play list's angles
let angles = mpls.angles();

// extract the segments
for angle in angles {
    let segment_numbers: Vec<i32> = angle
        .segments()
        .iter()
        .map(|s| s.file_name.parse::<i32>().unwrap())
        .collect();
    println!("angle {}: {:?}", angle, segment_numbers);
}

Re-exports

pub use error::MplsError;
pub use types::*;

Modules

error
types