mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-31 22:38:47 +00:00
Require Rust 1.39 on the CI and fix the build after gstreamer-rs changes
This commit is contained in:
parent
88cb29b455
commit
b89a0d18dc
5 changed files with 16 additions and 16 deletions
|
@ -55,10 +55,10 @@ stages:
|
|||
- cargo build --color=always --all --examples --all-features
|
||||
- G_DEBUG=fatal_warnings cargo test --color=always --all --examples --all-features
|
||||
|
||||
test 1.36:
|
||||
# 1.36 img
|
||||
test 1.39:
|
||||
# 1.39 img
|
||||
# https://hub.docker.com/_/rust/
|
||||
image: "rust:1.36-slim-buster"
|
||||
image: "rust:1.39-slim-buster"
|
||||
extends: '.cargo test'
|
||||
|
||||
test stable:
|
||||
|
|
|
@ -24,14 +24,14 @@ impl FileLocation {
|
|||
match Url::parse(uri_str) {
|
||||
Ok(url) => {
|
||||
if url.scheme() != "file" {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::UnsupportedProtocol,
|
||||
format!("Unsupported URI {}", uri_str).as_str(),
|
||||
));
|
||||
}
|
||||
|
||||
let path = url.to_file_path().or_else(|_| {
|
||||
Err(gst::Error::new(
|
||||
Err(glib::Error::new(
|
||||
gst::URIError::BadUri,
|
||||
format!("Unsupported URI {}", uri_str).as_str(),
|
||||
))
|
||||
|
@ -39,7 +39,7 @@ impl FileLocation {
|
|||
|
||||
FileLocation::try_from(path)
|
||||
}
|
||||
Err(err) => Err(gst::Error::new(
|
||||
Err(err) => Err(glib::Error::new(
|
||||
gst::URIError::BadUri,
|
||||
format!("Couldn't parse URI {}: {}", uri_str, err.to_string()).as_str(),
|
||||
)),
|
||||
|
@ -48,14 +48,14 @@ impl FileLocation {
|
|||
|
||||
fn try_from(location: PathBuf) -> Result<Self, glib::Error> {
|
||||
let location_str = location.to_str().ok_or_else(|| {
|
||||
gst::Error::new(
|
||||
glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!("Invalid path {:?}", location).as_str(),
|
||||
)
|
||||
})?;
|
||||
|
||||
let file_name = location.file_name().ok_or_else(|| {
|
||||
gst::Error::new(
|
||||
glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!("Expected a path with a filename, got {}", location_str,).as_str(),
|
||||
)
|
||||
|
@ -74,7 +74,7 @@ impl FileLocation {
|
|||
}
|
||||
|
||||
let parent_canonical = parent_dir.canonicalize().map_err(|err| {
|
||||
gst::Error::new(
|
||||
glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!(
|
||||
"Could not resolve path {}: {}",
|
||||
|
@ -105,7 +105,7 @@ impl FileLocation {
|
|||
let location_canonical = parent_canonical.join(file_name);
|
||||
Url::from_file_path(&location_canonical)
|
||||
.map_err(|_| {
|
||||
gst::Error::new(
|
||||
glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!("Could not resolve path to URL {}", location_str).as_str(),
|
||||
)
|
||||
|
|
|
@ -82,7 +82,7 @@ impl FileSink {
|
|||
) -> Result<(), glib::Error> {
|
||||
let state = self.state.lock().unwrap();
|
||||
if let State::Started { .. } = *state {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::BadState,
|
||||
"Changing the `location` property on a started `filesink` is not supported",
|
||||
));
|
||||
|
|
|
@ -82,7 +82,7 @@ impl FileSrc {
|
|||
) -> Result<(), glib::Error> {
|
||||
let state = self.state.lock().unwrap();
|
||||
if let State::Started { .. } = *state {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::BadState,
|
||||
"Changing the `location` property on a started `filesrc` is not supported",
|
||||
));
|
||||
|
@ -92,14 +92,14 @@ impl FileSrc {
|
|||
settings.location = match location {
|
||||
Some(location) => {
|
||||
if !location.exists() {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!("{} doesn't exist", location).as_str(),
|
||||
));
|
||||
}
|
||||
|
||||
if !location.is_file() {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::BadReference,
|
||||
format!("{} is not a file", location).as_str(),
|
||||
));
|
||||
|
|
|
@ -85,7 +85,7 @@ impl S3Src {
|
|||
let state = self.state.lock().unwrap();
|
||||
|
||||
if let StreamingState::Started { .. } = *state {
|
||||
return Err(gst::Error::new(
|
||||
return Err(glib::Error::new(
|
||||
gst::URIError::BadState,
|
||||
"Cannot set URI on a started s3src",
|
||||
));
|
||||
|
@ -104,7 +104,7 @@ impl S3Src {
|
|||
*url = Some(s3url);
|
||||
Ok(())
|
||||
}
|
||||
Err(_) => Err(gst::Error::new(
|
||||
Err(_) => Err(glib::Error::new(
|
||||
gst::URIError::BadUri,
|
||||
"Could not parse URI",
|
||||
)),
|
||||
|
|
Loading…
Reference in a new issue