Skip to main content

alpha2_host_core/
lib.rs

1//! Host logic shared by every native alpha2 host, with no `FFmpeg` and no platform media API.
2//!
3//! The desktop host uses its policies, audio windows, cursor rules, providers, partial outputs,
4//! plugin runtime, protocol frames and request parsing (`requests`), and decodes and encodes
5//! through `FFmpeg` itself. The iOS and Android hosts also run its decode, export and still
6//! pipeline over `VideoToolbox` and `MediaCodec`. Project audio rendering needs the `engine`
7//! feature, on by default.
8
9// Its thread locals are `const`; clippy misreads the emulated-TLS expansion used on Android.
10#![cfg_attr(target_os = "android", allow(clippy::missing_const_for_thread_local))]
11
12pub mod aac;
13pub mod audio_file;
14pub mod audio_frames;
15mod audio_host;
16pub mod audio_stream;
17pub mod audio_timeline;
18#[cfg(feature = "engine")]
19pub mod audio_windows;
20pub mod codecs;
21#[cfg(feature = "engine")]
22pub mod cursor;
23#[cfg(feature = "effect-requests")]
24pub mod effect_request;
25pub mod encode;
26pub mod encode_policy;
27pub mod encode_watch;
28#[cfg(feature = "engine")]
29pub mod export;
30pub mod export_policy;
31#[cfg(feature = "engine")]
32pub mod extract;
33pub mod host_frames;
34pub mod parameter_sets;
35pub mod partial;
36#[cfg(feature = "plugins")]
37pub mod plugins;
38#[cfg(all(feature = "engine", feature = "cpal-host"))]
39pub mod preview_audio;
40#[cfg(feature = "probe")]
41pub mod probe;
42pub mod probe_cache;
43#[cfg(feature = "providers")]
44pub mod providers;
45pub mod rate_control;
46pub mod recovery;
47pub mod remote;
48pub mod request_watch;
49#[cfg(feature = "requests")]
50pub mod requests;
51pub mod reverse_window;
52pub mod stills;
53mod threads;
54#[cfg(feature = "engine")]
55pub mod timeline_audio;
56pub mod tools;
57pub mod video_stream;
58pub mod vt_sei;
59
60#[cfg(feature = "cpal-host")]
61pub use audio_host::{CpalHostError, CpalOutputHost, RealtimeAudioSource};
62pub use audio_host::{
63    DEFAULT_TRUE_PEAK_CEILING_DBTP, DecodedAudioSources, HostAudioConfig, HostSampleFormat,
64    LoudnessOutcome, LoudnessTarget, OfflineAudioError, negotiate_output_config, render_offline,
65};
66#[cfg(feature = "engine")]
67pub use audio_host::{
68    ProjectAudioRequest, ProjectAudioSources, render_project_audio,
69    render_project_audio_normalized, render_project_audio_with_taps,
70};
71pub use encode_watch::{EncodeCallWatch, watch_encode_calls};
72pub use partial::{
73    ExistingOutput, OutputTarget, PARTIAL_OUTPUT_IN_USE, PublishReport,
74    remove_stale_partial_output, write_png, write_whole,
75};
76pub use recovery::{
77    ConcealedAudioGap, CorruptPacket, DECODE_WORK_LIMIT, DecodeDiagnostic, DecodeDiagnosticCounts,
78    DecodeDiagnostics, DecodeFailure, DecodePolicy, DecodeProgressWatch, DroppedAudioOverlap,
79    Recovery, VideoRecoveryGap, watch_decode_progress,
80};
81pub use stills::{DecodedStill, StillFormat, StillInfo, decode_still, probe_still, still_format};
82pub use threads::panic_text;
83pub use tools::{
84    FrameScore, THUMBNAIL_LUMA_RANGE, choose_thumbnail, downscale_frame, resize_rgba, score_frame,
85};