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 alpha2_layout::{
31    Baselines, CanvasRect, LAYOUT_WRAP_SLACK, LayoutBounds, NodeBounds, PictureSize,
32    PictureSizeError, TextBounds, measure_layout, measure_text, text_key,
33};
34pub use audio::{
35    AudioContinuity, AudioNeed, AudioRenderStatus, AudioRenderer, MAX_AUDIO_BLOCK,
36    MAX_SETTLING_SECONDS,
37};
38pub use capabilities::{
39    CAPABILITY_SCHEMA, CAPABILITY_VERSION, CapabilityReport, ColorReport, Feature, GpuReport,
40    PlaybackReport, Runtime,
41};
42pub use error::EngineError;
43pub use error_code::{ErrorCode, gpu_error_of, gpu_fault_of};
44pub use exporter::{
45    ExportAudioWindow, ExportFrameNeeds, ExportPlaneStep, ExportProgress, ExportStep,
46    ExportStepTimings, ExportTextureStep, Exporter, MAX_EXPORT_FRAMES, export_audio_window,
47};
48pub use frame::{
49    FrameGraph, FrameNv12Render, FrameProvider, FrameRender, FrameRenderer, FrameYuv420pRender,
50    GpuFrameRenderer, RenderReport, check_frame_effects,
51};
52pub use layout::PreparedLayout;
53pub use passthrough::{PassthroughAudio, PassthroughPlan, PassthroughSegment, passthrough_plan};
54pub use playback::{ClockStep, PlaybackClock, PlaybackPolicy};
55pub use player::{PlaybackFrame, Player};
56pub use policy::{MissingFramePolicy, color_policy};
57pub use quality::QualityProfile;
58pub use snapshot::EngineProject;
59pub use text::{
60    FramesWithText, TextError, TextPixels, TextTexture, TextTextures, TextUpload, layout_key,
61};