diff --git a/gstreamer-validate/src/lib.rs b/gstreamer-validate/src/lib.rs index 3934a6bf3..d8f48a20d 100644 --- a/gstreamer-validate/src/lib.rs +++ b/gstreamer-validate/src/lib.rs @@ -50,6 +50,9 @@ pub use enums::*; mod action; pub use action::{Action, ActionRef}; +mod reporter; +pub use reporter::*; + // Re-export all the traits in a prelude module, so that applications // can always "use gst_validate::prelude::*" without getting conflicts pub mod prelude { diff --git a/gstreamer-validate/src/reporter.rs b/gstreamer-validate/src/reporter.rs new file mode 100644 index 000000000..41eaf4c9d --- /dev/null +++ b/gstreamer-validate/src/reporter.rs @@ -0,0 +1,16 @@ +use glib::translate::*; + +use crate::action::Action; + +impl crate::Reporter { + pub fn report_action(&self, action: &Action, issue_id: crate::IssueId, message: &str) { + unsafe { + ffi::gst_validate_report_action( + self.to_glib_none().0, + action.to_glib_none().0, + issue_id.into_glib(), + message.to_glib_none().0, + ); + } + } +}