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