Struct gstreamer_video::video_frame::VideoFrame
source · pub struct VideoFrame<T> {
frame: GstVideoFrame,
buffer: Buffer,
phantom: PhantomData<T>,
}
Fields§
§frame: GstVideoFrame
§buffer: Buffer
§phantom: PhantomData<T>
Implementations§
source§impl<T> VideoFrame<T>
impl<T> VideoFrame<T>
pub fn into_buffer(self) -> Buffer
pub fn copy(&self, dest: &mut VideoFrame<Writable>) -> Result<(), BoolError>
pub fn copy_plane( &self, dest: &mut VideoFrame<Writable>, plane: u32, ) -> Result<(), BoolError>
pub fn comp_data(&self, component: u32) -> Result<&[u8], BoolError>
pub fn buffer(&self) -> &BufferRef
pub fn plane_data(&self, plane: u32) -> Result<&[u8], BoolError>
pub fn planes_data(&self) -> [&[u8]; 4]
pub unsafe fn from_glib_full(frame: GstVideoFrame) -> Self
pub fn as_video_frame_ref(&self) -> VideoFrameRef<&BufferRef>
pub fn into_raw(self) -> GstVideoFrame
source§impl VideoFrame<Readable>
impl VideoFrame<Readable>
source§impl VideoFrame<Writable>
impl VideoFrame<Writable>
pub fn from_buffer_writable( buffer: Buffer, info: &VideoInfo, ) -> Result<Self, Buffer>
pub fn from_buffer_id_writable( buffer: Buffer, id: i32, info: &VideoInfo, ) -> Result<Self, Buffer>
pub fn comp_data_mut(&mut self, component: u32) -> Result<&mut [u8], BoolError>
pub fn plane_data_mut(&mut self, plane: u32) -> Result<&mut [u8], BoolError>
pub fn planes_data_mut(&mut self) -> [&mut [u8]; 4]
pub fn as_mut_video_frame_ref(&mut self) -> VideoFrameRef<&mut BufferRef>
pub fn as_mut_ptr(&mut self) -> *mut GstVideoFrame
Trait Implementations§
source§impl<T> Debug for VideoFrame<T>
impl<T> Debug for VideoFrame<T>
source§impl<T> Drop for VideoFrame<T>
impl<T> Drop for VideoFrame<T>
source§impl<T> IsVideoFrame for VideoFrame<T>
impl<T> IsVideoFrame for VideoFrame<T>
fn as_raw(&self) -> &GstVideoFrame
impl<T> Send for VideoFrame<T>
impl<T> Sync for VideoFrame<T>
Auto Trait Implementations§
impl<T> Freeze for VideoFrame<T>
impl<T> RefUnwindSafe for VideoFrame<T>where
T: RefUnwindSafe,
impl<T> Unpin for VideoFrame<T>where
T: Unpin,
impl<T> UnwindSafe for VideoFrame<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more