oa::video::VideoFrame

One timestamped video frame with retained storage and readiness semantics. The admitted packed-image path retains the backing Image, which in turn retains its crate::Matrix storage and exact producer readiness. Cloning a frame shares that retained value; it does not copy pixels or manufacture a second completion event.

StRust public API

Declaration

pub struct VideoFrame { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub const fn timing(&self) -> VideoFrameTiming
pub const fn color_info(&self) -> VideoColorInfo
pub const fn as_image(&self) -> Option<&Image>
pub const fn as_texture(&self) -> Option<&Texture>
pub fn as_yuv420p(&self) -> Option<&[u8]>
pub const fn native_format(&self) -> Option<VideoPixelFormat>
pub const fn ready_event(&self) -> Option<&Event>
pub fn mark_consumed(&self, event: &Event) -> Result<()>
pub fn into_image(self) -> Option<Image>
pub fn into_texture(self) -> Option<Texture>
fn clone(&self) -> VideoFrame

Associated Functions

pub fn from_image( image: Image, timing: VideoFrameTiming, color: VideoColorInfo, ) -> Result<Self>
pub fn from_yuv420p( bytes: Vec<u8>, width: usize, height: usize, timing: VideoFrameTiming, color: VideoColorInfo, ) -> Result<Self>

Public Method Documentation

pub fn width( &self ) -> usize
No public source comment is attached to this declaration.
pub fn height( &self ) -> usize
No public source comment is attached to this declaration.
pub const fn timing( &self ) -> VideoFrameTiming
No public source comment is attached to this declaration.
pub const fn color_info( &self ) -> VideoColorInfo
No public source comment is attached to this declaration.
pub const fn as_image( &self ) -> Option<&Image>
No public source comment is attached to this declaration.
pub const fn as_texture( &self ) -> Option<&Texture>
No public source comment is attached to this declaration.
pub fn as_yuv420p( &self ) -> Option<&[u8]>
No public source comment is attached to this declaration.
pub const fn native_format( &self ) -> Option<VideoPixelFormat>
No public source comment is attached to this declaration.
pub const fn ready_event( &self ) -> Option<&Event>
No public source comment is attached to this declaration.
pub fn mark_consumed(&self, event: &Event) -> Result<()>
No public source comment is attached to this declaration.
pub fn into_image( self ) -> Option<Image>
No public source comment is attached to this declaration.
pub fn into_texture( self ) -> Option<Texture>
No public source comment is attached to this declaration.
fn clone( &self ) -> VideoFrame
No public source comment is attached to this declaration.
pub fn from_image( image: Image, timing: VideoFrameTiming, color: VideoColorInfo ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn from_yuv420p( bytes: Vec<u8>, width: usize, height: usize, timing: VideoFrameTiming, color: VideoColorInfo ) -> Result<Self>
No public source comment is attached to this declaration.