From a1d51ebb7ae4a0d35c6505c526f9361d92d02a08 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Fri, 15 Nov 2019 13:21:55 +0100 Subject: [PATCH] media: fix whitespace --- src/media.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/media.rs b/src/media.rs index fff8b66..4c4a44f 100644 --- a/src/media.rs +++ b/src/media.rs @@ -13,44 +13,44 @@ pub struct Media { } impl Media { - /// Create a media with a certain given media resource location, for instance a valid URL. + /// Create a media with a certain given media resource location, for instance a valid URL. pub fn new_location(instance: &Instance, mrl: &str) -> Option { let cstr = to_cstr(mrl); - + unsafe{ let p = sys::libvlc_media_new_location(instance.ptr, cstr.as_ptr()); if p.is_null() { return None; } - + Some(Media{ptr: p}) } } - /// Create a media for a certain file path. + /// Create a media for a certain file path. pub fn new_path>(instance: &Instance, path: T) -> Option { let cstr = match path_to_cstr(path.as_ref()) { Ok(s) => s, Err(_) => { return None; }, }; - + unsafe{ let p = sys::libvlc_media_new_path(instance.ptr, cstr.as_ptr()); if p.is_null() { return None; } - + Some(Media{ptr: p}) } } - + pub fn new_fd(instance: &Instance, fd: i32) -> Option { unsafe{ let p = sys::libvlc_media_new_fd(instance.ptr, fd); if p.is_null() { return None; } - + Some(Media{ptr: p}) } } @@ -84,7 +84,7 @@ impl Media { } /// Set the meta of the media. - /// (This function will not save the meta, call save_meta in order to save the meta) + /// (This function will not save the meta, call save_meta in order to save the meta) pub fn set_meta(&self, meta: Meta, value: &str) { unsafe{ sys::libvlc_media_set_meta(self.ptr, meta, to_cstr(value).as_ptr()); @@ -109,7 +109,7 @@ impl Media { if time != -1 { Some(time) }else{ None } } - /// Parse a media. + /// Parse a media. pub fn parse(&self) { unsafe{ sys::libvlc_media_parse(self.ptr) }; } @@ -233,4 +233,4 @@ pub struct VideoTrack { pub struct SubtitleTrack { pub encoding: Option, } - +