#[non_exhaustive]pub enum Read {
Frame(Frame),
#[non_exhaustive] Gap {
timestamp: Timestamp,
duration: Duration,
},
#[non_exhaustive] End {
end: Timestamp,
},
}Expand description
One item of a Consumer read, in delivery order: decoded PCM, or a break in it.
The decoded counterpart of [moq_mux::container::Read], and the same shape
moq_video::decode::Read has, so a player handles loss and ends alike for
every media type.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Frame(Frame)
Decoded PCM.
#[non_exhaustive]Gap
Media after what was already read was lost: a group was skipped or never arrived, or a packet’s timestamp did not continue the previous one. What follows does not continue what came before, and every sample decoded before the loss precedes it.
A codec that conceals loss (Opus) fills up to the first 100 ms of the
loss with Read::Frames first, so the gap covers only the rest, and a shorter loss
reads as no gap at all. A loss across a declared Read::End is never concealed.
The span is an upper bound, and timestamp is in the scale of the frame that follows.
Fields
This variant is marked as non-exhaustive
timestamp: TimestampThe furthest presentation point already read.
#[non_exhaustive]End
The publisher stopped its encoder: it paused, switched source, or finished.
Frames that follow and start before end are the stopped encoder’s remaining
media: its codec drain, trimmed at end, and the resampler’s tail. The first frame
at or past end comes from a fresh encoder, since a timeline only moves forward.
Fields
This variant is marked as non-exhaustive
end: TimestampWhere the stopped encoder’s media stops.