1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/// Errors returned by `moq-video`.
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
/// No encoder matching the requested codec / hardware preference could be
/// opened (none compiled in, or none available on this machine).
#[error("no usable video encoder found (tried: {0})")]
NoEncoder(String),
/// No decoder matching the requested codec / hardware preference could be
/// opened (none compiled in, or none available on this machine).
#[error("no usable video decoder found (tried: {0})")]
NoDecoder(String),
/// A track's codec is not supported by the native decoders.
#[error("unsupported codec for native decode: {0}")]
UnsupportedCodec(String),
/// The requested capture source or enumeration has no implementation on this
/// platform (the message names what is missing).
#[error("not supported on this platform: {0}")]
Unsupported(String),
/// The configured framerate was zero (would divide by zero / produce a
/// degenerate codec time base).
#[error("invalid framerate: {0} (must be non-zero)")]
InvalidFramerate(u32),
/// This encoder can't change its bitrate once open, so it can't follow a
/// congestion-control estimate. Encoding continues at the configured rate.
#[error("encoder {0} cannot change bitrate while running")]
BitrateUnsupported(&'static str),
/// Capture / encode / codec failure (the message carries the detail).
#[error(transparent)]
Codec(#[from] anyhow::Error),
/// moq-mux muxer/catalog error.
#[error(transparent)]
Mux(#[from] moq_mux::Error),
/// moq-net transport error.
#[error(transparent)]
Net(#[from] moq_net::Error),
/// Timestamp overflow converting to the moq microsecond timescale.
#[error(transparent)]
TimeOverflow(#[from] moq_net::TimeOverflow),
}