diff --git a/src/util/error.rs b/src/util/error.rs index 5d7eef8..e56cf7e 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -20,6 +20,30 @@ impl Error { pub fn bug() -> Self { Self::new(AVERROR_BUG) } + + pub fn eof() -> Self { + Self::new(AVERROR_EOF) + } + + pub fn exit() -> Self { + Self::new(AVERROR_EXIT) + } + + pub fn external() -> Self { + Self::new(AVERROR_EXTERNAL) + } + + pub fn experimental() -> Self { + Self::new(AVERROR_EXPERIMENTAL) + } + + pub fn unknown() -> Self { + Self::new(AVERROR_UNKNOWN) + } + + pub fn invalid() -> Self { + Self::new(AVERROR_INVALIDDATA) + } } unsafe impl Send for Error { }