gstreamer_validate/auto/
element_monitor.rs1use crate::{ffi, Monitor, Reporter, Runner};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[doc(alias = "GstValidateElementMonitor")]
11 pub struct ElementMonitor(Object<ffi::GstValidateElementMonitor, ffi::GstValidateElementMonitorClass>) @extends Monitor, gst::Object, @implements Reporter;
12
13 match fn {
14 type_ => || ffi::gst_validate_element_monitor_get_type(),
15 }
16}
17
18impl ElementMonitor {
19 pub const NONE: Option<&'static ElementMonitor> = None;
20
21 #[doc(alias = "gst_validate_element_monitor_new")]
22 pub fn new(
23 element: &impl IsA<gst::Element>,
24 runner: &impl IsA<Runner>,
25 parent: Option<&impl IsA<Monitor>>,
26 ) -> ElementMonitor {
27 skip_assert_initialized!();
28 unsafe {
29 from_glib_full(ffi::gst_validate_element_monitor_new(
30 element.as_ref().to_glib_none().0,
31 runner.as_ref().to_glib_none().0,
32 parent.map(|p| p.as_ref()).to_glib_none().0,
33 ))
34 }
35 }
36}
37
38unsafe impl Send for ElementMonitor {}
39unsafe impl Sync for ElementMonitor {}