mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
validate: reporter: Add a report_action() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1227>
This commit is contained in:
parent
b34718697c
commit
9647ce8895
2 changed files with 19 additions and 0 deletions
|
@ -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 {
|
||||
|
|
16
gstreamer-validate/src/reporter.rs
Normal file
16
gstreamer-validate/src/reporter.rs
Normal file
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue