Function libaom_sys::aom_codec_encode
source · pub unsafe extern "C" fn aom_codec_encode(
ctx: *mut aom_codec_ctx_t,
img: *const aom_image_t,
pts: aom_codec_pts_t,
duration: c_ulong,
flags: aom_enc_frame_flags_t
) -> aom_codec_err_t
Expand description
Encode a frame
Encodes a video frame at the given “presentation time.” The presentation time stamp (PTS) \ref MUST be strictly increasing.
When the last frame has been passed to the encoder, this function should continue to be called in a loop, with the img parameter set to NULL. This will signal the end-of-stream condition to the encoder and allow it to encode any held buffers. Encoding is complete when aom_codec_encode() is called with img set to NULL and aom_codec_get_cx_data() returns no data.
\param[in] ctx Pointer to this instance’s context
\param[in] img Image data to encode, NULL to flush.
Encoding sample values outside the range
[0..(1<
\retval #AOM_CODEC_OK The configuration was populated. \retval #AOM_CODEC_INCAPABLE Interface is not an encoder interface. \retval #AOM_CODEC_INVALID_PARAM A parameter was NULL, the image format is unsupported, etc.