#[non_exhaustive]pub enum Error {
Show 50 variants
Moq(Error),
Hang(Error),
Json(Error),
UnsupportedMode(String),
ForeignBroadcast,
Cmaf(Error),
Ts(Error),
Mkv(Error),
Flv(Error),
Msf(Error),
Loc(Error),
Annexb(Error),
Aac(Error),
Opus(Error),
Flac(Error),
Mp3(Error),
H264(Error),
H265(Error),
Av1(Error),
Vp8(Error),
Vp9(Error),
Legacy(Error),
TimestampOverflow(TimeOverflow),
Mp4(Arc<dyn Error + Send + Sync>),
Io(Arc<Error>),
UnknownFormat(String),
NotSelfDescribing(String),
WrongKind {
format: String,
actual: &'static str,
wanted: &'static str,
},
Reorder(ReorderError),
Drift {
ppm: f64,
limit: f64,
},
Retired,
MissingKeyframe(MissingKeyframe),
InvalidEnd(InvalidEnd),
TimestampRewind(TimestampRewind),
NotPublished,
NegativeFlvPts {
dts_ms: u64,
composition_time_ms: i32,
},
UnmappableTimestamp(String),
UnsupportedContainer(String),
EscapingBroadcast(String),
JitterDecreased,
DelayDecreased,
InvalidCapture,
NoMpegtsSection,
TsPacketSize(usize),
PcrGap {
pid: u16,
bytes: u64,
},
Replaced(String),
IdentityChanged(String),
RenditionRewound {
rendition: String,
start: Duration,
read: Duration,
},
Finished,
EmptyRawPayload,
}Expand description
Errors from moq-mux operations.
Most variants are delegations to underlying layers: [moq_net::Error] for
transport / pub-sub failures, hang::Error for catalog/codec parsing, the
per-format Errors for container shape problems, and the per-codec Errors for
bitstream parsing problems.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Moq(Error)
Error from the underlying moq-net transport.
Hang(Error)
Error from the hang catalog/codec layer.
Json(Error)
Error publishing or consuming JSON over a track.
UnsupportedMode(String)
A catalog entry declares a track mode this build does not implement.
ForeignBroadcast
A locally published track’s catalog entry points at another broadcast.
Cmaf(Error)
Error parsing or building CMAF moof+mdat fragments.
Ts(Error)
Error importing or exporting MPEG-TS.
Mkv(Error)
Error parsing or building MKV / WebM streams.
Flv(Error)
Error importing or exporting FLV.
Msf(Error)
Error decoding the MSF catalog.
Loc(Error)
Error parsing or building LOC frames.
Annexb(Error)
Error parsing an Annex B NAL stream.
Aac(Error)
Error parsing AAC.
Opus(Error)
Error parsing Opus.
Flac(Error)
Error parsing FLAC.
Mp3(Error)
Error parsing MP3.
H264(Error)
Error parsing H.264.
H265(Error)
Error parsing H.265.
Av1(Error)
Error parsing AV1.
Vp8(Error)
Error parsing VP8.
Vp9(Error)
Error parsing VP9.
Legacy(Error)
Error parsing legacy audio (MP2 / AC-3 / E-AC-3).
TimestampOverflow(TimeOverflow)
Timestamp overflow when converting between timescales.
Mp4(Arc<dyn Error + Send + Sync>)
Error decoding or encoding an mp4 atom.
Io(Arc<Error>)
I/O error.
UnknownFormat(String)
Unknown media format.
NotSelfDescribing(String)
A video format that a raw byte stream cannot be split into.
Only the self-delimiting codecs (Annex-B H.264/H.265, AV1 OBUs) carry their own frame
boundaries. The rest need length prefixes or an out-of-band config record, so they can only
be imported as whole frames via Track::video.
WrongKind
A format was handed to a constructor for a different kind of import.
Each entry point takes only the fields its kind can honor, so the format has to match: an audio format carries no video hint, and a container has no single rendition to label.
Fields
Reorder(ReorderError)
Video does not fit the reorder depth it declares.
Drift
An export’s source clock runs further off the output’s than the output may follow.
Fields
Retired
A publisher an export handed off from queued media after its handoff deadline.
MissingKeyframe(MissingKeyframe)
A non-keyframe frame was received before any keyframe opened a group. A track joining mid-stream should skip frames until the first keyframe.
InvalidEnd(InvalidEnd)
An explicit video endpoint precedes its last frame.
TimestampRewind(TimestampRewind)
A group starts before the previous group did: the source restarted.
NotPublished
A rendition was modified before its initial config was published.
NegativeFlvPts
A FLV video frame resolved to a negative presentation timestamp.
Fields
UnmappableTimestamp(String)
A timestamp cannot be mapped between the broadcast clock and the wall: PTS zero would land
before the moq epoch (2020) or after now, the host’s wall clock was unset so the clock has no
mapping, or a catalog root clock would change or clear the producer’s fixed clock.
UnsupportedContainer(String)
A rendition declared a container kind this build does not recognize, so its
frames cannot be parsed. Such a rendition must be ignored, not guessed at.
EscapingBroadcast(String)
A rendition’s broadcast reference walks above the root, so it names no broadcast.
The root is the consumer’s authorized subtree, so such a reference is an attempt to
name content the consumer cannot reach. It rejects the whole catalog
(catalog::hang::Consumer) rather than the one
rendition, and is also what a direct Source::resolve /
Source::subscribe_track reports.
JitterDecreased
A rendition tried to lower jitter already advertised to subscribers.
DelayDecreased
A rendition tried to lower delay already advertised to subscribers.
InvalidCapture
A capture instant is ahead of the broadcast clock’s now, or before its epoch.
NoMpegtsSection
A transport stream passthrough’s catalog extension carries no mpegts section to list its
track in.
TsPacketSize(usize)
A transport stream passthrough was fed packets other than 188 bytes.
A 192-byte source (BDAV M2TS, a four-byte timestamp before each packet) or a 204-byte one (Reed-Solomon parity after each) is refused rather than reframed, since dropping those bytes would break the byte identity passthrough exists for.
PcrGap
The clock PID carried no PCR across more bytes than a group may hold.
Those bytes cannot be timed, and holding them for a PCR that may never come is unbounded.
Replaced(String)
Another publisher identity replaced a followed broadcast, and stitching was off.
IdentityChanged(String)
A published rendition changed fields that require a new decoder configuration.
RenditionRewound
A rendition moved to a track whose media goes back before what the export already read for it.
Fields
Finished
An importer was given input after it finished.
EmptyRawPayload
A raw data track was handed an empty payload, which its zero-byte discontinuity marker leaves no way to carry.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(err: Error) -> Self
fn from(err: Error) -> Self
A TS error that crossed into crate::Error comes back out as itself.