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 passthrough;
21mod playback;
22mod player;
23mod policy;
24mod quality;
25mod schedule;
26mod snapshot;
27mod text;
28
29pub use audio::{
30    AudioContinuity, AudioNeed, AudioRenderStatus, AudioRenderer, MAX_AUDIO_BLOCK,
31    MAX_SETTLING_SECONDS,
32};
33pub use capabilities::{
34    CAPABILITY_SCHEMA, CAPABILITY_VERSION, CapabilityReport, ColorReport, Feature, GpuReport,
35    PlaybackReport, Runtime,
36};
37pub use error::EngineError;
38pub use error_code::{ErrorCode, gpu_error_of, gpu_fault_of};
39pub use exporter::{
40    ExportAudioWindow, ExportFrameNeeds, ExportNv12Step, ExportProgress, ExportStep,
41    ExportStepTimings, ExportTextureStep, Exporter, MAX_EXPORT_FRAMES, export_audio_window,
42};
43pub use frame::{
44    FrameGraph, FrameNv12Render, FrameProvider, FrameRender, FrameRenderer, FrameYuv420pRender,
45    RenderReport,
46};
47pub use passthrough::{PassthroughAudio, PassthroughPlan, PassthroughSegment, passthrough_plan};
48pub use playback::{ClockStep, PlaybackClock, PlaybackPolicy};
49pub use player::{PlaybackFrame, Player};
50pub use policy::{MissingFramePolicy, color_policy};
51pub use quality::QualityProfile;
52pub use snapshot::EngineProject;
53pub use text::{
54    CanvasRect, FramesWithText, TextBounds, TextError, TextTexture, TextTextures, measure_text,
55    text_key,
56};