video: Allow converting a VideoFrame into an FFI GstVideoFrame

This commit is contained in:
Sebastian Dröge 2022-03-22 16:14:26 +02:00
parent 917c50c36b
commit 3c6a9cede5

View file

@ -201,6 +201,12 @@ impl<T> VideoFrame<T> {
pub fn as_ptr(&self) -> *const ffi::GstVideoFrame { pub fn as_ptr(&self) -> *const ffi::GstVideoFrame {
&self.frame &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> { impl<T> Drop for VideoFrame<T> {