From 99616ec0b4b5382ff09351ad00bdd20fd569dec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Mon, 12 Apr 2021 12:01:22 +0200 Subject: [PATCH] post fix-getters manual updates --- examples/src/bin/appsrc.rs | 2 +- examples/src/bin/glupload.rs | 6 +++--- gstreamer-pbutils/src/encoding_profile.rs | 2 +- gstreamer-rtp/src/rtp_buffer.rs | 4 ++-- gstreamer/src/element.rs | 4 ++-- gstreamer/src/error.rs | 2 +- gstreamer/src/ghost_pad.rs | 2 +- gstreamer/src/pad.rs | 2 +- gstreamer/src/promise.rs | 4 ++-- tutorials/src/bin/basic-tutorial-8.rs | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/src/bin/appsrc.rs b/examples/src/bin/appsrc.rs index cfcf86767..1f36f694a 100644 --- a/examples/src/bin/appsrc.rs +++ b/examples/src/bin/appsrc.rs @@ -60,7 +60,7 @@ fn create_pipeline() -> Result { .expect("Failed to create video info"); appsrc.set_caps(Some(&video_info.to_caps().unwrap())); - appsrc.set_property_format(gst::Format::Time); + appsrc.set_format(gst::Format::Time); // Our frame counter, that is stored in the mutable environment // of the closure of the need-data callback diff --git a/examples/src/bin/glupload.rs b/examples/src/bin/glupload.rs index 911ccbe45..f91b1a0d2 100644 --- a/examples/src/bin/glupload.rs +++ b/examples/src/bin/glupload.rs @@ -356,7 +356,7 @@ impl App { use glutin::platform::unix::WindowExtUnix; use glutin::platform::ContextTraitExt; - let api = App::map_gl_api(windowed_context.api()); + let api = App::map_gl_api(windowed_context.get_api()); let (gl_context, gl_display, platform) = match unsafe { windowed_context.raw_handle() } { @@ -365,7 +365,7 @@ impl App { let mut gl_display = None; #[cfg(feature = "gst-gl-egl")] - if let Some(display) = unsafe { windowed_context.egl_display() } { + if let Some(display) = unsafe { windowed_context.get_egl_display() } { gl_display = Some( unsafe { gst_gl_egl::GLDisplayEGL::with_egl_display(display as usize) } .unwrap() @@ -610,7 +610,7 @@ fn main_loop(app: App) -> Result<(), Error> { println!( "Pixel format of the window's GL context {:?}", - app.windowed_context.pixel_format() + app.windowed_context.get_pixel_format() ); let gl = load(&app.windowed_context); diff --git a/gstreamer-pbutils/src/encoding_profile.rs b/gstreamer-pbutils/src/encoding_profile.rs index 05c47fb13..cf654cd9e 100644 --- a/gstreamer-pbutils/src/encoding_profile.rs +++ b/gstreamer-pbutils/src/encoding_profile.rs @@ -585,7 +585,7 @@ mod tests { let video_profile: EncodingVideoProfile = glib::object::Cast::downcast(video_profile).ok().unwrap(); - assert_eq!(video_profile.variableframerate(), VARIABLE_FRAMERATE); + assert_eq!(video_profile.is_variableframerate(), VARIABLE_FRAMERATE); assert_eq!(video_profile.pass(), PASS); let restriction = gst::Caps::new_simple("video/x-raw", &[("format", &"NV12")]); diff --git a/gstreamer-rtp/src/rtp_buffer.rs b/gstreamer-rtp/src/rtp_buffer.rs index eccd43e5b..306d5fb11 100644 --- a/gstreamer-rtp/src/rtp_buffer.rs +++ b/gstreamer-rtp/src/rtp_buffer.rs @@ -369,7 +369,7 @@ mod tests { assert_eq!(rtp_buffer.seq(), 42); rtp_buffer.set_marker(true); - assert!(rtp_buffer.marker()); + assert!(rtp_buffer.is_marker()); rtp_buffer.set_payload_type(43); assert_eq!(rtp_buffer.payload_type(), 43); @@ -394,7 +394,7 @@ mod tests { assert!(rtp_buffer.get_csrc(2).is_none()); rtp_buffer.set_extension(true); - assert_eq!(rtp_buffer.extension(), true); + assert_eq!(rtp_buffer.is_extension(), true); assert_eq!(rtp_buffer.extension_bytes(), None); } diff --git a/gstreamer/src/element.rs b/gstreamer/src/element.rs index 38cdb43b3..fa15084eb 100644 --- a/gstreamer/src/element.rs +++ b/gstreamer/src/element.rs @@ -136,11 +136,11 @@ pub trait ElementExtManual: 'static { fn set_state(&self, state: State) -> Result; fn current_state(&self) -> State { - self.state(ClockTime::from(0)).1 + self.get_state(ClockTime::from(0)).1 } fn pending_state(&self) -> State { - self.state(ClockTime::from(0)).2 + self.get_state(ClockTime::from(0)).2 } fn query(&self, query: &mut QueryRef) -> bool; diff --git a/gstreamer/src/error.rs b/gstreamer/src/error.rs index 7677a411f..d8dad754c 100644 --- a/gstreamer/src/error.rs +++ b/gstreamer/src/error.rs @@ -108,7 +108,7 @@ macro_rules! result_from_gboolean( ); #[derive(Debug, Clone, Error)] -#[error("Error {:?}: {:?} at {}:{}", .category.get_name(), .bool_error.message, .bool_error.filename, .bool_error.line)] +#[error("Error {:?}: {:?} at {}:{}", .category.name(), .bool_error.message, .bool_error.filename, .bool_error.line)] pub struct LoggableError { category: crate::DebugCategory, bool_error: glib::BoolError, diff --git a/gstreamer/src/ghost_pad.rs b/gstreamer/src/ghost_pad.rs index 11d1ef7f2..5a32421b8 100644 --- a/gstreamer/src/ghost_pad.rs +++ b/gstreamer/src/ghost_pad.rs @@ -111,7 +111,7 @@ impl GhostPad { ) -> Result { skip_assert_initialized!(); - if target.direction() != templ.property_direction() { + if target.direction() != templ.direction() { return Err(glib::bool_error!( "Template and target have different directions" )); diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index f84da6204..a64b9a587 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -1682,7 +1682,7 @@ impl + IsA + glib::object::IsClass> PadBuilder { type_, &[ ("name", &name), - ("direction", &templ.property_direction()), + ("direction", &templ.direction()), ("template", templ), ], ) diff --git a/gstreamer/src/promise.rs b/gstreamer/src/promise.rs index 1cf2a13e5..5b345c798 100644 --- a/gstreamer/src/promise.rs +++ b/gstreamer/src/promise.rs @@ -53,7 +53,7 @@ impl Promise { let promise: Borrowed = from_glib_borrow(promise); let res = match promise.wait() { - PromiseResult::Replied => Ok(promise.reply()), + PromiseResult::Replied => Ok(promise.get_reply()), PromiseResult::Interrupted => Err(PromiseError::Interrupted), PromiseResult::Expired => Err(PromiseError::Expired), PromiseResult::Pending => { @@ -103,7 +103,7 @@ impl Promise { } } - pub fn reply(&self) -> Option<&StructureRef> { + pub fn get_reply(&self) -> Option<&StructureRef> { unsafe { let s = ffi::gst_promise_get_reply(self.to_glib_none().0); if s.is_null() { diff --git a/tutorials/src/bin/basic-tutorial-8.rs b/tutorials/src/bin/basic-tutorial-8.rs index f1003317b..246e227fa 100644 --- a/tutorials/src/bin/basic-tutorial-8.rs +++ b/tutorials/src/bin/basic-tutorial-8.rs @@ -127,7 +127,7 @@ fn main() { .dynamic_cast::() .expect("Source element is expected to be an appsrc!"); appsrc.set_caps(Some(&audio_caps)); - appsrc.set_property_format(gst::Format::Time); + appsrc.set_format(gst::Format::Time); let appsink = appsink .dynamic_cast::()