Struct vlc::MediaPlayer [−][src]
pub struct MediaPlayer { /* fields omitted */ }
A LibVLC media player plays one media (usually in a custom drawable).
Methods
impl MediaPlayer
[src]
impl MediaPlayer
pub fn new(instance: &Instance) -> Option<MediaPlayer>
[src]
pub fn new(instance: &Instance) -> Option<MediaPlayer>
Create an empty Media Player object
pub fn set_media(&self, md: &Media)
[src]
pub fn set_media(&self, md: &Media)
Set the media that will be used by the media_player. If any, previous md will be released.
pub fn get_media(&self) -> Option<Media>
[src]
pub fn get_media(&self) -> Option<Media>
Get the media used by the media_player.
pub fn event_manager<'a>(&'a self) -> EventManager<'a>
[src]
pub fn event_manager<'a>(&'a self) -> EventManager<'a>
Get the Event Manager from which the media player send event.
pub fn is_playing(&self) -> bool
[src]
pub fn is_playing(&self) -> bool
is_playing
pub fn play(&self) -> Result<(), ()>
[src]
pub fn play(&self) -> Result<(), ()>
Play
pub fn set_pause(&self, do_pause: bool)
[src]
pub fn set_pause(&self, do_pause: bool)
Pause or resume (no effect if there is no media)
pub fn pause(&self)
[src]
pub fn pause(&self)
Toggle pause (no effect if there is no media)
pub fn stop(&self)
[src]
pub fn stop(&self)
Stop (no effect if there is no media)
pub fn set_callbacks<F>(
&self,
play: F,
pause: Option<Box<Fn(i64) + Send + 'static>>,
resume: Option<Box<Fn(i64) + Send + 'static>>,
flush: Option<Box<Fn(i64) + Send + 'static>>,
drain: Option<Box<Fn() + Send + 'static>>
) where
F: Fn(*const c_void, u32, i64) + Send + 'static,
[src]
pub fn set_callbacks<F>(
&self,
play: F,
pause: Option<Box<Fn(i64) + Send + 'static>>,
resume: Option<Box<Fn(i64) + Send + 'static>>,
flush: Option<Box<Fn(i64) + Send + 'static>>,
drain: Option<Box<Fn() + Send + 'static>>
) where
F: Fn(*const c_void, u32, i64) + Send + 'static,
pub fn set_nsobject(&self, drawable: *mut c_void)
[src]
pub fn set_nsobject(&self, drawable: *mut c_void)
Set the NSView handler where the media player should render its video output.
pub fn get_nsobject(&self) -> Option<*mut c_void>
[src]
pub fn get_nsobject(&self) -> Option<*mut c_void>
Get the NSView handler previously set with set_nsobject().
pub fn set_xwindow(&self, drawable: u32)
[src]
pub fn set_xwindow(&self, drawable: u32)
Set an X Window System drawable where the media player should render its video output.
pub fn get_xwindow(&self) -> Option<u32>
[src]
pub fn get_xwindow(&self) -> Option<u32>
Get the X Window System window identifier previously set with set_xwindow().
pub fn set_hwnd(&self, drawable: *mut c_void)
[src]
pub fn set_hwnd(&self, drawable: *mut c_void)
Set a Win32/Win64 API window handle (HWND) where the media player should render its video output. If LibVLC was built without Win32/Win64 API output support, then this has no effects.
pub fn get_hwnd(&self) -> Option<*mut c_void>
[src]
pub fn get_hwnd(&self) -> Option<*mut c_void>
Get the Windows API window handle (HWND) previously set with set_hwnd().
pub fn get_time(&self) -> Option<i64>
[src]
pub fn get_time(&self) -> Option<i64>
Get the current movie time (in ms).
pub fn set_time(&self, time: i64)
[src]
pub fn set_time(&self, time: i64)
Set the movie time (in ms). This has no effect if no media is being played. Not all formats and protocols support this.
pub fn get_position(&self) -> Option<f32>
[src]
pub fn get_position(&self) -> Option<f32>
Get movie position as percentage between 0.0 and 1.0.
pub fn set_position(&self, pos: f32)
[src]
pub fn set_position(&self, pos: f32)
Set movie position as percentage between 0.0 and 1.0. This has no effect if playback is not enabled. This might not work depending on the underlying input format and protocol.
pub fn set_chapter(&self, chapter: i32)
[src]
pub fn set_chapter(&self, chapter: i32)
Set movie chapter (if applicable).
pub fn get_chapter(&self) -> Option<i32>
[src]
pub fn get_chapter(&self) -> Option<i32>
Get movie chapter.
pub fn chapter_count(&self) -> Option<i32>
[src]
pub fn chapter_count(&self) -> Option<i32>
Get movie chapter count.
pub fn will_play(&self) -> bool
[src]
pub fn will_play(&self) -> bool
Is the player able to play.
pub fn chapter_count_for_title(&self, title: i32) -> Option<i32>
[src]
pub fn chapter_count_for_title(&self, title: i32) -> Option<i32>
Get title chapter count.
pub fn set_title(&self, title: i32)
[src]
pub fn set_title(&self, title: i32)
Set movie title.
pub fn get_title(&self) -> Option<i32>
[src]
pub fn get_title(&self) -> Option<i32>
Get movie title.
pub fn title_count(&self) -> Option<i32>
[src]
pub fn title_count(&self) -> Option<i32>
Get movie title count.
pub fn previous_chapter(&self)
[src]
pub fn previous_chapter(&self)
Set previous chapter (if applicable)
pub fn next_chapter(&self)
[src]
pub fn next_chapter(&self)
Set next chapter (if applicable)
pub fn get_rate(&self) -> f32
[src]
pub fn get_rate(&self) -> f32
Get the requested movie play rate.
pub fn set_rate(&self, rate: f32) -> Result<(), ()>
[src]
pub fn set_rate(&self, rate: f32) -> Result<(), ()>
Set movie play rate.
pub fn state(&self) -> State
[src]
pub fn state(&self) -> State
Get current movie state.
pub fn has_vout(&self) -> u32
[src]
pub fn has_vout(&self) -> u32
How many video outputs does this media player have?
pub fn is_seekable(&self) -> bool
[src]
pub fn is_seekable(&self) -> bool
Is this media player seekable?
pub fn can_pause(&self) -> bool
[src]
pub fn can_pause(&self) -> bool
Can this media player be paused?
pub fn program_scrambled(&self) -> bool
[src]
pub fn program_scrambled(&self) -> bool
Check if the current program is scrambled.
pub fn next_frame(&self)
[src]
pub fn next_frame(&self)
Display the next frame (if supported)
Navigate through DVD Menu.
pub fn set_video_title_display(&self, position: Position, timeout: u32)
[src]
pub fn set_video_title_display(&self, position: Position, timeout: u32)
Set if, and how, the video title will be shown when media is played.
pub fn raw(&self) -> *mut libvlc_media_player_t
[src]
pub fn raw(&self) -> *mut libvlc_media_player_t
Returns raw pointer
Trait Implementations
impl Drop for MediaPlayer
[src]
impl Drop for MediaPlayer
impl MediaPlayerVideoEx for MediaPlayer
[src]
impl MediaPlayerVideoEx for MediaPlayer
fn toggle_fullscreen(&self)
[src]
fn toggle_fullscreen(&self)
fn set_fullscreen(&self, fullscreen: bool)
[src]
fn set_fullscreen(&self, fullscreen: bool)
fn get_fullscreen(&self) -> bool
[src]
fn get_fullscreen(&self) -> bool
fn set_key_input(&self, on: bool)
[src]
fn set_key_input(&self, on: bool)
fn set_mouse_input(&self, on: bool)
[src]
fn set_mouse_input(&self, on: bool)
fn get_size(&self, num: u32) -> Option<(u32, u32)>
[src]
fn get_size(&self, num: u32) -> Option<(u32, u32)>
fn get_cursor(&self, num: u32) -> Option<(i32, i32)>
[src]
fn get_cursor(&self, num: u32) -> Option<(i32, i32)>
fn get_scale(&self) -> f32
[src]
fn get_scale(&self) -> f32
fn set_scale(&self, factor: f32)
[src]
fn set_scale(&self, factor: f32)
fn get_video_track(&self) -> Option<i32>
[src]
fn get_video_track(&self) -> Option<i32>
fn set_video_track(&self, track: i32)
[src]
fn set_video_track(&self, track: i32)
fn get_aspect_ratio(&self) -> Option<String>
[src]
fn get_aspect_ratio(&self) -> Option<String>
fn set_aspect_ratio(&self, aspect: Option<&str>)
[src]
fn set_aspect_ratio(&self, aspect: Option<&str>)
fn get_video_track_description(&self) -> Option<Vec<TrackDescription>>
[src]
fn get_video_track_description(&self) -> Option<Vec<TrackDescription>>
fn get_adjust_int(&self, option: VideoAdjustOption) -> i32
[src]
fn get_adjust_int(&self, option: VideoAdjustOption) -> i32
fn set_adjust_int(&self, option: VideoAdjustOption, value: i32)
[src]
fn set_adjust_int(&self, option: VideoAdjustOption, value: i32)
fn get_adjust_float(&self, option: VideoAdjustOption) -> f32
[src]
fn get_adjust_float(&self, option: VideoAdjustOption) -> f32
fn set_adjust_float(&self, option: VideoAdjustOption, value: f32)
[src]
fn set_adjust_float(&self, option: VideoAdjustOption, value: f32)
impl MediaPlayerAudioEx for MediaPlayer
[src]
impl MediaPlayerAudioEx for MediaPlayer
Auto Trait Implementations
impl !Send for MediaPlayer
impl !Send for MediaPlayer
impl !Sync for MediaPlayer
impl !Sync for MediaPlayer