MediaStream

Trait MediaStream 

Source
pub trait MediaStream
where Self: Sized,
{
Show 14 methods // Required methods fn new( tex_manager: Arc<RwLock<TextureManager>>, path: &Path, config: &Config, ) -> Result<Self>; fn cloned( &self, frame: Arc<Mutex<Option<(TextureId, Vec2)>>>, media_mode: StreamMode, volume: f32, ) -> Result<Self>; fn eos(&self) -> bool; fn size(&self) -> [u32; 2]; fn framerate(&self) -> f64; fn channels(&self) -> u16; fn duration(&self) -> Duration; fn start(&mut self) -> Result<()>; fn restart(&mut self) -> Result<()>; fn pause(&mut self) -> Result<()>; fn pull_samples(&self) -> Result<(FrameBuffer, f64)>; fn process_bus(&mut self, looping: bool) -> Result<bool>; // Provided methods fn has_video(&self) -> bool { ... } fn has_audio(&self) -> bool { ... }
}

Required Methods§

Source

fn new( tex_manager: Arc<RwLock<TextureManager>>, path: &Path, config: &Config, ) -> Result<Self>

Source

fn cloned( &self, frame: Arc<Mutex<Option<(TextureId, Vec2)>>>, media_mode: StreamMode, volume: f32, ) -> Result<Self>

Source

fn eos(&self) -> bool

Source

fn size(&self) -> [u32; 2]

Source

fn framerate(&self) -> f64

Source

fn channels(&self) -> u16

Source

fn duration(&self) -> Duration

Source

fn start(&mut self) -> Result<()>

Source

fn restart(&mut self) -> Result<()>

Source

fn pause(&mut self) -> Result<()>

Source

fn pull_samples(&self) -> Result<(FrameBuffer, f64)>

Source

fn process_bus(&mut self, looping: bool) -> Result<bool>

Provided Methods§

Source

fn has_video(&self) -> bool

Source

fn has_audio(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§