flowly_mpegts/
error.rs

1use flowly::Fourcc;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5    #[error("Mpeg2Ts Error: {0}")]
6    TsError(#[from] mpeg2ts::Error),
7
8    #[error("Not an audio ID: {0}")]
9    WrongAudioStreamId(u8),
10
11    #[error("Not a video ID: {0}")]
12    WrongVideoStreamId(u8),
13
14    #[error("Value too large: {0}")]
15    ValueTooLarge(u64),
16
17    #[error("Marker Bits Check Fail: {0}")]
18    UnexpectedMarkerBit(u64),
19
20    #[error("Wrong SyncByte")]
21    WrogSyncByte,
22
23    #[error("Unknown PID: {0}")]
24    UnknownPid(u16),
25
26    #[error("Psi table count is zero")]
27    PsiTableCountZero,
28
29    #[error("Unsupported Codec {0}")]
30    MuxUnsupportedCodec(Fourcc),
31}
32
33#[derive(Debug, thiserror::Error)]
34pub enum ExtError<E> {
35    #[error(transparent)]
36    Error(#[from] Error),
37
38    #[error(transparent)]
39    Other(E),
40}