media_player: fix whitespace

merge-requests/7/merge
Alexandre Janniaux 2019-11-15 13:25:05 +01:00
parent 23a16997af
commit 56fc69eb3e
1 changed files with 5 additions and 5 deletions

View File

@ -98,7 +98,7 @@ impl MediaPlayer {
let flag_resume = resume.is_some(); let flag_resume = resume.is_some();
let flag_flush = flush.is_some(); let flag_flush = flush.is_some();
let flag_drain = drain.is_some(); let flag_drain = drain.is_some();
let data = AudioCallbacksData { let data = AudioCallbacksData {
play: Box::new(play), pause: pause, resume: resume, play: Box::new(play), pause: pause, resume: resume,
flush: flush, drain: drain, flush: flush, drain: drain,
@ -117,12 +117,12 @@ impl MediaPlayer {
} }
} }
/// Set the NSView handler where the media player should render its video output. /// Set the NSView handler where the media player should render its video output.
pub fn set_nsobject(&self, drawable: *mut c_void) { pub fn set_nsobject(&self, drawable: *mut c_void) {
unsafe{ sys::libvlc_media_player_set_nsobject(self.ptr, drawable) }; unsafe{ sys::libvlc_media_player_set_nsobject(self.ptr, drawable) };
} }
/// Get the NSView handler previously set with set_nsobject(). /// Get the NSView handler previously set with set_nsobject().
pub fn get_nsobject(&self) -> Option<*mut c_void> { pub fn get_nsobject(&self) -> Option<*mut c_void> {
let nso = unsafe{ sys::libvlc_media_player_get_nsobject(self.ptr) }; let nso = unsafe{ sys::libvlc_media_player_get_nsobject(self.ptr) };
if nso.is_null() { None }else{ Some(nso) } if nso.is_null() { None }else{ Some(nso) }
@ -133,7 +133,7 @@ impl MediaPlayer {
unsafe{ sys::libvlc_media_player_set_xwindow(self.ptr, drawable) }; unsafe{ sys::libvlc_media_player_set_xwindow(self.ptr, drawable) };
} }
/// Get the X Window System window identifier previously set with set_xwindow(). /// Get the X Window System window identifier previously set with set_xwindow().
pub fn get_xwindow(&self) -> Option<u32> { pub fn get_xwindow(&self) -> Option<u32> {
let id = unsafe{ sys::libvlc_media_player_get_xwindow(self.ptr) }; let id = unsafe{ sys::libvlc_media_player_get_xwindow(self.ptr) };
if id == 0 { None }else{ Some(id) } if id == 0 { None }else{ Some(id) }
@ -337,7 +337,7 @@ unsafe extern "C" fn audio_cb_play(
data: *mut c_void, samples: *const c_void, count: c_uint, pts: i64) { data: *mut c_void, samples: *const c_void, count: c_uint, pts: i64) {
let data: &AudioCallbacksData = transmute(data as *mut AudioCallbacksData); let data: &AudioCallbacksData = transmute(data as *mut AudioCallbacksData);
(data.play)(samples, count, pts); (data.play)(samples, count, pts);
} }
unsafe extern "C" fn audio_cb_pause(data: *mut c_void, pts: i64) { unsafe extern "C" fn audio_cb_pause(data: *mut c_void, pts: i64) {