pub const OPENH264_MAX_SIZE: usize = 9437184;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("{0}")]
IoError(#[from] std::io::Error),
#[error("{0}")]
Openh264Error(#[from] openh264::Error),
#[error(
"openh264 limits frame width * height <= {}. (w, h)={0:?}",
OPENH264_MAX_SIZE
)]
OversizedFrame((usize, usize)),
#[error("openh264 requires frame width and height to both be above 0 and a multiple of 2. (w, h)={0:?}")]
InvalidFrameDimensions((usize, usize)),
#[error("video has zero frames")]
NoFrames,
#[error("the size of frame {0} does not match previous frame(s). frame={1:?}, video={1:?} ")]
FrameSizeMismatch(usize, (usize, usize), (usize, usize)),
#[error("at least one column in frame {0} differs from other columns")]
InconsistentGridHeight(usize),
}