diff --git a/gstreamer-validate/src/action.rs b/gstreamer-validate/src/action.rs index 35b0b3d98..fa3e52cad 100644 --- a/gstreamer-validate/src/action.rs +++ b/gstreamer-validate/src/action.rs @@ -72,10 +72,20 @@ impl Action { } } + pub fn report_error(&self, error_message: &str) { + if let Some(scenario) = self.scenario() { + scenario.upcast_ref::().report_action( + self, + glib::Quark::from_str("scenario::execution-error"), + error_message, + ) + } + } + #[doc(alias = "gst_validate_execute_action")] pub fn execute(self) -> Result { unsafe { - let action: *mut ffi::GstValidateAction = self.to_glib_full(); + let action: *mut ffi::GstValidateAction = self.into_glib_ptr(); let action_type = ffi::gst_validate_get_action_type((*action).type_); let res = ffi::gst_validate_execute_action(action_type, action); diff --git a/gstreamer-validate/src/action_type.rs b/gstreamer-validate/src/action_type.rs index 38121c68e..0fd84fc2a 100644 --- a/gstreamer-validate/src/action_type.rs +++ b/gstreamer-validate/src/action_type.rs @@ -339,7 +339,6 @@ impl<'a> ActionTypeBuilder<'a> { glib::Quark::from_str("scenario::execution-error"), err, ); - return ffi::GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED; }