pub trait MediaStreamwhere
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§
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§
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.