gstreamer: add PadProbeId::as_raw()

This allows to convert PadProbeId to numberic values without
taking them by value (like `into_glib`).

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/382#note_1391236
This commit is contained in:
Stephan Seitz 2022-05-21 14:26:03 +02:00 committed by Sebastian Dröge
parent cb1f08a425
commit c254c5fd1a

View file

@ -47,6 +47,12 @@ impl FromGlib<libc::c_ulong> for PadProbeId {
}
}
impl PadProbeId {
pub fn as_raw(&self) -> libc::c_ulong {
self.0.get() as libc::c_ulong
}
}
#[doc(alias = "GstPadProbeInfo")]
#[derive(Debug)]
pub struct PadProbeInfo<'a> {