API referencestd/image

std/image/shared/isobmff

Public declarations, types, methods, and source contracts for std/image/shared/isobmff.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/image/shared/isobmff"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
binary std/image/shared/binary isobmff.dodo
pixels std/image/pixels isobmff.dodo

Box

Struct · Source

One box: its header at start and its payload at data[offset..offset + length].

pub struct Box {
    pub start: usize
    pub offset: usize
    pub length: usize
    // The four-character type, first character in the high byte.
    pub kind: u32
    // The size field was 0: the payload runs to the end of the data.
    pub open_ended: bool
}

Box.end

Function · Source

The offset just past the payload, where the next sibling starts.

pub fn end(&self) -> usize

Box.clone

Function · Source

pub fn clone(&self) -> Box

fourcc

Function · Source

A four-character code as compared with Box.kind.

pub fn fourcc(a: u8, b: u8, c: u8, d: u8) -> u32

read_box

Function · Source

The box whose header starts at offset within data[..end], or none when offset == end. A header or payload running past end fails with Truncated.

pub fn read_box(data: &[u8], offset: usize, end: usize) -> Option<Box>!pixels.Error

Boxes

Struct · Source

Iterates the boxes of data[offset..end] in order.

pub struct Boxes {
    // Private implementation fields omitted.
}

Boxes.new

Function · Source

The top-level boxes of a file.

pub fn new(data: &[u8]) -> Boxes from(data)

Boxes.within

Function · Source

The boxes inside data[offset..offset + length], such as a container box’s payload. A range outside the data yields Truncated.

pub fn within(data: &[u8], offset: usize, length: usize) -> Boxes from(data)

Boxes.next

Function · Source

The next box, none after the last one. After an error every call fails again.

pub fn next(&mut self) -> Option<Box>!pixels.Error

Boxes.position

Function · Source

Where the next box would start.

pub fn position(&self) -> usize

Search every guide, reference page, and API declaration.