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);
}

Structs

TrackAudioInfo
TrackInfo
TrackVideoInfo

Functions

mp4parse_free

Free a rust-side parser context.

mp4parse_get_track_audio_info
mp4parse_get_track_count

Return the number of tracks parsed by previous read_mp4() calls.

mp4parse_get_track_info
mp4parse_get_track_video_info
mp4parse_new

Allocate an opaque rust-side parser context.

mp4parse_read

Feed a buffer through read_mp4() with the given rust-side parser context, returning success or an error code.