diff --git a/src/rsfilesink.rs b/src/rsfilesink.rs index 161c74cf..5d55f647 100644 --- a/src/rsfilesink.rs +++ b/src/rsfilesink.rs @@ -53,7 +53,7 @@ impl FileSink { } impl Sink for FileSink { - fn set_uri(&mut self, uri: Option) -> bool { + fn set_uri(&self, uri: Option) -> bool { match uri { None => { let mut location = self.location.lock().unwrap(); @@ -86,7 +86,7 @@ impl Sink for FileSink { .and_then(|i| i) // join() } - fn start(&mut self) -> bool { + fn start(&self) -> bool { self.file = None; self.position = 0; @@ -110,14 +110,14 @@ impl Sink for FileSink { } } - fn stop(&mut self) -> bool { + fn stop(&self) -> bool { self.file = None; self.position = 0; true } - fn render(&mut self, data: &[u8]) -> GstFlowReturn { + fn render(&self, data: &[u8]) -> GstFlowReturn { match self.file { None => return GstFlowReturn::Error, Some(ref mut f) => { diff --git a/src/rssink.rs b/src/rssink.rs index 3cb401a9..7826c247 100644 --- a/src/rssink.rs +++ b/src/rssink.rs @@ -40,13 +40,13 @@ impl SinkController { pub trait Sink: Sync + Send { // Called from any thread at any time - fn set_uri(&mut self, uri: Option) -> bool; + fn set_uri(&self, uri: Option) -> bool; fn get_uri(&self) -> Option; // Called from the streaming thread only - fn start(&mut self) -> bool; - fn stop(&mut self) -> bool; - fn render(&mut self, data: &[u8]) -> GstFlowReturn; + fn start(&self) -> bool; + fn stop(&self) -> bool; + fn render(&self, data: &[u8]) -> GstFlowReturn; } #[no_mangle]