1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum Error {
5 #[error("Failed to initialize format context")]
6 InitializeFormatContext,
7 #[error("Could not find stream in file")]
8 FindStreamInfo,
9 #[error("Could not find any audio stream")]
10 NoAudioStream,
11 #[error("Null codec pointer")]
12 NullCodec,
13 #[error("Null codec context pointer")]
14 NullCodecContext,
15 #[error("Copying params to codec context")]
16 CodecParamsToContext,
17 #[error("Failed to initialize decoder")]
18 InitializeDecoder,
19 #[error("Null frame pointer")]
20 NullFrame,
21 #[error("Error reading frame: {0}")]
22 ReadFrame(i32),
23 #[error("Error sending packet: {0}")]
24 SendPacket(i32),
25 #[error("Error draining decoder: {0}")]
26 DrainDecoder(i32),
27 #[error("Error receiving frame: {0}")]
28 ReceiveFrame(i32),
29 #[error("Failed to initialize swr context")]
30 InitializeSwr,
31}