#[non_exhaustive]pub enum Error {
InvalidPid(u16),
UnknownPid(u16),
BadSyncByte,
CrcMismatch {
expected: u32,
computed: u32,
},
UnexpectedTableId {
expected: u8,
actual: u8,
},
BadPesStartCode,
UnrecognizedStreamType(u8),
}Expand description
Errors from MPEG-TS mux/demux.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidPid(u16)
A PID is outside the 13-bit range (> 0x1FFF) or uses a reserved value (0 = PAT, 1 = CAT).
UnknownPid(u16)
AccessUnit::pid (or Muxer::write_access_unit’s pid argument) is not
one of the streams registered in the PMT.
BadSyncByte
The first byte of a TS packet is not 0x47.
CrcMismatch
A PSI section’s CRC-32 doesn’t match the computed value.
Fields
UnexpectedTableId
PAT/PMT table_id byte doesn’t match the expected value for that table.
BadPesStartCode
PES packet’s start_code_prefix isn’t 0x000001.
UnrecognizedStreamType(u8)
PMT references a stream_type byte this crate doesn’t recognize (see crate::StreamType).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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