pub struct MpvPlayer {
mpv: Arc<Mpv>,
shared: Arc<Mutex<Shared>>,
volume: f32,
muted: bool,
rate: f64,
audio_track: Option<i32>,
subtitle_track: Option<i32>,
}Fields§
§mpv: Arc<Mpv>§volume: f32§muted: bool§rate: f64§audio_track: Option<i32>§subtitle_track: Option<i32>Implementations§
Source§impl MpvPlayer
impl MpvPlayer
pub fn new(output: Output) -> Result<Self, PlayerError>
fn spawn_events(&self)
Trait Implementations§
Source§impl MediaPlayer for MpvPlayer
impl MediaPlayer for MpvPlayer
Source§fn open(&mut self, req: OpenRequest) -> Result<(), PlayerError>
fn open(&mut self, req: OpenRequest) -> Result<(), PlayerError>
fn play(&mut self) -> Result<(), PlayerError>
fn pause(&mut self) -> Result<(), PlayerError>
Source§fn seek(&mut self, to: Duration) -> Result<(), PlayerError>
fn seek(&mut self, to: Duration) -> Result<(), PlayerError>
Seek to an absolute position on the item’s own timeline. Read more
fn set_volume(&mut self, volume: f32) -> Result<(), PlayerError>
fn set_muted(&mut self, muted: bool) -> Result<(), PlayerError>
fn set_rate(&mut self, rate: f64) -> Result<(), PlayerError>
fn select_audio_track(&mut self, index: Option<i32>) -> Result<(), PlayerError>
fn select_subtitle_track( &mut self, index: Option<i32>, ) -> Result<(), PlayerError>
Source§fn snapshot(&self) -> PlaybackSnapshot
fn snapshot(&self) -> PlaybackSnapshot
One coherent read of the engine’s state.
fn capabilities(&self) -> Capabilities
Source§fn set_audio_settings(
&mut self,
_settings: &AudioSettings,
) -> Result<(), PlayerError>
fn set_audio_settings( &mut self, _settings: &AudioSettings, ) -> Result<(), PlayerError>
Apply EQ, normalisation and gapless settings. Read more
fn audio_settings(&self) -> AudioSettings
Auto Trait Implementations§
impl Freeze for MpvPlayer
impl RefUnwindSafe for MpvPlayer
impl Send for MpvPlayer
impl Sync for MpvPlayer
impl Unpin for MpvPlayer
impl UnsafeUnpin for MpvPlayer
impl UnwindSafe for MpvPlayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more