Fix build with --all-features and run it on travis

This commit is contained in:
Sebastian Dröge 2017-08-15 13:46:16 +03:00
parent 8a40fed0a4
commit b0307f9108
4 changed files with 8 additions and 7 deletions

View file

@ -22,7 +22,8 @@ script:
- rustc --version
- cargo build --all
- cargo test --all
- cd examples && cargo build --features=gst-player
- cargo build --all --all-features
- cargo test --all --all-features
before_install:
- curl -L https://people.freedesktop.org/~slomo/gstreamer.tar.gz | tar xz

View file

@ -26,8 +26,8 @@ version = "0.1"
optional = true
[features]
v1_10 = ["gstreamer-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"]
embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"]
default-features = []

View file

@ -25,8 +25,8 @@ version = "0.1"
optional = true
[features]
v1_10 = ["gstreamer-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-video-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-video-sys/v1_12", "v1_10"]
embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"]
default-features = []

View file

@ -664,7 +664,7 @@ impl ::VideoFieldOrder {
unsafe { from_glib_full(ffi::gst_video_field_order_to_string(self.to_glib())) }
}
pub fn from_string(s: &str) -> Option<Self> {
pub fn from_string(s: &str) -> Self {
unsafe { from_glib(ffi::gst_video_field_order_from_string(s.to_glib_none().0)) }
}
}
@ -674,7 +674,7 @@ impl str::FromStr for ::VideoFieldOrder {
type Err = ();
fn from_str(s: &str) -> Result<Self, ()> {
Self::from_string(s).ok_or(())
Ok(Self::from_string(s))
}
}