crispy_media_probe/
error.rs1#[derive(Debug, thiserror::Error)]
5pub enum ProbeError {
6 #[error("ffprobe not found in PATH — install ffmpeg to use media probing")]
8 FfprobeNotFound,
9
10 #[error("ffmpeg not found in PATH — install ffmpeg to use media probing")]
12 FfmpegNotFound,
13
14 #[error("operation timed out after {timeout_secs}s for {url}")]
16 Timeout {
17 url: String,
19 timeout_secs: u64,
21 },
22
23 #[error("process failed (exit code {code:?}): {stderr}")]
25 ProcessFailed {
26 code: Option<i32>,
28 stderr: String,
30 },
31
32 #[error("failed to parse ffprobe output: {0}")]
34 JsonParse(#[from] serde_json::Error),
35
36 #[error("no streams found in media at {0}")]
38 NoStreams(String),
39
40 #[error("I/O error: {0}")]
42 Io(#[from] std::io::Error),
43
44 #[error("HLS playlist recursion depth exceeded (max {0})")]
46 HlsMaxDepth(u32),
47
48 #[error("HLS playlist loop detected at {0}")]
50 HlsLoop(String),
51
52 #[cfg(feature = "libmpv-backend")]
54 #[error("libmpv not available: {0}")]
55 MpvUnavailable(String),
56
57 #[cfg(feature = "libmpv-backend")]
59 #[error("libmpv initialization failed: {0}")]
60 MpvInitFailed(String),
61
62 #[cfg(feature = "libmpv-backend")]
64 #[error("mpv command '{command}' failed: {detail}")]
65 MpvCommandFailed {
66 command: String,
68 detail: String,
70 },
71}