oa::video::VideoPlayer

Stateful local video player composed from VideoDemuxer and VideoDecoder. open decodes through the first display-order frame, so current_frame is immediately available on success. Timing controls do not create a second decoder or runtime owner; all hardware work remains inside the supplied Engine-owned decoder session.

StRust public API

Declaration

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

Public Methods

pub fn advance(&mut self) -> Result<bool>
pub fn step_backward(&mut self) -> Result<()>
pub fn step_frames(&mut self, delta: i32) -> Result<()>
pub fn tick(&mut self, elapsed: Duration) -> Result<u32>
pub fn seek(&mut self, timestamp: u64) -> Result<()>
pub fn seek_at_or_before(&mut self, timestamp: u64) -> Result<()>
pub fn seek_frame(&mut self, index: u64) -> Result<()>
pub fn reset(&mut self) -> Result<()>
pub fn flush(&mut self) -> Result<usize>
pub fn close(&mut self)
pub fn play(&mut self) -> Result<()>
pub fn pause(&mut self) -> Result<()>
pub fn toggle_play(&mut self) -> Result<()>
pub fn set_looping(&mut self, looping: bool) -> Result<()>
pub fn current_frame(&self) -> Result<&VideoFrame>
pub fn next_presentation_boundary(&self) -> Result<Option<Duration>>
pub fn current_frame_index(&self) -> Result<u64>
pub fn info(&self) -> Option<VideoContainerInfo>
pub fn stats(&self) -> Option<VideoPlayerStats>
pub fn is_playing(&self) -> bool
pub fn is_done(&self) -> bool
pub const fn is_open(&self) -> bool

Associated Functions

pub fn open( engine: &Engine, path: impl AsRef<Path>, config: VideoPlayerConfig, ) -> Result<Self>
pub fn open_native( engine: &Engine, path: impl AsRef<Path>, config: VideoPlayerConfig, ) -> Result<Self>

Public Method Documentation

pub fn advance( &mut self ) -> Result<bool>
No public source comment is attached to this declaration.
pub fn step_backward(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn step_frames(&mut self, delta: i32) -> Result<()>
No public source comment is attached to this declaration.
pub fn tick( &mut self, elapsed: Duration ) -> Result<u32>
No public source comment is attached to this declaration.
pub fn seek(&mut self, timestamp: u64) -> Result<()>
No public source comment is attached to this declaration.
pub fn seek_at_or_before(&mut self, timestamp: u64) -> Result<()>
No public source comment is attached to this declaration.
pub fn seek_frame(&mut self, index: u64) -> Result<()>
No public source comment is attached to this declaration.
pub fn reset(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn flush( &mut self ) -> Result<usize>
No public source comment is attached to this declaration.
pub fn close( &mut self )
No public source comment is attached to this declaration.
pub fn play(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn pause(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn toggle_play(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn set_looping(&mut self, looping: bool) -> Result<()>
No public source comment is attached to this declaration.
pub fn current_frame( &self ) -> Result<&VideoFrame>
No public source comment is attached to this declaration.
pub fn next_presentation_boundary( &self ) -> Result<Option<Duration>>
No public source comment is attached to this declaration.
pub fn current_frame_index( &self ) -> Result<u64>
No public source comment is attached to this declaration.
pub fn info( &self ) -> Option<VideoContainerInfo>
No public source comment is attached to this declaration.
pub fn stats( &self ) -> Option<VideoPlayerStats>
No public source comment is attached to this declaration.
pub fn is_playing( &self ) -> bool
No public source comment is attached to this declaration.
pub fn is_done( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn is_open( &self ) -> bool
No public source comment is attached to this declaration.
pub fn open( engine: &Engine, path: impl AsRef<Path>, config: VideoPlayerConfig ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn open_native( engine: &Engine, path: impl AsRef<Path>, config: VideoPlayerConfig ) -> Result<Self>
No public source comment is attached to this declaration.