Struct sentryshot_scale::Frame
source · pub struct Frame { /* private fields */ }
Expand description
This structure describes decoded (raw) audio or video data.
Implementations§
source§impl Frame
impl Frame
pub fn new() -> Frame
pub fn from_raw( src: &[u8], pix_fmt: PixelFormat, width: NonZeroU16, height: NonZeroU16, align: u8 ) -> Result<Frame, ImageFillArraysError>
pub fn data(&self) -> &[Vec<u8>; 8]
pub fn data_mut(&mut self) -> &mut [Vec<u8>; 8]
pub fn linesize(&self) -> &[usize; 8]
pub fn linesize_mut(&mut self) -> &mut [usize; 8]
pub fn line_and_data_mut(&mut self) -> (&mut [usize; 8], &mut [Vec<u8>; 8])
pub fn width(&self) -> NonZeroU16
pub fn set_width(&mut self, width: NonZeroU16)
pub fn height(&self) -> NonZeroU16
pub fn set_height(&mut self, width: NonZeroU16)
pub fn pts(&self) -> i64
pub fn set_pts(&mut self, pts: i64)
pub fn pix_fmt(&self) -> PixelFormat
pub fn set_pix_fmt(&mut self, pix_fmt: PixelFormat)
pub fn color_range(&self) -> ColorRange
pub fn set_color_range(&mut self, color_range: ColorRange)
sourcepub fn copy_to_buffer(
&self,
dst: &mut Vec<u8>,
align: u8
) -> Result<(), ImageCopyToBufferError>
pub fn copy_to_buffer( &self, dst: &mut Vec<u8>, align: u8 ) -> Result<(), ImageCopyToBufferError>
Copy image data from an image into a buffer. buffer_size()
can be used to compute the required size for the buffer to fill.
pub fn buffer_size(&self, align: u8) -> Result<usize, ImageBufferSizeError>
pub fn reset_buffer( &mut self, width: NonZeroU16, height: NonZeroU16, pix_fmt: PixelFormat, align: u8 ) -> Result<(), ResetBufferError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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