mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
video: Allow getting an owned reference to the input buffer from a video codec frame
This commit is contained in:
parent
74557132e1
commit
4956346b23
1 changed files with 12 additions and 0 deletions
|
@ -140,6 +140,18 @@ impl<'a> VideoCodecFrame<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[doc(alias = "get_input_buffer")]
|
||||||
|
pub fn input_buffer_owned(&self) -> Option<gst::Buffer> {
|
||||||
|
unsafe {
|
||||||
|
let ptr = (*self.to_glib_none().0).input_buffer;
|
||||||
|
if ptr.is_null() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(from_glib_none(ptr))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[doc(alias = "get_output_buffer")]
|
#[doc(alias = "get_output_buffer")]
|
||||||
pub fn output_buffer(&self) -> Option<&gst::BufferRef> {
|
pub fn output_buffer(&self) -> Option<&gst::BufferRef> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue