pub unsafe extern "C" fn aom_codec_enc_init_ver(
    ctx: *mut aom_codec_ctx_t,
    iface: *const aom_codec_iface,
    cfg: *const aom_codec_enc_cfg_t,
    flags: aom_codec_flags_t,
    ver: c_int
) -> aom_codec_err_t
Expand description

Initialize an encoder instance

Initializes an encoder context using the given interface. Applications should call the aom_codec_enc_init convenience macro instead of this function directly, to ensure that the ABI version number parameter is properly initialized.

If the library was configured with -DCONFIG_MULTITHREAD=0, this call is not thread safe and should be guarded with a lock if being used in a multithreaded context.

If aom_codec_enc_init_ver() fails, it is not necessary to call aom_codec_destroy() on the encoder context.

\param[in] ctx Pointer to this instance’s context. \param[in] iface Pointer to the algorithm interface to use. \param[in] cfg Configuration to use, if known. \param[in] flags Bitfield of AOM_CODEC_USE_* flags \param[in] ver ABI version number. Must be set to AOM_ENCODER_ABI_VERSION \retval #AOM_CODEC_OK The encoder algorithm has been initialized. \retval #AOM_CODEC_MEM_ERROR Memory allocation failed.