Skip to main content

Crate rff_format

Crate rff_format 

Source
Expand description

rff-format — the container (muxer/demuxer) abstraction layer (FFmpeg’s libavformat core, minus the formats themselves).

A container is the file wrapper (AVI, MP4, Matroska, …) that interleaves one or more elementary streams. This crate defines:

  • Stream — the description of one elementary stream inside a container,
  • Demuxer — reads a container, exposing streams and Packets,
  • Muxer — writes streams + packets back into a container,
  • FormatRegistry — what individual format crates register into.

Concrete formats live in their own crates (rff-format-avi, …).

Structs§

Format
Static description of a container format and its read/write support.
FormatRegistry
Holds every container format known to a running engine.
Stream
Description of one elementary stream within a container.

Traits§

Demuxer
Reads a container format: parses the header into Streams, then yields Packets until the input is exhausted.
Muxer
Writes a container format: declare streams, write packets, finalize.

Type Aliases§

DemuxerFactory
Factory opening a demuxer over an input byte source.
Input
A byte source a demuxer reads from. (Box<dyn Read + Send> keeps the trait object-safe and lets inputs be files, network streams, or in-memory buffers.)
MuxerFactory
Factory opening a muxer over an output byte sink.
Output
A byte sink a muxer writes to.
ProbeFn
Content sniffer: scores how strongly a byte prefix looks like this format, 0 (no match) to 100 (certain) — mirrors FFmpeg’s AVInputFormat::read_probe.