rave_nvcodec/
nvdec_stub.rs1#![allow(missing_docs)]
2use std::sync::Arc;
5
6use rave_core::codec_traits::{BitstreamSource, DecodedFrame, FrameDecoder};
7use rave_core::context::GpuContext;
8use rave_core::error::{EngineError, Result};
9use rave_core::ffi_types::cudaVideoCodec as CoreCodec;
10
11pub struct NvDecoder;
13
14impl NvDecoder {
15 pub fn new(
16 ctx: Arc<GpuContext>,
17 source: Box<dyn BitstreamSource>,
18 codec: CoreCodec,
19 ) -> Result<Self> {
20 let _ = (ctx, source, codec);
21 Err(EngineError::Decode(
22 "rave-nvcodec built in stub mode: NVDEC is unavailable on this build host".into(),
23 ))
24 }
25}
26
27impl FrameDecoder for NvDecoder {
28 fn decode_next(&mut self) -> Result<Option<DecodedFrame>> {
29 Err(EngineError::Decode(
30 "rave-nvcodec built in stub mode: NVDEC is unavailable at runtime".into(),
31 ))
32 }
33}