Skip to main content

FromRGBA

Trait FromRGBA 

Source
pub trait FromRGBA: Send + Sync {
    // Required methods
    fn get_num_bytes(&self) -> RVec<usize>;
    fn get_num_bytes_rgba(&self) -> usize;
    fn get_total_bytes(&self) -> usize;
    fn process_frame(
        &self,
        context: &ProcessFrameContext,
        frame: VideoFrame,
    ) -> ConsumedVideoFrame;
    fn copy_frame(
        &self,
        context: &FrameContext,
        frame: ConsumedVideoFrame,
    ) -> RVec<RVec<u8>>;
}
Expand description

Provides functions for consuming video frames from the GPU.

Required Methods§

Source

fn get_num_bytes(&self) -> RVec<usize>

Can be used to obtain the size of the copied frame.

Source

fn get_num_bytes_rgba(&self) -> usize

Used internally by Phaneron to get the size of the frame on the GPU.

Source

fn get_total_bytes(&self) -> usize

Used internally by Phaneron during the process of colour space conversion.

Source

fn process_frame( &self, context: &ProcessFrameContext, frame: VideoFrame, ) -> ConsumedVideoFrame

Transforms a video frame into the described colour space / format.

Source

fn copy_frame( &self, context: &FrameContext, frame: ConsumedVideoFrame, ) -> RVec<RVec<u8>>

Copies a frame from the GPU.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'lt, _ErasedPtr> FromRGBA for FromRGBA_TO<'lt, _ErasedPtr>
where Self: Send + Sync, _ErasedPtr: AsPtr<PtrTarget = ()>,