Expand description
Host-independent media vocabulary and I/O contracts.
These types describe media itself, not any application built on it: source identity and color, decoded frames and audio blocks, the decoder and encoder traits that platform bindings implement, and output rate control. The renderer, the timeline model, and the platform bindings all speak them, and none of those owns them.
Structs§
- Audio
Block - Planar floating-point audio at the project sample rate.
- Audio
Span - A provider’s answer to one request: source samples, and what the source holds on either side of them.
- Cancel
Token - Cancellation flag shared across adapter operations.
- Color
Metadata - Host-independent video color description.
- Decode
Request - One idempotent decoder request. Hosts discard results with an old generation.
- Decode
Result - Result correlated to a decoder request, safe for out-of-order completion.
- Decoded
Video Frame - Host-independent decoded video frame.
- Host
Texture - Generic image/video/text texture descriptor owned by a host.
- Host
Texture Pixels - RGBA8 pixels returned by an image, video, or text rasterization host.
- Orientation
- How to show a decoded picture upright: mirror it left to right when
mirroris set, then turn it clockwise byrotation. - Plane
- One decoded image plane.
- Rect
- Rectangle inside a coded video frame.
- Sample
Aspect Ratio - Reduced pixel-width to pixel-height ratio.
- Source
Id - A stable media-source identifier.
- Speaker
Layout - The speakers an
AudioBlock’s planes feed, in plane order: 1 toMAX_AUDIO_CHANNELSof them. - Stream
Info - Platform-neutral probe result for one stream.
- Text
Texture - Layout facts attached to a host-rasterized text texture.
- Video
Rate Control - A resolved video rate control: what a sink encodes with.
- Ycbcr
Levels - Where a YCbCr range puts a bit depth’s codes (ITU-T H.273).
- YuvEncoding
- How rendered RGB is written as 8-bit 4:2:0 YUV: its color coding, and where its chroma samples sit relative to the luma grid.
- YuvFormat
- How a planar or semi-planar YCbCr frame stores its samples.
Enums§
- Audio
Codec - Audio codecs the engine resolves a rate for.
- Bitrate
Mode - How an encoder is asked to hold its bitrate.
- Chroma
Location - Chroma sample location for subsampled YUV.
- Color
Matrix - Coefficients used to decode source components.
- Color
Primaries - RGB primary chromaticities a source or export declares.
- Color
Range - Nominal encoded component range.
- Container
- The file format an export is written in.
- Container
Error - Why a container request cannot be resolved.
- Decode
Error - Typed decoder failure.
- Decode
Event - Decoder output and terminal states.
- Decode
Request Kind - Kind of decoder cache/refill operation.
- Dynamic
Range - Whether a signal is standard or high dynamic range. It follows the
transfer:
hdrexactly when the transfer is PQ or HLG, and a color whose two fields disagree is refused. - Emoji
Policy - How a text host draws emoji and other color glyphs.
- Encode
Error - Typed encoding failure.
- Encode
Event - One input accepted by an encoding/mux adapter.
- GpuFault
- What a failed GPU call says about the device it ran on, read from the
platform’s own status for that call (a
VkResult,HRESULT, orCVReturn) where it failed, not from any message. - IdError
- An error returned when an identifier cannot be constructed.
- Pixel
Format - Plane organization delivered by a decoder.
- Premultiplication
- Alpha representation of host pixels.
- Quality
Level - The five qualitative output levels.
- Raster
Color Space - Generic color declaration for a host-rasterized texture.
- Rate
Control Error - Why a rate-control request is not one the engine can resolve.
- Rotation
- Clockwise rotation to apply when displaying a frame.
- Speaker
- The loudspeaker one plane of an
AudioBlockfeeds. - Stream
Kind - Media stream domain.
- Text
Align - Horizontal alignment applied by a host text layout engine.
- Transfer
Function - Encoded transfer curve.
- Video
Codec - Video codecs the engine resolves a rate for.
Constants§
- FRAME_
RATE_ EXPONENT - How bitrate grows with frame rate at equal quality:
(fps / 30) ^ k. - GPU_
TIMEOUT_ MESSAGE - The sentence every wait on GPU work that timed out carries, wherever it
was waited on (the renderer, a native interop helper, an encoder input),
so a host that sees only error text tells a hung GPU from a generic
failure. Hosts classify it as
GPU_TIMEOUT. - MAX_
AUDIO_ CHANNELS - Most planes an
AudioBlockcarries: a 22.2 layout’s 24, the most of any layoutFFmpegnames. - MAX_
FRAME_ DIMENSION - Largest frame edge, in pixels, anything in alpha2 decodes, renders, or composes a project at.
- MAX_
FRAME_ PIXELS - Largest frame area, in pixels, anything in alpha2 decodes, renders, or composes a project at: a decoder refuses a larger frame before it allocates one.
- MIN_
VIDEO_ BITRATE - No level resolves below this. Below about 300 kbps the measured encoders stopped holding their target at all (asked for 84 kbps they wrote 170 to 260), so a lower number would describe a file the encoder does not make.
- REFERENCE_
FPS - Frame rate the level table is stated at.
- REFERENCE_
PIXELS - Luma samples of the reference output the level table is stated at.
- RESOLUTION_
EXPONENT - How bitrate grows with pixel count at equal quality.
Traits§
- Audio
Block Provider - Retrieves project-rate planar audio without exposing its backing cache.
- Audio
Block Sink - Receives project-rate planar audio from offline or realtime graph hosts.
- Decoder
- Stateful media decoder implemented by a platform binding.
- Encode
Sink - Host encoding and muxing boundary.
Functions§
- codec_
factor - Bits a codec needs, relative to H.264, for the same quality.
- frame_
size_ supported - Whether a
widthxheightframe is withinMAX_FRAME_DIMENSIONandMAX_FRAME_PIXELS. - level_
quantizer - The constant quantizer a level resolves to for
codec, where the engine has measured one. - resolve_
audio_ bitrate - Resolves a quality level into a stereo audio bitrate in bits per second.
- resolve_
export_ format - The export’s container and codecs, resolved once at a host’s edge.
- resolve_
video_ rate_ control - Resolves a quality level into the rate control every sink encodes with.
- sample_
ticks_ floor - The tick at or before sample
sampleatsample_rate.