ISOMedia.Serializer (ISOMedia v0.1.0)

Copy Markdown View Source

Serializes ISOMedia.Box trees back into ISOBMFF binary.

Summary

Functions

Replace every FileSlice leaf payload in the tree with its on-disk bytes.

Serialize a box or list of boxes to a binary (materializes any FileSlice payloads).

Stream a box or list of boxes to an open raw io_device, reading FileSlice payloads from disk in chunk_size-byte chunks (so a multi-GB payload is never held in memory). Returns :ok.

Serialize a box or list of boxes to iodata (no full-binary materialization).

Functions

materialize(box)

Replace every FileSlice leaf payload in the tree with its on-disk bytes.

serialize(boxes)

Serialize a box or list of boxes to a binary (materializes any FileSlice payloads).

stream(boxes, io_device, chunk_size \\ 65536)

Stream a box or list of boxes to an open raw io_device, reading FileSlice payloads from disk in chunk_size-byte chunks (so a multi-GB payload is never held in memory). Returns :ok.

to_iodata(box)

Serialize a box or list of boxes to iodata (no full-binary materialization).