Expand description
Encode raw PCM and publish it as a moq audio track.
The output codec is selected via Codec, and the implementation behind it
via Backend: a platform encoder when the host has one, software otherwise.
Kind says what the audio carries, so Opus tunes for voice or music.
AAC has no software encoder, so a host without a platform one refuses it.
Entry points, high to low level:
publish_capturepublishes an independent capture consumer. Requires thecapturefeature.Encoderencodes raw PCM you supply intoEncodedpackets, andProducerpublishes them (bring your own PCM).Produceralone publishes PCM you hand it, encoding as it goes.
Input declares the source PCM while Config describes exactly what
the codec accepts. Options combines that config 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§
- Capture
- Capture and encode settings for
publish_capture. - Config
- Audio codec config shared by
EncoderandProducer. - Driver
- The task that encodes one consumer without owning its capture device.
- Encoded
- One encoded audio packet, plus what the codec was doing when it produced it.
- Encoder
- Audio encoder over codec-sized interleaved
f32PCM. - Finish
- Packets emitted by
Encoder::finishand the decoded padding at their end. - Finished
- An audio track whose
Producerfinished it: every packet is published, and it can still be watched or aborted, but not written to. - 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.
- Publication
- A handle that observes a capture publication.
- State
- A snapshot of a capture publication’s lifecycle.
Enums§
- Backend
- Encoder backend selection.
- Codec
- Output audio codec.
#[non_exhaustive]so new codecs can be added without breaking externalmatches. - Kind
- What the audio carries, which tunes the codec for it.
- Status
- The capture publication’s current lifecycle state.
Functions§
- publish_
capture - Capture audio and publish it as an encoded MoQ track.