diff --git a/gstreamer/src/pad.rs b/gstreamer/src/pad.rs index c1ea57cf0..5c314d3d9 100644 --- a/gstreamer/src/pad.rs +++ b/gstreamer/src/pad.rs @@ -224,6 +224,8 @@ pub trait PadExtManual { fn query_position(&self) -> Option; fn query_position_generic(&self, format: Format) -> Option; + + fn get_mode(&self) -> ::PadMode; } impl> PadExtManual for O { @@ -858,6 +860,14 @@ impl> PadExtManual for O { } } } + + fn get_mode(&self) -> ::PadMode { + unsafe { + let stash = self.to_glib_none(); + let ptr: &ffi::GstPad = &*stash.0; + from_glib(ptr.mode) + } + } } unsafe extern "C" fn trampoline_pad_probe(