[][src]Function libaom_sys::aom_codec_encode

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

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. \param[in] pts Presentation time stamp, in timebase units. If img is NULL, pts is ignored. \param[in] duration Duration to show frame, in timebase units. If img is not NULL, duration must be nonzero. If img is NULL, duration is ignored. \param[in] flags Flags to use for encoding this frame.

\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.