Skip to main content

ebml_webm/
lib.rs

1//! Sans-IO EBML / `WebM` — freestanding demux + mux (see `adr/0001`,
2//! `adr/0003`).
3//!
4//! Callers own all I/O. No Mediaway types. Mediaway-typed wiring lives in
5//! `mediaway_container::webm`.
6
7#![forbid(unsafe_code)]
8#![allow(
9    clippy::cast_possible_truncation,
10    clippy::cast_sign_loss,
11    clippy::cast_possible_wrap
12)]
13
14mod demux;
15pub mod error;
16pub mod ids;
17mod lacing;
18pub mod mux;
19pub mod types;
20pub mod vint;
21
22/// Open-element stack depth on the stack (`EBML`/`Segment`/`Info` or
23/// `Tracks`/`TrackEntry`/`Video` or `Cluster`) — typically ≤4.
24pub const INLINE_STACK: usize = 6;
25/// Typical track count table capacity (audio + video, a couple extras).
26pub const INLINE_TRACKS: usize = 4;
27/// Typical `Cues`/`SeekHead` entry-table capacity.
28pub const INLINE_INDEX: usize = 8;
29
30pub use demux::Demuxer;
31/// Low-level parse error (`vint`/`demux`) — see [`error::Error`] docs.
32pub use error::Error;
33/// [`mux::Muxer`] error — see [`error::MuxError`] docs.
34pub use error::MuxError;
35pub use mux::Muxer;
36pub use types::{Bytes, CuePoint, Frame, Rational, SeekEntry, TrackInfo};