pub struct HardwareZeroCopyDecoder { /* private fields */ }Expand description
Zero-copy GPU interop hardware decoder adapter producing VideoGpuSurfaceHandle frames without CPU readback.
Implementations§
Source§impl HardwareZeroCopyDecoder
Constructors for HardwareZeroCopyDecoder.
impl HardwareZeroCopyDecoder
Constructors for HardwareZeroCopyDecoder.
Sourcepub fn for_backend(kind: HardwareDecoderKind, device_id: u64) -> Self
pub fn for_backend(kind: HardwareDecoderKind, device_id: u64) -> Self
Source§impl HardwareZeroCopyDecoder
impl HardwareZeroCopyDecoder
pub fn get_kind(&self) -> HardwareDecoderKind
pub fn get_mut_kind(&mut self) -> &mut HardwareDecoderKind
pub fn set_kind(&mut self, val: HardwareDecoderKind) -> &mut Self
pub fn get_device_id(&self) -> u64
pub fn get_mut_device_id(&mut self) -> &mut u64
pub fn set_device_id(&mut self, val: u64) -> &mut Self
pub fn get_pixel_format(&self) -> VideoPixelFormat
pub fn get_mut_pixel_format(&mut self) -> &mut VideoPixelFormat
pub fn set_pixel_format(&mut self, val: VideoPixelFormat) -> &mut Self
pub fn get_config(&self) -> VideoDecoderConfig
pub fn get_mut_config(&mut self) -> &mut VideoDecoderConfig
pub fn set_config(&mut self, val: VideoDecoderConfig) -> &mut Self
pub fn get_next_surface_id(&self) -> u64
pub fn get_mut_next_surface_id(&mut self) -> &mut u64
pub fn set_next_surface_id(&mut self, val: u64) -> &mut Self
pub fn get_next_fence_value(&self) -> u64
pub fn get_mut_next_fence_value(&mut self) -> &mut u64
pub fn set_next_fence_value(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for HardwareZeroCopyDecoder
impl Clone for HardwareZeroCopyDecoder
Source§impl Debug for HardwareZeroCopyDecoder
impl Debug for HardwareZeroCopyDecoder
Source§impl Default for HardwareZeroCopyDecoder
impl Default for HardwareZeroCopyDecoder
Source§impl VideoDecoderBackend for HardwareZeroCopyDecoder
Zero-copy GPU surface VideoDecoderBackend implementation for HardwareZeroCopyDecoder.
impl VideoDecoderBackend for HardwareZeroCopyDecoder
Zero-copy GPU surface VideoDecoderBackend implementation for HardwareZeroCopyDecoder.
Source§fn backend_kind(&self) -> HardwareDecoderKind
fn backend_kind(&self) -> HardwareDecoderKind
Source§fn capabilities(&self) -> HardwareDecoderCapabilities
fn capabilities(&self) -> HardwareDecoderCapabilities
Source§fn decode_packet(
&mut self,
packet: &EncodedVideoPacket,
_pool: &VideoFramePool,
) -> Result<Option<DecodedVideoFrame>, String>
fn decode_packet( &mut self, packet: &EncodedVideoPacket, _pool: &VideoFramePool, ) -> Result<Option<DecodedVideoFrame>, String>
Emits a zero-copy VideoGpuSurfaceHandle backed frame without touching the CPU frame pool.
§Arguments
&Self- Mutable hardware decoder.&EncodedVideoPacket- Demuxed video packet.&VideoFramePool- Unused CPU pool (zero CPU allocation on hardware zero-copy path).
§Returns
Result<Option<DecodedVideoFrame>, String>- GPU-surface-backed decoded frame.
Auto Trait Implementations§
impl Forget for HardwareZeroCopyDecoder
impl Freeze for HardwareZeroCopyDecoder
impl Move for HardwareZeroCopyDecoder
impl RefUnwindSafe for HardwareZeroCopyDecoder
impl Send for HardwareZeroCopyDecoder
impl Sync for HardwareZeroCopyDecoder
impl Unpin for HardwareZeroCopyDecoder
impl UnsafeUnpin for HardwareZeroCopyDecoder
impl UnwindSafe for HardwareZeroCopyDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more