mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-26 03:21:03 +00:00
Add getter for the current pad mode
This commit is contained in:
parent
9e90a1264f
commit
ccca8248c3
1 changed files with 10 additions and 0 deletions
|
@ -224,6 +224,8 @@ pub trait PadExtManual {
|
|||
|
||||
fn query_position<T: SpecificFormattedValue>(&self) -> Option<T>;
|
||||
fn query_position_generic(&self, format: Format) -> Option<GenericFormattedValue>;
|
||||
|
||||
fn get_mode(&self) -> ::PadMode;
|
||||
}
|
||||
|
||||
impl<O: IsA<Pad>> PadExtManual for O {
|
||||
|
@ -858,6 +860,14 @@ impl<O: IsA<Pad>> 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(
|
||||
|
|
Loading…
Reference in a new issue