moq_transcode/error.rs
1//! Error type for the transcoder.
2
3/// Errors returned by `moq-transcode`.
4#[derive(Debug, thiserror::Error)]
5#[non_exhaustive]
6pub enum Error {
7 /// The source catalog has no rendition the transcoder can decode: it needs
8 /// an H.264, H.265, or AV1 rendition local to the source broadcast.
9 #[error("no transcodable video rendition in the source catalog")]
10 NoSource,
11
12 /// The chosen source rendition doesn't declare coded dimensions, so rungs
13 /// can't be sized or gated against it.
14 #[error("source rendition {0:?} is missing codedWidth/codedHeight")]
15 SourceDimensions(String),
16
17 /// moq-net transport error.
18 #[error(transparent)]
19 Net(#[from] moq_net::Error),
20
21 /// moq-mux container/catalog error.
22 #[error(transparent)]
23 Mux(#[from] moq_mux::Error),
24
25 /// hang catalog/container error.
26 #[error(transparent)]
27 Hang(#[from] hang::Error),
28
29 /// Video decode/encode error.
30 #[error(transparent)]
31 Video(#[from] moq_video::Error),
32
33 /// Timestamp overflow converting to the moq microsecond timescale.
34 #[error(transparent)]
35 TimeOverflow(#[from] moq_net::TimeOverflow),
36
37 /// Frame scaling failure.
38 #[error("scale failed: {0}")]
39 Scale(String),
40}