pub mod decoder;
pub mod device;
mod vp9_qlookup;
pub use decoder::VaapiDecoder;
pub use device::VaapiDecoderDevice;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("VA-API error: {0}")]
VaApi(String),
#[error("Codec not supported: {0}")]
CodecNotSupported(String),
#[error("Decoder initialization failed: {0}")]
DecoderInit(String),
#[error("Invalid state: {0}")]
InvalidState(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Parser error: {0}")]
Parser(String),
}
impl From<libva::VaError> for Error {
fn from(e: libva::VaError) -> Self {
Error::VaApi(e.to_string())
}
}