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_capturecaptures a microphone (or system audio) and publishes it (turnkey). Requires thecapturefeature.Encoderencodes raw PCM you supply, andProducerpublishes the resulting packets (bring your own PCM).Produceralone publishes PCM you hand it, encoding as it goes.
Input declares the PCM layout going in. Config configures the
bring-your-own-PCM Encoder, which needs that layout up front; Options
configures Producer and publish_capture, which learn it from the
caller’s frames or the capture source instead. The decode/consume counterpart
lives in the sibling decode module.
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§
- Config
- Encoder configuration: the input PCM layout plus the codec knobs.
- Encoder
- Audio encoder over the PCM layout declared in
Config::input. - Input
- The PCM layout of the buffers handed to
Encoder::encode/Producer::write. - Options
- Source-agnostic encode knobs for
Producerandpublish_capture, where the input PCM layout comes from the caller’s frames or the capture source rather than from these options. For the bring-your-own-PCMEncoder, which needs that layout up front, useConfiginstead. - Producer
- Encode raw PCM and publish it as a moq-mux audio track.
Enums§
- Codec
- Output audio codec.
#[non_exhaustive]so new codecs can be added without breaking externalmatches.