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_frames;
14mod audio_host;
15pub mod audio_stream;
16pub mod audio_timeline;
17#[cfg(feature = "engine")]
18pub mod audio_windows;
19pub mod codecs;
20#[cfg(feature = "engine")]
21pub mod cursor;
22pub mod encode;
23pub mod encode_policy;
24pub mod encode_watch;
25#[cfg(feature = "engine")]
26pub mod export;
27pub mod export_policy;
28#[cfg(feature = "engine")]
29pub mod extract;
30pub mod host_frames;
31pub mod parameter_sets;
32pub mod partial;
33#[cfg(feature = "plugins")]
34pub mod plugins;
35#[cfg(all(feature = "engine", feature = "cpal-host"))]
36pub mod preview_audio;
37pub mod probe_cache;
38#[cfg(feature = "providers")]
39pub mod providers;
40pub mod rate_control;
41pub mod recovery;
42pub mod request_watch;
43#[cfg(feature = "requests")]
44pub mod requests;
45pub mod reverse_window;
46pub mod stills;
47mod threads;
48pub mod tools;
49pub mod video_stream;
50pub mod vt_sei;
51
52#[cfg(feature = "cpal-host")]
53pub use audio_host::{CpalHostError, CpalOutputHost, RealtimeAudioSource};
54pub use audio_host::{
55    DecodedAudioSources, HostAudioConfig, HostSampleFormat, OfflineAudioError,
56    negotiate_output_config, render_offline,
57};
58#[cfg(feature = "engine")]
59pub use audio_host::{ProjectAudioRequest, ProjectAudioSources, render_project_audio};
60pub use encode_watch::{EncodeCallWatch, watch_encode_calls};
61pub use partial::{
62    ExistingOutput, OutputTarget, PARTIAL_OUTPUT_IN_USE, PublishReport,
63    remove_stale_partial_output, write_png, write_whole,
64};
65pub use recovery::{
66    ConcealedAudioGap, CorruptPacket, DECODE_WORK_LIMIT, DecodeDiagnostic, DecodeDiagnosticCounts,
67    DecodeDiagnostics, DecodeFailure, DecodePolicy, DecodeProgressWatch, DroppedAudioOverlap,
68    Recovery, VideoRecoveryGap, watch_decode_progress,
69};
70pub use stills::{DecodedStill, StillFormat, StillInfo, decode_still, probe_still, still_format};
71pub use threads::panic_text;
72pub use tools::{
73    FrameScore, THUMBNAIL_LUMA_RANGE, choose_thumbnail, downscale_frame, resize_rgba, score_frame,
74};