| 111 | |
| 112 | #[derive(Debug, Error)] |
| 113 | pub(crate) enum MediaError { |
| 114 | #[error("failed to open media file `{path}`: {source}")] |
| 115 | OpenFile { |
| 116 | path: String, |
| 117 | #[source] |
| 118 | source: std::io::Error, |
| 119 | }, |
| 120 | |
| 121 | #[error("failed to decode audio file `{path}`: {source}")] |
| 122 | DecodeAudio { |
| 123 | path: String, |
| 124 | #[source] |
| 125 | source: rodio::decoder::DecoderError, |
| 126 | }, |
| 127 | |
| 128 | #[error("failed to create audio output stream: {0}")] |
| 129 | OutputStream(#[from] rodio::StreamError), |
| 130 | |
| 131 | #[error("failed to create audio sink: {0}")] |
| 132 | Sink(#[from] rodio::PlayError), |
| 133 | |
| 134 | #[allow(dead_code)] |
| 135 | #[error("failed to decode video `{path}`: {reason}")] |
| 136 | DecodeVideo { path: String, reason: String }, |
| 137 | } |
nothing calls this directly
no outgoing calls
no test coverage detected