Update to the new version of the GStreamer Rust bindings, 0.14.0

https://gstreamer.freedesktop.org/news/#2019-06-24T20:00:00Z
This commit is contained in:
rubenrua 2019-06-25 18:20:50 +02:00
parent 2802a6fc97
commit 28265f1151
5 changed files with 23 additions and 13 deletions

View file

@ -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

View file

@ -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"

View file

@ -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",

View file

@ -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(),
)
}

View file

@ -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(),
)
}