#[repr(C)]pub struct video_source { /* private fields */ }
Expand description
Video source interface to query video state.
Implementations§
Source§impl video_source
impl video_source
Sourcepub fn get_position(&self) -> Result<f64>
pub fn get_position(&self) -> Result<f64>
Reports the current playback position.
Sourcepub fn set_position(&mut self, seconds: f64) -> Result<()>
pub fn set_position(&mut self, seconds: f64) -> Result<()>
Sets the current playback position.
Sourcepub fn get_duration(&self) -> Result<f64>
pub fn get_duration(&self) -> Result<f64>
Reports the duration of the video in seconds.
If duration is not available, returns 0
.
Sourcepub fn get_volume(&self) -> Result<f64>
pub fn get_volume(&self) -> Result<f64>
Reports the current volume level of an audio track of the movie.
1.0
corresponds to 0db
, 0.0
(mute) to -100db
.
Sourcepub fn set_volume(&mut self, volume: f64) -> Result<()>
pub fn set_volume(&mut self, volume: f64) -> Result<()>
Sets the current volume level between 0.0
(mute) and 1.0
(0db
).
Sourcepub fn get_balance(&self) -> Result<f64>
pub fn get_balance(&self) -> Result<f64>
Reports the current stereo balance.
Sourcepub fn set_balance(&mut self, balance: f64) -> Result<()>
pub fn set_balance(&mut self, balance: f64) -> Result<()>
Sets a new value of the stereo balance.
Auto Trait Implementations§
impl Freeze for video_source
impl RefUnwindSafe for video_source
impl !Send for video_source
impl !Sync for video_source
impl Unpin for video_source
impl UnwindSafe for video_source
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