Skip to main content

Crate framefinery_api

Crate framefinery_api 

Source
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.
CropFilter
Rectangular frame crop transform.
DecodedPictureBuffer
Small validated decoded picture buffer for codec reference-frame storage.
DpbEntry
One decoded or reconstructed picture tracked by a decoded picture buffer.
EncodePipelineStats
Counters returned after running a frame-to-packet encode pipeline.
EncodedVideoChunk
Encoded bytes plus timing and keyframe metadata.
FilterManifest
Public manifest entry for a compiled filter.
FilterPipelineBuilder
Builder for a parsed filter pipeline specification.
FilterPipelineSpec
Parsed filter pipeline specification.
FilterPipelineStats
Counters returned after running a frame-filter pipeline.
FilterSpecExample
One example filter spec for help and generated documentation.
FilterSpecForm
One accepted textual form for a filter spec.
FilterSpecManifest
Documentation manifest for one filter’s accepted spec strings.
FilterSpecParameter
One named parameter accepted by a filter spec.
FilterStageSpec
Parsed filter stage spec.
FilteredRawVideoFrameSource
Raw-frame source wrapper that applies a frame-filter chain on demand.
Frame
Owned raw frame buffer paired with validated frame metadata.
FrameEncodeMetrics
Per-frame encode metrics returned by session-style encoders.
FrameInfo
Validated raw frame geometry and pixel format.
FramePsnr
Per-plane and aggregate PSNR values for a reconstructed frame.
FrameRate
Rational frame rate metadata.
FrameRef
Borrowed raw frame buffer paired with validated frame metadata.
FrameSourceRawVideoAdapter
Adapter that exposes a Source of owned frames as a raw-frame callback.
IdentityFilter
No-op frame transform that returns each input frame unchanged.
Packet
Encoded packet passed between generic pipeline stages.
PatternSource
Source stage that generates deterministic raw frames from a pattern.
PictureId
Stable identifier for a picture stored in a decoded picture buffer.
RawVideoFrameReadSource
RawVideoFrameSource adapter for any Read implementation.
RawVideoFrameSourceReadAdapter
Read adapter for any RawVideoFrameSource implementation.
SampleBitDepth
Checked planar sample bit depth for raw frame formats.
ScaleFilter
Nearest-neighbor frame resize transform.
SettingManifest
Manifest entry for one global or codec-specific setting.
SettingSpecExample
One example setting string for help and generated documentation.
SettingSpecForm
One accepted syntax form for a setting.
SettingSpecManifest
Documentation manifest for one setting’s accepted spec strings.
StreamId
Identifier for a logical stream within a media pipeline.
Timestamp
Integer timestamp used by packet and encoded-chunk metadata.
VideoEncodeFrameMetrics
Per-frame metrics passed to source-driven encode callbacks.
VideoEncodeOutput
Output produced by one encoder-session operation.
VideoEncoderConfig
Codec-neutral configuration for constructing or driving a video encoder.
VideoEncoderManifest
Discovery manifest for one compiled video encoder.
VideoEncoderSetting
One codec extension setting in a VideoEncoderConfig.

Enums§

ChromaSampling
Chroma subsampling layout for planar YUV or monochrome data.
FilterSpecValue
Value shape for one parameter in a filter spec.
FilterStageKind
Pipeline position served by a filter manifest entry.
FilterStatus
Implementation status for a declared filter.
MediaError
Error type shared by FrameFinery media primitives and public codec APIs.
PatternKind
Deterministic pattern produced by the pattern source filter.
PixelFormat
Raw pixel layout accepted by FrameFinery frame buffers.
ReconstructionMode
Reconstruction data requested from a video encoder.
SettingValue
Value shape accepted by a declared encoder or global setting.
VideoChunkKind
Encoded chunk category emitted by video encoders.
VideoRateControl
Rate-control mode requested from a video encoder.
VideoSettingValue
Typed value for a codec extension setting.

Constants§

CROP_FILTER_SPEC
Spec manifest for the crop transform 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 identity transform filter.
LOSSLESS_SETTING
Global setting that requests lossless coding when the selected codec supports it.
LOSSLESS_SETTING_SPEC
Spec manifest for the global lossless setting.
PATTERN_FILTER_SPEC
Spec manifest for the pattern source filter.
PATTERN_SOURCE_NAMES
Canonical pattern source names accepted by the pattern source filter.
SCALE_FILTER_SPEC
Spec manifest for the scale transform filter.
VERSION
Version of the framefinery-api crate compiled into this build.

Traits§

Encoder
Frame-to-packet encoder stage for the generic pipeline helpers.
Filter
Frame-to-frame transform stage.
RawVideoFrameSource
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.
VideoEncoderSession
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 name or name=value setting spec.
setting_value
Return the value portion of a name=value setting 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.
VideoEncodeFrameMetricsCallback
Callback type used to receive source-driven per-frame metrics.