From 28265f1151908d5f1716001fc3e3b96e50b747aa Mon Sep 17 00:00:00 2001 From: rubenrua Date: Tue, 25 Jun 2019 18:20:50 +0200 Subject: [PATCH] Update to the new version of the GStreamer Rust bindings, 0.14.0 https://gstreamer.freedesktop.org/news/#2019-06-24T20:00:00Z --- .travis.yml | 2 +- Cargo.toml | 10 +++++----- src/lib.rs | 2 +- src/ndiaudiosrc.rs | 11 ++++++++--- src/ndivideosrc.rs | 11 ++++++++--- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f892217..691885e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,5 +26,5 @@ install: - rustup component add clippy-preview script: - cargo fmt -- --check - - touch ./src/*.rs && cargo clippy -- -A cast_ptr_alignment -A new_ret_no_self + - touch ./src/*.rs && cargo clippy -- -A clippy::cast_ptr_alignment -A clippy::new_ret_no_self - cargo build \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 3262fa13..aa2239cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,11 +6,11 @@ repository = "https://github.com/teltek/gst-plugin-ndi" license = "LGPL" [dependencies] -glib = { version = "0.7.1", features = ["subclassing"] } -gstreamer = { version = "0.13.0", features = ["subclassing"] } -gstreamer-base = { version = "0.13.0", features = ["subclassing"] } -gstreamer-audio = "0.13.0" -gstreamer-video = "0.13.0" +glib = { version = "0.8.0", features = ["subclassing"] } +gstreamer = { version = "0.14.0", features = ["subclassing"] } +gstreamer-base = { version = "0.14.0", features = ["subclassing"] } +gstreamer-audio = "0.14.0" +gstreamer-video = "0.14.0" lazy_static = "1.1.0" byte-slice-cast = "0.2.0" diff --git a/src/lib.rs b/src/lib.rs index 272d2fb1..7037fe2d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -254,7 +254,7 @@ fn stop_ndi(cat: gst::DebugCategory, element: &gst_base::BaseSrc, id: i8) -> boo } gst_plugin_define!( - "ndi", + ndi, "NewTek NDI Plugin", plugin_init, "1.0.0", diff --git a/src/ndiaudiosrc.rs b/src/ndiaudiosrc.rs index 1a3342a3..d52348c5 100644 --- a/src/ndiaudiosrc.rs +++ b/src/ndiaudiosrc.rs @@ -111,7 +111,7 @@ impl ObjectSubclass for NdiAudioSrc { cat: gst::DebugCategory::new( "ndiaudiosrc", gst::DebugColorFlags::empty(), - "NewTek NDI Audio Source", + Some("NewTek NDI Audio Source"), ), settings: Mutex::new(Default::default()), state: Mutex::new(Default::default()), @@ -297,7 +297,7 @@ impl BaseSrcImpl for NdiAudioSrc { fn set_caps( &self, element: &gst_base::BaseSrc, - caps: &gst::CapsRef, + caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { let info = match gst_audio::AudioInfo::from_caps(caps) { None => { @@ -544,5 +544,10 @@ impl BaseSrcImpl for NdiAudioSrc { } pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { - gst::Element::register(Some(plugin), "ndiaudiosrc", 0, NdiAudioSrc::get_type()) + gst::Element::register( + Some(plugin), + "ndiaudiosrc", + gst::Rank::None, + NdiAudioSrc::get_type(), + ) } diff --git a/src/ndivideosrc.rs b/src/ndivideosrc.rs index 378fab5b..0b31b2f2 100644 --- a/src/ndivideosrc.rs +++ b/src/ndivideosrc.rs @@ -112,7 +112,7 @@ impl ObjectSubclass for NdiVideoSrc { cat: gst::DebugCategory::new( "ndivideosrc", gst::DebugColorFlags::empty(), - "NewTek NDI Video Source", + Some("NewTek NDI Video Source"), ), settings: Mutex::new(Default::default()), state: Mutex::new(Default::default()), @@ -305,7 +305,7 @@ impl BaseSrcImpl for NdiVideoSrc { fn set_caps( &self, element: &gst_base::BaseSrc, - caps: &gst::CapsRef, + caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { let info = match gst_video::VideoInfo::from_caps(caps) { None => { @@ -533,5 +533,10 @@ impl BaseSrcImpl for NdiVideoSrc { } pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { - gst::Element::register(Some(plugin), "ndivideosrc", 0, NdiVideoSrc::get_type()) + gst::Element::register( + Some(plugin), + "ndivideosrc", + gst::Rank::None, + NdiVideoSrc::get_type(), + ) }