Skip to main content

Module decode

Module decode 

Source
Expand description

Subscribe to an encoded audio track and decode it to raw PCM.

The decode counterpart to encode, and the mirror of moq-video’s decode module.

Entry points, high to low level:

  • Consumer subscribes to a track and hands back decoded Read events.
  • Decoder decodes packets you supply (bring your own payloads) into Decoded interleaved f32 samples.

Options keeps subscription and output policy separate from the lower-level decoder Config, whose Backend picks the implementation: a platform decoder first where one takes the track, then software (libopus, PCM, and symphonia for AAC-LC).

Structs§

Backpressure
Decides when Consumer::read decodes a packet, which is how a player splits its playout delay between decoded PCM in its playback ring and encoded media held in the consumer.
Config
Low-level decoder configuration.
Consumer
Subscribe to a moq-mux audio track and emit decoded PCM in the requested Output.
Decoded
One decoder output, a packet’s worth for libopus, PCM, and symphonia: interleaved f32 samples at the codec’s own rate and layout, plus what the codec was doing when it produced them.
Decoder
Decodes codec packets into interleaved f32 PCM.
Delay
How far behind the live edge a media reader plays: where it starts, and how late it may fall.
Options
Subscription, decoder, and output policy for Consumer.
Output
PCM output conversion requested from Consumer.

Enums§

Backend
Decoder backend selection.
Read
One item of a Consumer read, in delivery order: decoded PCM, or a break in it.
Start
Where a consumer starts on a track that already holds groups.