pub mod device;
pub mod encoder;
pub mod h264;
pub use device::VaapiEncoderDevice;
pub use encoder::VaapiEncoder;
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("Encoder initialization failed: {0}")]
EncoderInit(String),
#[error("Invalid state: {0}")]
InvalidState(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Codec error: {0}")]
CodecError(String),
}
impl From<libva::VaError> for Error {
fn from(e: libva::VaError) -> Self {
Error::VaApi(e.to_string())
}
}