1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
use crate::{ffi, ElementMonitor, Monitor, Reporter, Runner};
use glib::{prelude::*, translate::*};
glib::wrapper! {
/// GStreamer Validate PadMonitor class.
///
/// Class that wraps a [`gst::Pad`][crate::gst::Pad] for Validate checks
///
/// # Implements
///
/// [`MonitorExt`][trait@crate::prelude::MonitorExt], [`trait@gst::prelude::ObjectExt`], [`trait@glib::ObjectExt`], [`ReporterExt`][trait@crate::prelude::ReporterExt]
#[doc(alias = "GstValidatePadMonitor")]
pub struct PadMonitor(Object<ffi::GstValidatePadMonitor, ffi::GstValidatePadMonitorClass>) @extends Monitor, gst::Object, @implements Reporter;
match fn {
type_ => || ffi::gst_validate_pad_monitor_get_type(),
}
}
impl PadMonitor {
pub const NONE: Option<&'static PadMonitor> = None;
/// ## `pad`
/// a [`gst::Pad`][crate::gst::Pad] to run Validate on
/// ## `runner`
/// a [`Runner`][crate::Runner]
/// ## `parent`
/// The parent of the new monitor
///
/// # Returns
///
/// A [`PadMonitor`][crate::PadMonitor]
#[doc(alias = "gst_validate_pad_monitor_new")]
pub fn new(
pad: &impl IsA<gst::Pad>,
runner: &impl IsA<Runner>,
parent: Option<&impl IsA<ElementMonitor>>,
) -> PadMonitor {
skip_assert_initialized!();
unsafe {
from_glib_full(ffi::gst_validate_pad_monitor_new(
pad.as_ref().to_glib_none().0,
runner.as_ref().to_glib_none().0,
parent.map(|p| p.as_ref()).to_glib_none().0,
))
}
}
}
unsafe impl Send for PadMonitor {}
unsafe impl Sync for PadMonitor {}