use anyhow::{Result, bail};
use super::{EncodedPacket, Encoder, EncoderConfig};
use crate::frame::VideoFrame;
pub struct QsvEncoder;
impl QsvEncoder {
pub fn new(_config: EncoderConfig, _gpu_index: u32) -> Result<Self> {
bail!(
"QSV (Intel oneVPL) encode support was not compiled in; \
rebuild with the `qsv` feature enabled to use Intel hardware encode"
)
}
}
impl Encoder for QsvEncoder {
fn send_frame(&mut self, _frame: &VideoFrame) -> Result<()> {
unreachable!("stub QSV encoder is never constructed")
}
fn flush(&mut self) -> Result<()> {
unreachable!("stub QSV encoder is never constructed")
}
fn receive_packet(&mut self) -> Result<Option<EncodedPacket>> {
unreachable!("stub QSV encoder is never constructed")
}
}