mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-19 07:35:46 +00:00
Require Sync and Send traits to be implemented for Sources
This commit is contained in:
parent
846f4775d9
commit
79aed66914
3 changed files with 7 additions and 1 deletions
|
@ -16,6 +16,9 @@ pub struct FileSrc {
|
||||||
position: u64,
|
position: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Sync for FileSrc {}
|
||||||
|
unsafe impl Send for FileSrc {}
|
||||||
|
|
||||||
impl FileSrc {
|
impl FileSrc {
|
||||||
fn new() -> FileSrc {
|
fn new() -> FileSrc {
|
||||||
FileSrc { location: None, file: None, position: 0 }
|
FileSrc { location: None, file: None, position: 0 }
|
||||||
|
|
|
@ -22,6 +22,9 @@ pub struct HttpSrc {
|
||||||
stop: u64,
|
stop: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsafe impl Sync for HttpSrc {}
|
||||||
|
unsafe impl Send for HttpSrc {}
|
||||||
|
|
||||||
impl HttpSrc {
|
impl HttpSrc {
|
||||||
fn new() -> HttpSrc {
|
fn new() -> HttpSrc {
|
||||||
HttpSrc { url: None, client: Client::new(), response: None, seekable: false, position: 0, size: u64::MAX, start: 0, stop: u64::MAX }
|
HttpSrc { url: None, client: Client::new(), response: None, seekable: false, position: 0, size: u64::MAX, start: 0, stop: u64::MAX }
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::ptr;
|
||||||
|
|
||||||
use utils::*;
|
use utils::*;
|
||||||
|
|
||||||
pub trait Source {
|
pub trait Source: 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 is_seekable(&self) -> bool;
|
fn is_seekable(&self) -> bool;
|
||||||
|
|
Loading…
Reference in a new issue