Skip to main content

alpha2_engine/
lib.rs

1//! Player and exporter public API.
2//!
3//! # `wgpu` interop
4//!
5//! The API names no `wgpu` type by default: a host lends source frames as
6//! [`alpha2_render::SourceView`]s through [`FrameProvider`], and frames come
7//! back as [`alpha2_render::RenderedTexture`]s and readbacks. Rendering
8//! straight into a hardware encoder's NV12 planes takes `wgpu` textures and
9//! is interop, documented with the `wgpu-interop` feature and following
10//! `wgpu`'s major version. Without the feature those items are hidden.
11
12mod audio;
13mod capabilities;
14mod downmix;
15mod error;
16mod error_code;
17mod exporter;
18mod frame;
19mod generated;
20mod layout;
21mod passthrough;
22mod playback;
23mod player;
24mod policy;
25mod quality;
26mod schedule;
27mod snapshot;
28mod text;
29
30pub use audio::{
31    AudioContinuity, AudioNeed, AudioRenderStatus, AudioRenderer, MAX_AUDIO_BLOCK,
32    MAX_SETTLING_SECONDS,
33};
34pub use capabilities::{
35    CAPABILITY_SCHEMA, CAPABILITY_VERSION, CapabilityReport, ColorReport, Feature, GpuReport,
36    PlaybackReport, Runtime,
37};
38pub use error::EngineError;
39pub use error_code::{ErrorCode, gpu_error_of, gpu_fault_of};
40pub use exporter::{
41    ExportAudioWindow, ExportFrameNeeds, ExportNv12Step, ExportProgress, ExportStep,
42    ExportStepTimings, ExportTextureStep, Exporter, MAX_EXPORT_FRAMES, export_audio_window,
43};
44pub use frame::{
45    FrameGraph, FrameNv12Render, FrameProvider, FrameRender, FrameRenderer, FrameYuv420pRender,
46    RenderReport,
47};
48pub use layout::{LAYOUT_WRAP_SLACK, LayoutBounds, NodeBounds, PreparedLayout, measure_layout};
49pub use passthrough::{PassthroughAudio, PassthroughPlan, PassthroughSegment, passthrough_plan};
50pub use playback::{ClockStep, PlaybackClock, PlaybackPolicy};
51pub use player::{PlaybackFrame, Player};
52pub use policy::{MissingFramePolicy, color_policy};
53pub use quality::QualityProfile;
54pub use snapshot::EngineProject;
55pub use text::{
56    CanvasRect, FramesWithText, TextBounds, TextError, TextTexture, TextTextures, layout_key,
57    measure_text, text_key,
58};