#[non_exhaustive]pub enum Error {
MultiplePrograms {
programs: Vec<u16>,
},
MissingProgram {
program: u16,
programs: Vec<u16>,
},
Restarted(Step),
Empty(&'static str),
Malformed(String),
Unsupported(String),
Mux(Box<Error>),
}Expand description
Why a TS import or export stopped.
A packet lost or flagged by the transport error indicator is not one: the importer counts
the unit it breaks in its stats and carries on. An intact packet, header,
or unit that does not parse is one: Error::Malformed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MultiplePrograms
A PAT listed more than one program, and the import was not told which one to take.
Importing them all onto one broadcast would put unrelated clocks on one timeline, so the
import stops instead. Pick one with Import::with_program, or
import each as its own broadcast with Programs.
MissingProgram
The PAT does not list the program the import was told to take.
Fields
Restarted(Step)
The source’s clock stepped onto another timeline, or its PAT named another program, so
what follows is another broadcast. Republish carries on into a new
identity instead.
Empty(&'static str)
The input ended before it declared anything to publish.
Malformed(String)
The input breaks the MPEG-TS or a codec’s rules past what the import or export recovers from: a TS byte stream for an import, a broadcast’s catalog and frames for an export.
Unsupported(String)
The input is well-formed but needs what this import or export does not carry, such as a codec, a layout change, or more buffer or rate than its configuration allows.
Mux(Box<Error>)
Parsing the media or publishing it failed.
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.