pub unsafe extern "C" fn aom_codec_get_global_headers(
    ctx: *mut aom_codec_ctx_t
) -> *mut aom_fixed_buf_t
Expand description

Get global stream headers

Retrieves a stream level global header packet, if supported by the codec. Calls to this function should be deferred until all configuration information has been passed to libaom. Otherwise the global header data may be invalidated by additional configuration changes.

The AV1 implementation of this function returns an OBU. The OBU returned is in Low Overhead Bitstream Format. Specifically, the obu_has_size_field bit is set, and the buffer contains the obu_size field for the returned OBU.

\param[in] ctx Pointer to this instance’s context

\retval NULL Encoder does not support global header, or an error occurred while generating the global header.

\retval Non-NULL Pointer to buffer containing global header packet. The caller owns the memory associated with this buffer, and must free the ‘buf’ member of the aom_fixed_buf_t as well as the aom_fixed_buf_t pointer. Memory returned must be freed via call to free().