ISOMedia.LazyParser (ISOMedia v0.1.0)

Copy Markdown View Source

Parses an ISOBMFF file without loading it entirely into memory.

Walks the top-level boxes by seeking. Any box that is read into memory (a container, or a leaf smaller than the threshold) is parsed by re-running the in-memory ISOMedia.Parser over its exact bytes with offset: set, so its structure and absolute source_offsets match the eager parser. A leaf payload at or above :lazy_threshold becomes an ISOMedia.FileSlice and is never read.

Summary

Functions

Parse path lazily into {:ok, [%Box{}]} | {:error, reason}.

Functions

parse_file(path, opts \\ [])

Parse path lazily into {:ok, [%Box{}]} | {:error, reason}.

Options: :lazy_threshold (default 1048576), :heuristic (default false, applies only to boxes small enough to be read).