Struct rsmpeg::avutil::AVFrameWithImageBuffer [−][src]
pub struct AVFrameWithImageBuffer<'img> { /* fields omitted */ }
Expand description
It’s a AVFrame
binded with AVImage
, the AVFrame copies the buffer
pointer from the AVImage
.
Implementations
impl<'img> AVFrameWithImageBuffer<'img>
[src]
impl<'img> AVFrameWithImageBuffer<'img>
[src]Methods from Deref<Target = AVFrame>
pub fn set_width(&mut self, width: i32)
[src]
pub fn set_height(&mut self, height: i32)
[src]
pub fn set_pts(&mut self, pts: i64)
[src]
pub fn set_pict_type(&mut self, pict_type: AVPictureType)
[src]
pub fn set_nb_samples(&mut self, nb_samples: i32)
[src]
pub fn set_format(&mut self, format: i32)
[src]
pub fn set_channel_layout(&mut self, channel_layout: u64)
[src]
pub fn set_sample_rate(&mut self, sample_rate: i32)
[src]
pub fn is_allocated(&self) -> bool
[src]
pub fn is_allocated(&self) -> bool
[src]Return true if the data and buffer of current frame is allocated.
pub fn alloc_buffer(&mut self) -> Result<()>
[src]
pub fn alloc_buffer(&mut self) -> Result<()>
[src]Allocate new buffer(s) for audio or video data. The following fields must be set on frame before calling this function:
- format (pixel format for video, sample format for audio)
- width and height for video
- nb_samples and channel_layout for audio
Return Error when the some of the frame settings are invalid, allocating buffer for an already initialized frame or allocation fails because of no memory.
pub fn data_mut(&mut self) -> &mut [*mut u8; 8]
[src]
pub fn linesize_mut(&mut self) -> &mut [c_int; 8]
[src]
pub unsafe fn fill_arrays(
&mut self,
src: *const u8,
pix_fmt: AVPixelFormat,
width: i32,
height: i32
) -> Result<()>
[src]
pub unsafe fn fill_arrays(
&mut self,
src: *const u8,
pix_fmt: AVPixelFormat,
width: i32,
height: i32
) -> Result<()>
[src]Setup the data pointers and linesizes based on the specified image parameters and the provided array.
Safety
The buffer src points to cannot outlive the AVFrame. Recommend using fill_image_buffer() instead.
pub fn get_side_data(
&'frame self,
side_data_type: AVFrameSideDataType
) -> Option<AVFrameSideDataRef<'frame>>
[src]
&'frame self,
side_data_type: AVFrameSideDataType
) -> Option<AVFrameSideDataRef<'frame>>
pub fn get_motion_vectors(&'frame self) -> Option<&'frame [AVMotionVector]>
[src]
Trait Implementations
impl<'img> Deref for AVFrameWithImageBuffer<'img>
[src]
impl<'img> Deref for AVFrameWithImageBuffer<'img>
[src]