forked from mirrors/gstreamer-rs
video: Allow converting a VideoFrame
into an FFI GstVideoFrame
This commit is contained in:
parent
917c50c36b
commit
3c6a9cede5
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 {
|
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> {
|
||||||
|
|
Loading…
Reference in a new issue