pub enum TsError {
Truncated {
what: &'static str,
have: usize,
need: usize,
},
BadSyncByte(u8),
SectionLengthOverrun {
claimed: usize,
have: usize,
},
PsiCrcMismatch {
header: u32,
computed: u32,
},
BadPesStartCode([u8; 3]),
Unsupported(&'static str),
}Expand description
Errors raised by the MPEG-TS parsers.
Variants§
Truncated
The slice handed to a parser is shorter than the spec-fixed record size.
BadSyncByte(u8)
A 188-byte TS packet’s first byte is not the spec-defined sync
byte (0x47).
SectionLengthOverrun
A PSI section header reported a length that exceeds the data the caller supplied.
PsiCrcMismatch
A PSI section’s CRC-32/MPEG-2 trailer didn’t match the body.
BadPesStartCode([u8; 3])
PES packet start code was not 00 00 01.
Unsupported(&'static str)
Catch-all for spec-permitted but currently unsupported values (e.g. a TS_program_map_section variant we haven’t wired).
Trait Implementations§
Source§impl Error for TsError
impl Error for TsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TsError
impl RefUnwindSafe for TsError
impl Send for TsError
impl Sync for TsError
impl Unpin for TsError
impl UnsafeUnpin for TsError
impl UnwindSafe for TsError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more