mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 02:51:10 +00:00
video: Allow converting a VideoFrame
into an FFI GstVideoFrame
This commit is contained in:
parent
2943c310cd
commit
215cdfd548
1 changed files with 6 additions and 0 deletions
|
@ -201,6 +201,12 @@ impl<T> VideoFrame<T> {
|
|||
pub fn as_ptr(&self) -> *const ffi::GstVideoFrame {
|
||||
&self.frame
|
||||
}
|
||||
|
||||
pub fn into_raw(self) -> ffi::GstVideoFrame {
|
||||
let mut s = mem::ManuallyDrop::new(self);
|
||||
s.buffer = None;
|
||||
s.frame
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Drop for VideoFrame<T> {
|
||||
|
|
Loading…
Reference in a new issue