Skip to main content

alpha2_native/openh264/
mod.rs

1//! Software H.264 through Cisco's `OpenH264` binary, loaded at run time.
2//!
3//! The bundled `FFmpeg` runtime is LGPL and has no CPU H.264 encoder on Linux
4//! or macOS. `OpenH264` fills that gap without changing the runtime: the user
5//! installs Cisco's binary on request, and this module loads it
6//! ([`library`]), drives it ([`ffi`]) and turns its output into the packets
7//! and sample description the muxers take ([`encoder`]). Its encoder is named
8//! `openh264`, apart from `FFmpeg`'s own `libopenh264` wrapper, and comes after
9//! every hardware encoder and `libx264` in preference.
10
11mod encoder;
12mod ffi;
13mod library;
14
15pub(crate) use encoder::{OpenH264Encoder, OpenH264Rate, OpenH264Settings};
16pub use library::{
17    OPENH264_INSTALL_COMMAND, OPENH264_NOTICE, OPENH264_VERSION, OpenH264Library, OpenH264Provider,
18    OpenH264Status, openh264_status,
19};
20
21/// The encoder name `--video-encoder` takes for `OpenH264`.
22pub const OPENH264_ENCODER_NAME: &str = "openh264";
23
24#[cfg(test)]
25mod tests;