media_player: fix whitespace
parent
23a16997af
commit
56fc69eb3e
|
@ -98,7 +98,7 @@ impl MediaPlayer {
|
|||
let flag_resume = resume.is_some();
|
||||
let flag_flush = flush.is_some();
|
||||
let flag_drain = drain.is_some();
|
||||
|
||||
|
||||
let data = AudioCallbacksData {
|
||||
play: Box::new(play), pause: pause, resume: resume,
|
||||
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) {
|
||||
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> {
|
||||
let nso = unsafe{ sys::libvlc_media_player_get_nsobject(self.ptr) };
|
||||
if nso.is_null() { None }else{ Some(nso) }
|
||||
|
@ -133,7 +133,7 @@ impl MediaPlayer {
|
|||
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> {
|
||||
let id = unsafe{ sys::libvlc_media_player_get_xwindow(self.ptr) };
|
||||
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) {
|
||||
let data: &AudioCallbacksData = transmute(data as *mut AudioCallbacksData);
|
||||
(data.play)(samples, count, pts);
|
||||
|
||||
|
||||
}
|
||||
|
||||
unsafe extern "C" fn audio_cb_pause(data: *mut c_void, pts: i64) {
|
||||
|
|
Loading…
Reference in New Issue