Expand description
Player and exporter public API.
§wgpu interop
The default API names no wgpu type: hosts lend frames as alpha2_render::SourceViews
through FrameProvider and get back alpha2_render::RenderedTextures and readbacks.
Items taking wgpu textures (such as rendering into hardware encoder NV12 planes) are
documented only with the wgpu-interop feature and follow wgpu’s major version.
Re-exports§
pub use frame::FrameGraph;pub use frame::FrameProvider;pub use frame::FrameRender;pub use frame::FrameRenderer;pub use frame::FrameYuv420pRender;pub use frame::GpuFrameRenderer;pub use frame::RenderReport;pub use frame::check_frame_effects;
Structs§
- Audio
Need - A source interval a host decodes before a render reads it.
- Audio
Render Status - Outcome of mixing one block.
- Audio
Renderer - Mixes a project’s audio tracks into one project-rate block.
- Baselines
- A text’s first and last alphabetic baselines, as fractions of the canvas (or picture) height, y down.
- Canvas
Rect - A rectangle as fractions of the canvas, y down.
- Capability
Report - What a runtime can do.
- Clock
Step - What the clock asks for at one moment.
- Color
Report - How color is handled.
- Engine
Project - An immutable project snapshot and its reusable evaluation index.
- Export
Audio Window - The project-rate samples an export’s audio covers.
- Export
Frame Needs - Decode requirements for one scheduled export frame.
- Export
Progress - Completed and total frame counts for deterministic export.
- Export
Step Timings - Where one
Exporter::render_next_timedstep spent its time. - Exporter
- Deterministic, retryable frame-sequence runner.
- Feature
- One feature: whether it is available, and why not.
- Frame
Graph - One evaluated frame compiled into a render graph, not yet submitted.
- Frame
Render - Result of attempting to render one evaluated timeline frame.
- Frame
Yuv420p Render - Result of rendering and scheduling one frame for planar YUV420 readback.
- Frames
With Text - A host’s frame provider combined with its text store.
- GpuMemory
Report - The device memory the adapter may use.
- GpuReport
- The GPU the renderer drives.
- Layout
Bounds - Where a layout’s nodes lie (
measure_layout), in preorder. - Node
Bounds - Where one layout node’s boxes lie, before its clip’s transform and node visuals.
- Passthrough
Plan - What an export range copies: its segments in timeline order, and its audio.
- Passthrough
Segment - One clip’s share of a copied range.
- Picture
Size - The size in pixels of a picture text and layouts are placed on. Never empty, and within
the largest frame the engine draws (
alpha2_media::MAX_FRAME_DIMENSION,alpha2_media::MAX_FRAME_PIXELS). - Playback
Clock - The clock for one playback run, asked each display refresh which time to show.
- Playback
Frame - Result of one real-time presentation attempt;
IisFrameRenderer::Image. - Playback
Report - How real-time playback behaves.
- Player
- Stateful real-time runner holding the last picture drawn.
IisFrameRenderer::Image: aRenderedTextureon the GPU or anArc<CpuImage>on thealpha2_render::CpuRenderer. - Prepared
Layout - A layout resolved at one render size: its paint list and each text node’s texture key.
- Quality
Profile - Runtime quality controls shared by real-time playback and export.
- Render
Report - Outcome of one render attempt when sources may arrive asynchronously.
- Text
Bounds - Where a text lies, as fractions of the canvas from
(0, 0)top-left to(1, 1)bottom-right. For a text generator this is on its picture, before the clip’s transform and effects; for a caption it is on the canvas. - Text
Pixels - The pixels of one prepared text.
- Text
Texture - One prepared text: its texture, pixel size and layout box position.
- Text
Textures - Fonts and the texts rasterized with them, keyed by content and render size.
Enums§
- Audio
Continuity - What
AudioRenderer::renderdoes with a block that does not start where the previous one ended. - Engine
Error - Failure produced by an engine runner.
- Error
Code - A failure’s protocol code.
- Export
Plane Step - One step of an export that packs its picture straight into caller-owned planes.
- Export
Step - Outcome of one non-blocking exporter step.
- Export
Texture Step - One step of an export that leaves its picture as a rendered texture.
- Missing
Frame Policy - The action a host should take after its renderer reports missing frames.
- Passthrough
Audio - What an export’s audio is over a copied range: copied too, or encoded from the mix.
- Picture
Size Error - Why a size is not a
PictureSize. - Playback
Policy - Which frame real-time playback shows, and whether sound plays.
- Runtime
- Where the engine runs.
- Text
Error - Why text could not be prepared.
Constants§
- CAPABILITY_
SCHEMA - The report’s schema name.
- CAPABILITY_
VERSION - The report’s schema version.
- LAYOUT_
WRAP_ SLACK - Pixels added to a text node’s wrapping width so float summation order cannot re-break a text sized to its own max-content width. Lines and heights may overflow the box by less than this.
- MAX_
AUDIO_ BLOCK - Largest block a renderer will mix in one call.
- MAX_
EXPORT_ FRAMES - Largest frame schedule accepted by one export operation.
- MAX_
SETTLING_ SECONDS - Longest a stage replays to settle before a seek target, in seconds.
Traits§
- Frame
Provider - Supplies decoded source frames as GPU textures to the renderer.
- Frame
Renderer - Timeline-frame rendering on the GPU
Rendereror thealpha2_render::CpuRenderer. GPU-only readback and encoder paths are inGpuFrameRenderer. - GpuFrame
Renderer - GPU frame paths that end on the GPU: an unmapped YUV420 readback or encoder NV12 planes.
- Text
Upload - Where
TextTextureskeeps rasterized pixels: a GPU texture or CPU memory.
Functions§
- check_
frame_ effects - Checks that
rendererdraws every effectframeuses, naming the first missing one (unlike theRenderErrorthatFrameRendererreturns). - color_
policy - The renderer’s color policy: tone-map HDR sources from the project peak, or refuse them.
- export_
audio_ window - The audio samples an export over
rangewrites: each end is the nearest sample, halves rounding up. - gpu_
error_ of - The GPU error class of the first
RenderError::Gpuinerror’s source chain. Out of memory and validation have no protocol code; failure reports classify them with this. - gpu_
fault_ of - The device fault reported for the first failed GPU call in
error’s source chain (renderer synchronization, decoder or encoder). Failure reports classify memory faults with this. - layout_
key - A layout’s identity at a render size. Equal keys draw alike with the same fonts.
- measure_
layout - Where each node of a valid layout tree lies on a picture of
sizeat picture timetime, laid out withrasterizer’s fonts exactly as a frame is. - measure_
text - Where
textinstylelies on a canvas ofsize, laid out withrasterizer’s fonts and placed exactly as a frame places it, without drawing it. - passthrough_
plan - Whether
rangeofprojectshows its sources untouched. - text_
key - A text’s identity at a render size: the text, its style and the size, hashed with FNV-1a. Never zero.