moq_audio/encode/mod.rs
1//! Encode raw PCM and publish it as a moq audio track.
2//!
3//! The output codec is selected via [`Codec`].
4//!
5//! Entry points, high to low level:
6//! - `publish_capture` captures a microphone (or system audio) and publishes
7//! it (turnkey). Requires the `capture` feature.
8//! - [`Encoder`] encodes raw PCM you supply into [`Encoded`] packets, and
9//! [`Producer`] publishes them (bring your own PCM).
10//! - [`Producer`] alone publishes PCM you hand it, encoding as it goes.
11//!
12//! [`Input`] declares the source PCM while [`Settings`] describes exactly what
13//! the codec accepts. [`Options`] combines those settings with publication policy.
14//!
15//! `publish_capture` is unlinked above because it only exists with the `capture`
16//! feature, so a default-feature rustdoc build has nothing to link to.
17
18mod encoded;
19mod encoder;
20mod producer;
21
22#[cfg(feature = "capture")]
23mod capture;
24
25pub use encoded::Encoded;
26pub use encoder::{Codec, Encoder, Finish, Input, Settings};
27pub use producer::{Options, Producer};
28
29#[cfg(feature = "capture")]
30pub use capture::{Driver, Level, Publication, PublicationOptions, State, Status, publish_capture};