pub struct ParsedBox<'a> {
pub name: String,
pub parser: &'a mut Mp4Parser,
pub partial_okay: bool,
pub stop_on_partial: bool,
pub start: u64,
pub size: usize,
pub version: Option<u32>,
pub flags: Option<u32>,
pub reader: Reader,
pub has_64_bit_size: bool,
pub header: Vec<u8>,
}Expand description
A representation of a parsed MP4 box containing its header information and payload reader.
Fields§
§name: StringThe box name, a 4-character string (fourcc).
parser: &'a mut Mp4ParserThe parser that parsed this box. The parser can be used to parse child boxes where the configuration of the current parser is needed to parsed other boxes.
partial_okay: boolIf true, allows reading partial payloads from some boxes. If the goal is a child box, we can sometimes find it without enough data to find all child boxes. This property allows the partialOkay flag from parse() to be propagated through methods like children().
stop_on_partial: boolIf true, stop reading if an incomplete box is detected.
start: u64The start of this box (before the header) in the original buffer. This start position is the absolute position.
size: usizeThe size of this box (including the header).
version: Option<u32>The version for a full box, null for basic boxes.
flags: Option<u32>The flags for a full box, null for basic boxes.
reader: ReaderThe reader for this box is only for this box. Reading or not reading to the end will have no affect on the parser reading other sibling boxes.
has_64_bit_size: boolIf true, the box header had a 64-bit size field. This affects the offsets of other fields.
header: Vec<u8>The raw header bytes of the box (size, type, optional 64-bit size, optional version/flags).