Expand description
Shared media pipeline APIs for FrameFinery.
This crate is intentionally small at project bootstrap. It holds the stable concepts that codec crates and tools can share without forcing AV2, VVC, or future codecs into one internal design.
use framefinery_api::{Frame, FrameInfo, PixelFormat};
let info = FrameInfo::new(16, 16, PixelFormat::Yuv420p8)?;
let frame = Frame::blank(info);
assert_eq!(frame.as_frame_ref().data().len(), info.expected_len());Structs§
- CodecId
- Stable codec identifier used by CLI, manifests, and library callers.
- Crop
Filter - Rectangular frame crop transform.
- Decoded
Picture Buffer - Small validated decoded picture buffer for codec reference-frame storage.
- DpbEntry
- One decoded or reconstructed picture tracked by a decoded picture buffer.
- Encode
Pipeline Stats - Counters returned after running a frame-to-packet encode pipeline.
- Encoded
Video Chunk - Encoded bytes plus timing and keyframe metadata.
- Filter
Manifest - Public manifest entry for a compiled filter.
- Filter
Pipeline Builder - Builder for a parsed filter pipeline specification.
- Filter
Pipeline Spec - Parsed filter pipeline specification.
- Filter
Pipeline Stats - Counters returned after running a frame-filter pipeline.
- Filter
Spec Example - One example filter spec for help and generated documentation.
- Filter
Spec Form - One accepted textual form for a filter spec.
- Filter
Spec Manifest - Documentation manifest for one filter’s accepted spec strings.
- Filter
Spec Parameter - One named parameter accepted by a filter spec.
- Filter
Stage Spec - Parsed filter stage spec.
- Filtered
RawVideo Frame Source - Raw-frame source wrapper that applies a frame-filter chain on demand.
- Frame
- Owned raw frame buffer paired with validated frame metadata.
- Frame
Encode Metrics - Per-frame encode metrics returned by session-style encoders.
- Frame
Info - Validated raw frame geometry and pixel format.
- Frame
Psnr - Per-plane and aggregate PSNR values for a reconstructed frame.
- Frame
Rate - Rational frame rate metadata.
- Frame
Ref - Borrowed raw frame buffer paired with validated frame metadata.
- Frame
Source RawVideo Adapter - Adapter that exposes a
Sourceof owned frames as a raw-frame callback. - Identity
Filter - No-op frame transform that returns each input frame unchanged.
- Packet
- Encoded packet passed between generic pipeline stages.
- Pattern
Source - Source stage that generates deterministic raw frames from a pattern.
- Picture
Id - Stable identifier for a picture stored in a decoded picture buffer.
- RawVideo
Frame Read Source RawVideoFrameSourceadapter for anyReadimplementation.- RawVideo
Frame Source Read Adapter Readadapter for anyRawVideoFrameSourceimplementation.- Sample
BitDepth - Checked planar sample bit depth for raw frame formats.
- Scale
Filter - Nearest-neighbor frame resize transform.
- Setting
Manifest - Manifest entry for one global or codec-specific setting.
- Setting
Spec Example - One example setting string for help and generated documentation.
- Setting
Spec Form - One accepted syntax form for a setting.
- Setting
Spec Manifest - Documentation manifest for one setting’s accepted spec strings.
- Stream
Id - Identifier for a logical stream within a media pipeline.
- Timestamp
- Integer timestamp used by packet and encoded-chunk metadata.
- Video
Encode Frame Metrics - Per-frame metrics passed to source-driven encode callbacks.
- Video
Encode Output - Output produced by one encoder-session operation.
- Video
Encoder Config - Codec-neutral configuration for constructing or driving a video encoder.
- Video
Encoder Manifest - Discovery manifest for one compiled video encoder.
- Video
Encoder Setting - One codec extension setting in a
VideoEncoderConfig.
Enums§
- Chroma
Sampling - Chroma subsampling layout for planar YUV or monochrome data.
- Filter
Spec Value - Value shape for one parameter in a filter spec.
- Filter
Stage Kind - Pipeline position served by a filter manifest entry.
- Filter
Status - Implementation status for a declared filter.
- Media
Error - Error type shared by FrameFinery media primitives and public codec APIs.
- Pattern
Kind - Deterministic pattern produced by the
patternsource filter. - Pixel
Format - Raw pixel layout accepted by FrameFinery frame buffers.
- Reconstruction
Mode - Reconstruction data requested from a video encoder.
- Setting
Value - Value shape accepted by a declared encoder or global setting.
- Video
Chunk Kind - Encoded chunk category emitted by video encoders.
- Video
Rate Control - Rate-control mode requested from a video encoder.
- Video
Setting Value - Typed value for a codec extension setting.
Constants§
- CROP_
FILTER_ SPEC - Spec manifest for the
croptransform filter. - FILTERS
- Filter manifests compiled into this build.
- GLOBAL_
SETTINGS - Global settings that are available independently of selected codecs.
- IDENTITY_
FILTER_ SPEC - Spec manifest for the
identitytransform filter. - LOSSLESS_
SETTING - Global setting that requests lossless coding when the selected codec supports it.
- LOSSLESS_
SETTING_ SPEC - Spec manifest for the global
losslesssetting. - PATTERN_
FILTER_ SPEC - Spec manifest for the
patternsource filter. - PATTERN_
SOURCE_ NAMES - Canonical pattern source names accepted by the
patternsource filter. - SCALE_
FILTER_ SPEC - Spec manifest for the
scaletransform filter. - VERSION
- Version of the
framefinery-apicrate compiled into this build.
Traits§
- Encoder
- Frame-to-packet encoder stage for the generic pipeline helpers.
- Filter
- Frame-to-frame transform stage.
- RawVideo
Frame Source - Pull-based raw video source used by source-driven encoders.
- Sink
- Push-based terminal stage for generic media pipelines.
- Source
- Pull-based source stage for generic media pipelines.
- Video
Encoder Session - One continuous video stream with persistent codec state.
Functions§
- boolean_
setting_ enabled - Parse a boolean setting from CLI-style setting specs.
- build_
filter_ transform - Build an executable transform filter from a parsed stage spec.
- build_
raw_ video_ source_ filter - Build an executable source filter as a raw-frame callback.
- build_
source_ filter - Build an executable source filter from a parsed stage spec.
- convert_
frame_ format - Convert between closely related raw frame formats.
- convert_
planar_ frame_ bit_ depth - Convert a planar YUV or gray frame between supported bit depths.
- filter_
manifest - Find a compiled filter manifest by name.
- filter_
pipeline_ output_ info - Return the frame metadata produced by an ordered transform filter pipeline.
- filter_
spec_ manifest - Find a compiled filter’s spec manifest by name.
- filter_
spec_ name - Return the filter name portion of a filter spec string.
- frame_
psnr - Compute PSNR between a source frame and reconstruction.
- generate_
pattern_ stream - Generate a finite raw byte stream for a deterministic pattern.
- generate_
source_ filter_ stream - Generate raw video bytes from an executable source filter.
- i32_
setting - Parse a signed integer setting from CLI-style setting specs.
- parse_
filter_ pipeline_ specs - Parse and validate an ordered set of filter specs for an encode pipeline.
- pattern_
frame_ data - Generate one deterministic raw frame for a pattern.
- planar_
sample_ sse - Compute sum of squared error for two equally sized planar sample buffers.
- read_
planar_ sample - Read one little-endian planar sample from a raw sample buffer.
- run_
frame_ encode_ pipeline - Run a source through zero or more frame filters, an encoder, and a packet sink.
- run_
frame_ filter_ pipeline - Run a source through zero or more frame filters into a frame sink.
- scale_
sample_ bit_ depth - Scale one sample value between two bit depths with rounding.
- setting_
name - Return the name portion of a
nameorname=valuesetting spec. - setting_
value - Return the value portion of a
name=valuesetting spec, if present. - setting_
values_ label - Render a short label for the accepted values of
setting. - u8_
setting - Parse a one-byte integer setting from CLI-style setting specs.
- write_
planar_ sample - Write one little-endian planar sample into a raw sample buffer.
Type Aliases§
- Result
- Result type used by FrameFinery core APIs.
- Video
Encode Frame Metrics Callback - Callback type used to receive source-driven per-frame metrics.