mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-06-02 13:29:50 +00:00
Implement and require Sync+Send for sinks
This commit is contained in:
parent
29965fa8a7
commit
2cbe76c64f
|
@ -14,6 +14,9 @@ pub struct FileSink {
|
||||||
position: u64,
|
position: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Sync for FileSink {}
|
||||||
|
unsafe impl Send for FileSink {}
|
||||||
|
|
||||||
impl FileSink {
|
impl FileSink {
|
||||||
fn new() -> FileSink {
|
fn new() -> FileSink {
|
||||||
FileSink { location: None, file: None, position: 0 }
|
FileSink { location: None, file: None, position: 0 }
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::ptr;
|
||||||
|
|
||||||
use utils::*;
|
use utils::*;
|
||||||
|
|
||||||
pub trait Sink {
|
pub trait Sink: Sync + Send {
|
||||||
fn set_uri(&mut self, uri_str: &Option<String>) -> bool;
|
fn set_uri(&mut self, uri_str: &Option<String>) -> bool;
|
||||||
fn get_uri(&self) -> Option<String>;
|
fn get_uri(&self) -> Option<String>;
|
||||||
fn start(&mut self) -> bool;
|
fn start(&mut self) -> bool;
|
||||||
|
|
Loading…
Reference in a new issue