Commit ccca8248 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Add getter for the current pad mode

parent 9e90a126
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment