diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-12-20 21:43:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-12-20 21:43:45 +0300 |
commit | 3d617371af1d1b779cf10d3fec40b17f29a7baf3 (patch) | |
tree | ff5ae62c07716648d8e62c4db34c6b731fbbd2fe /tutorial/src | |
parent | ea6c05e16ccf0875652e2370eef4839ae819bc34 (diff) |
Update for macro renames
Diffstat (limited to 'tutorial/src')
-rw-r--r-- | tutorial/src/lib.rs | 2 | ||||
-rw-r--r-- | tutorial/src/rgb2gray/imp.rs | 12 | ||||
-rw-r--r-- | tutorial/src/sinesrc/imp.rs | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/tutorial/src/lib.rs b/tutorial/src/lib.rs index 271b2878c..f1ce2dd28 100644 --- a/tutorial/src/lib.rs +++ b/tutorial/src/lib.rs @@ -26,7 +26,7 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { // Plugin name, plugin description, plugin entry point function, version number of this plugin, // license of the plugin, source package name, binary package name, origin where it comes from // and the date/time of release. -gst::gst_plugin_define!( +gst::plugin_define!( rstutorial, env!("CARGO_PKG_DESCRIPTION"), plugin_init, diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs index 03e07b3b6..f330e467b 100644 --- a/tutorial/src/rgb2gray/imp.rs +++ b/tutorial/src/rgb2gray/imp.rs @@ -10,7 +10,7 @@ use glib::subclass; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; -use gst::{gst_debug, gst_element_error, gst_info, gst_loggable_error}; +use gst::{gst_debug, gst_info}; use gst_base::subclass::prelude::*; use std::i32; @@ -382,11 +382,11 @@ impl BaseTransformImpl for Rgb2Gray { outcaps: &gst::Caps, ) -> Result<(), gst::LoggableError> { let in_info = match gst_video::VideoInfo::from_caps(incaps) { - Err(_) => return Err(gst_loggable_error!(CAT, "Failed to parse input caps")), + Err(_) => return Err(gst::loggable_error!(CAT, "Failed to parse input caps")), Ok(info) => info, }; let out_info = match gst_video::VideoInfo::from_caps(outcaps) { - Err(_) => return Err(gst_loggable_error!(CAT, "Failed to parse output caps")), + Err(_) => return Err(gst::loggable_error!(CAT, "Failed to parse output caps")), Ok(info) => info, }; @@ -429,7 +429,7 @@ impl BaseTransformImpl for Rgb2Gray { // Get a locked reference to our state, i.e. the input and output VideoInfo let mut state_guard = self.state.lock().unwrap(); let state = state_guard.as_mut().ok_or_else(|| { - gst_element_error!(element, gst::CoreError::Negotiation, ["Have no state yet"]); + gst::element_error!(element, gst::CoreError::Negotiation, ["Have no state yet"]); gst::FlowError::NotNegotiated })?; @@ -444,7 +444,7 @@ impl BaseTransformImpl for Rgb2Gray { let in_frame = gst_video::VideoFrameRef::from_buffer_ref_readable(inbuf.as_ref(), &state.in_info) .map_err(|_| { - gst_element_error!( + gst::element_error!( element, gst::CoreError::Failed, ["Failed to map input buffer readable"] @@ -456,7 +456,7 @@ impl BaseTransformImpl for Rgb2Gray { let mut out_frame = gst_video::VideoFrameRef::from_buffer_ref_writable(outbuf, &state.out_info).map_err( |_| { - gst_element_error!( + gst::element_error!( element, gst::CoreError::Failed, ["Failed to map output buffer writable"] diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs index fcfcb4b97..951dc4b4e 100644 --- a/tutorial/src/sinesrc/imp.rs +++ b/tutorial/src/sinesrc/imp.rs @@ -10,7 +10,7 @@ use glib::subclass; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; -use gst::{gst_debug, gst_element_error, gst_error, gst_info, gst_log, gst_loggable_error}; +use gst::{gst_debug, gst_error, gst_info, gst_log}; use gst_base::prelude::*; use gst_base::subclass::prelude::*; @@ -431,7 +431,7 @@ impl BaseSrcImpl for SineSrc { use std::f64::consts::PI; let info = gst_audio::AudioInfo::from_caps(caps).map_err(|_| { - gst_loggable_error!(CAT, "Failed to build `AudioInfo` from caps {}", caps) + gst::loggable_error!(CAT, "Failed to build `AudioInfo` from caps {}", caps) })?; gst_debug!(CAT, obj: element, "Configuring for caps {}", caps); @@ -691,7 +691,7 @@ impl PushSrcImpl for SineSrc { let mut state = self.state.lock().unwrap(); let info = match state.info { None => { - gst_element_error!(element, gst::CoreError::Negotiation, ["Have no caps yet"]); + gst::element_error!(element, gst::CoreError::Negotiation, ["Have no caps yet"]); return Err(gst::FlowError::NotNegotiated); } Some(ref info) => info.clone(), |