/// Creates a new `VideoFrame` with an owned (not reference-counted) buffer of the specified
/// dimensions.
Creates a new `VideoFrame` with an owned (not reference-counted) buffer of the specified
dimensions.
Creates a new ` VideoFrame ` with an owned ( not reference - counted ) buffer of the specified dimensions .
pub fn owned(dims: ImageDimensions) -> Result<Self, Error> {
        let mut frame = VideoFrame::empty()?;
        Error::wrap(unsafe { moonfire_ffmpeg_frame_image_alloc(frame.frame.as_mut(), &dims) })?;
        unsafe { moonfire_ffmpeg_frame_stuff(frame.frame.as_ptr(), &mut frame.stuff) };
        Ok(frame)
    }
pub fn owned ( dims : ImageDimensions ) -> Result < Self , Error > { let mut frame = VideoFrame :: empty ( ) ? ; Error :: wrap ( unsafe { moonfire_ffmpeg_frame_image_alloc ( frame . frame . as_mut ( ) , & dims ) } ) ? ; unsafe { moonfire_ffmpeg_frame_stuff ( frame . frame . as_ptr ( ) , & mut frame . stuff ) } ; Ok ( frame ) }
Creates a new `VideoFrame` with an owned (not reference-counted) buffer of the specified
dimensions.
Creates a new ` VideoFrame ` with an owned ( not reference - counted ) buffer of the specified dimensions .
dims
ImageDimensions