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 remote;
43pub mod request_watch;
44#[cfg(feature = "requests")]
45pub mod requests;
46pub mod reverse_window;
47pub mod stills;
48mod threads;
49#[cfg(feature = "engine")]
50pub mod timeline_audio;
51pub mod tools;
52pub mod video_stream;
53pub mod vt_sei;
54
55#[cfg(feature = "cpal-host")]
56pub use audio_host::{CpalHostError, CpalOutputHost, RealtimeAudioSource};
57pub use audio_host::{
58    DecodedAudioSources, HostAudioConfig, HostSampleFormat, OfflineAudioError,
59    negotiate_output_config, render_offline,
60};
61#[cfg(feature = "engine")]
62pub use audio_host::{
63    ProjectAudioRequest, ProjectAudioSources, render_project_audio, render_project_audio_with_taps,
64};
65pub use encode_watch::{EncodeCallWatch, watch_encode_calls};
66pub use partial::{
67    ExistingOutput, OutputTarget, PARTIAL_OUTPUT_IN_USE, PublishReport,
68    remove_stale_partial_output, write_png, write_whole,
69};
70pub use recovery::{
71    ConcealedAudioGap, CorruptPacket, DECODE_WORK_LIMIT, DecodeDiagnostic, DecodeDiagnosticCounts,
72    DecodeDiagnostics, DecodeFailure, DecodePolicy, DecodeProgressWatch, DroppedAudioOverlap,
73    Recovery, VideoRecoveryGap, watch_decode_progress,
74};
75pub use stills::{DecodedStill, StillFormat, StillInfo, decode_still, probe_still, still_format};
76pub use threads::panic_text;
77pub use tools::{
78    FrameScore, THUMBNAIL_LUMA_RANGE, choose_thumbnail, downscale_frame, resize_rgba, score_frame,
79};