/// Provides an output buffer that will be filled with decoded frames.
///
/// Users calls this function after `set_output_buffer_count`. Then, libvda
/// will fill next frames in the buffer and noitify `Event::PictureReady`.
///
/// This function is also used to notify that they consumed decoded frames
/// in the output buffer.
///
/// This function takes ownership of `output_buffer`.
Provides an output buffer that will be filled with decoded frames.
Users calls this function after `set_output_buffer_count`. Then, libvda
will fill next frames in the buffer and noitify `Event::PictureReady`.

This function is also used to notify that they consumed decoded frames
in the output buffer.

This function takes ownership of `output_buffer`.
Provides an output buffer that will be filled with decoded frames . Users calls this function after ` set_output_buffer_count ` . Then libvda will fill next frames in the buffer and noitify ` Event :: PictureReady ` . This function is also used to notify that they consumed decoded frames in the output buffer . This function takes ownership of ` output_buffer ` .
pub fn use_output_buffer(
        &self,
        picture_buffer_id: i32,
        format: PixelFormat,
        output_buffer: BufferFd,
        planes: &[FramePlane],
    ) -> Result<()> {
        let mut planes: Vec<_> = planes.iter().map(FramePlane::to_raw_frame_plane).collect();
        // Safe because `raw_ptr` is valid and a libvda's API is called properly.
        let r = unsafe {
            bindings::vda_use_output_buffer(
                (*self.raw_ptr).ctx,
                picture_buffer_id,
                format.to_raw_pixel_format(),
                output_buffer,
                planes.len(),
                planes.as_mut_ptr(),
            )
        };
        Response::new(r).into()
    }
pub fn use_output_buffer ( & self , picture_buffer_id : i32 , format : PixelFormat , output_buffer : BufferFd , planes : & [ FramePlane ] , ) -> Result < ( ) > { let mut planes : Vec < _ > = planes . iter ( ) . map ( FramePlane :: to_raw_frame_plane ) . collect ( ) ; // Safe because `raw_ptr` is valid and a libvda's API is called properly. let r = unsafe { bindings :: vda_use_output_buffer ( ( * self . raw_ptr ) . ctx , picture_buffer_id , format . to_raw_pixel_format ( ) , output_buffer , planes . len ( ) , planes . as_mut_ptr ( ) , ) } ; Response :: new ( r ) . into ( ) }
Provides an output buffer that will be filled with decoded frames.
Provides an output buffer that will be filled with decoded frames .
&self
picture_buffer_id
i32
format
PixelFormat
output_buffer
BufferFd
planes
&[FramePlane]