1use anyhow::{Result, bail};
10
11use super::{EncodedPacket, Encoder, EncoderConfig};
12use crate::frame::VideoFrame;
13
14pub struct QsvEncoder;
15
16impl QsvEncoder {
17 pub fn new(_config: EncoderConfig, _gpu_index: u32) -> Result<Self> {
18 bail!(
19 "QSV (Intel oneVPL) encode support was not compiled in; \
20 rebuild with the `qsv` feature enabled to use Intel hardware encode"
21 )
22 }
23}
24
25impl Encoder for QsvEncoder {
26 fn send_frame(&mut self, _frame: &VideoFrame) -> Result<()> {
27 unreachable!("stub QSV encoder is never constructed")
28 }
29 fn flush(&mut self) -> Result<()> {
30 unreachable!("stub QSV encoder is never constructed")
31 }
32 fn receive_packet(&mut self) -> Result<Option<EncodedPacket>> {
33 unreachable!("stub QSV encoder is never constructed")
34 }
35}