Module mp4parse::capi [] [src]

C API for mp4parse module.

Parses ISO Base Media Format aka video/mp4 streams.

Examples

extern crate mp4parse;

// Minimal valid mp4 containing no tracks.
let data = b"\0\0\0\x0cftypmp42";

let context = mp4parse::mp4parse_new();
unsafe {
    let rv = mp4parse::mp4parse_read(context, data.as_ptr(), data.len());
    assert_eq!(0, rv);
    mp4parse::mp4parse_free(context);
}

Functions

mp4parse_free

Free a rust-side parser context.

mp4parse_new

Allocate an opaque rust-side parser context.

mp4parse_read

Feed a buffer through read_box() with the given rust-side parser context, returning the number of detected tracks.