Expand description
Player and exporter public API.
§wgpu interop
The API names no wgpu type by default: a host lends source frames as
alpha2_render::SourceViews through FrameProvider, and frames come
back as alpha2_render::RenderedTextures and readbacks. Rendering
straight into a hardware encoder’s NV12 planes takes wgpu textures and
is interop, documented with the wgpu-interop feature and following
wgpu’s major version. Without the feature those items are hidden.
Re-exports§
pub use exporter::ExportAudioWindow;pub use exporter::ExportFrameNeeds;pub use exporter::ExportProgress;pub use exporter::ExportStep;pub use exporter::ExportStepTimings;pub use exporter::ExportTextureStep;pub use exporter::Exporter;pub use exporter::MAX_EXPORT_FRAMES;pub use exporter::export_audio_window;pub use frame::FrameGraph;pub use frame::FrameProvider;pub use frame::FrameRender;pub use frame::FrameRenderer;pub use frame::FrameYuv420pRender;pub use frame::RenderReport;
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.
- 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 together with its text store: frames come from the one and text from the other.
- GpuReport
- The GPU the renderer drives.
- Layout
Bounds - Where a layout’s nodes lie (
measure_layout), in preorder. - Node
Bounds - Where one layout node lies, before its clip’s transform and before node visuals: its layout boxes, not where it is drawn.
- 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.
- Playback
Clock - The playback clock of one run of playback: asked each display refresh which timeline time to show.
- Playback
Frame - Result of one real-time presentation attempt.
- Playback
Report - How real-time playback behaves.
- Player
- Stateful real-time runner.
- Prepared
Layout - A layout resolved and drawn at one render size: its paint list, and the
store key of each text node’s texture (
Nonefor empty text). - 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,
(0, 0)top-left to(1, 1)bottom-right, as its style’s position is: on the picture a text generator draws, before its clip’s transform and effects, and on the canvas for a caption.measure_textmeasures it. - Text
Texture - One prepared text: its texture, pixel size, and where its layout box lies in it.
- 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
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. The picture decides whether a range can be copied; the audio only decides whether it is copied too or encoded from the mix beside the copied video.
- 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 - What a text node’s wrapping width adds to its content width, in pixels: float summation order cannot then break a text sized to its own max-content width again. A line it lets through overflows its box by under this much, and a text taller than its box by under this much still fits it.
- 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 top of a
Renderer.
Functions§
- color_
policy - The renderer’s color policy for a project’s color pipeline: tone-map HDR sources from its peak, or refuse them.
- export_
audio_ window - The samples an export over
rangewrites as audio: both ends are the samples nearest the range’s ends, half a sample rounding up. - gpu_
error_ of - The class of error the GPU reported when it rejected a frame’s work
(
RenderError::Gpu), for the first such error inerror’s source chain. Out of memory and validation have no protocol code of their own; this is the evidence a failure report classifies them by. - gpu_
fault_ of - What the platform’s status for a failed GPU call said about the device,
for the first error in
error’s source chain that carries one: a native synchronization the renderer met, or a decoder’s or encoder’s GPU call. A memory fault has no protocol code of its own; this is the evidence a failure report classifies it by. - layout_
key - A layout’s identity at a render size: its evaluated key and the size. Equal keys lay out and draw alike with the same fonts.
- measure_
layout - Where each node of a valid layout tree lies on a picture of
size, at picture timetime, laid out withrasterizer’s fonts as a frame lays it out.canvasis the project canvas, which the tree’s pixel lengths are pixels of (the picture’s own size when they are measured at it). Rects are before the clip’s transform and before node visuals: layout boxes, not where they are drawn. An invalid tree gives unspecified rects, but never panics. - measure_
text - Where
textinstylelies on a canvas ofsize(TextBounds), laid out withrasterizer’s fonts asTextTextures::preparelays it out and placed as a frame places it, without drawing it. Measured at the size a frame is drawn at, it agrees with that frame to the pixel; text laid out at another size can break its lines elsewhere. - 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 (FNV-1a). Never zero.