Skip to main content

Module encode

Module encode 

Source
Expand description

Encode raw PCM and publish it as a moq audio track.

The output codec is selected via Codec.

Entry points, high to low level:

  • publish_capture captures a microphone (or system audio) and publishes it (turnkey). Requires the capture feature.
  • Encoder encodes raw PCM you supply into Encoded packets, and Producer publishes them (bring your own PCM).
  • Producer alone publishes PCM you hand it, encoding as it goes.

Input declares the source PCM while Settings describes exactly what the codec accepts. Options combines those settings with publication policy.

publish_capture is unlinked above because it only exists with the capture feature, so a default-feature rustdoc build has nothing to link to.

Structs§

Encoded
One encoded audio packet, plus what the codec was doing when it produced it.
Encoder
Audio encoder over codec-sized interleaved f32 PCM.
Finish
Packets emitted by Encoder::finish and the decoded padding at their end.
Input
PCM supplied to Producer::write.
Options
Encode and publication policy for Producer.
Producer
Encode raw PCM and publish it as a moq-mux audio track.
Settings
Audio codec settings shared by Encoder and Producer.

Enums§

Codec
Output audio codec. #[non_exhaustive] so new codecs can be added without breaking external matches.