Skip to main content

FrameData

Trait FrameData 

Source
pub trait FrameData:
    Send
    + Sync
    + Any
    + 'static {
    // Required methods
    fn to_bytes<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Holds the pixel data for a single video frame.

Implementations may keep data on the GPU (e.g. GstFrameData, CudaFrameData) and only copy to CPU memory when to_bytes() is awaited.

Required Methods§

Source

fn to_bytes<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn as_any(&self) -> &dyn Any

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§