Expand description
Subscribe to an H.264, H.265, AV1, VP8, or VP9 track and decode it to raw frames.
The decode counterpart to encode, and the mirror of
moq_audio::decode::Consumer. Consumer subscribes to a moq-mux video
track and hands back Read events carrying decoded Frames; a native backend does the work
(VideoToolbox on macOS and iOS, Media Foundation / DXVA on Windows, NVDEC or VAAPI
on Linux, OpenH264 as the optional software fallback for H.264, and libvpx as
the optional software decoder for VP8 and VP9).
H.264 and H.265 are supported, symmetric with what encode
produces. AV1 is decode-only on NVDEC. H.265 and AV1 are hardware-only (no
software fallback). VP8 and VP9 are decode-only and software-only, behind the
vpx feature, and only in 8-bit 4:2:0 (VP9 profile 0). Any other codec
yields Error::UnsupportedCodec.
Structs§
- Config
- Decoder configuration: the codec implementation and the frames it hands back.
- Consumer
- Subscribe to a moq-mux video track and emit decoded frames.
- Decoder
- Decodes container payloads (the codec bitstream) into raw
Frames. - Delay
- How far behind the live edge a media reader plays: where it starts, and how late it may fall.
- Options
- How a
Consumersubscribes to its track, and the decoder it feeds. - Sink
- A
Decoderconfined to one thread, driven from anywhere.
Enums§
- Backend
- Which decoder implementation to use.
#[non_exhaustive]so new selection strategies can be added without breaking externalmatches. - Codec
- The video codec a decoder handles, derived from the catalog.
- Read
- One item of a
Consumerread, in delivery order: a decoded picture, or a break between them. - Start
- Where a consumer starts on a track that already holds groups.
Constants§
- NAMES
- Every decoder backend this crate has a name for, on any platform.