AOMedia Codec SDK: Frame-Based Decoding Functions

AOMedia Codec SDK

Typedefs | Functions
Frame-Based Decoding Functions
Common Algorithm Interface » Decoder Algorithm Interface

The following functions are required to be implemented for all decoders that advertise the AOM_CODEC_CAP_PUT_FRAME capability. Calling these functions for codecs that don't advertise this capability will result in an error code being returned, usually AOM_CODEC_ERROR. More...

## Typedefs
typedef void(* | aom_codec_put_frame_cb_fn_t) (void *user_priv, const aom_image_t *img)
| put frame callback prototype More...

## Functions
aom_codec_err_t | aom_codec_register_put_frame_cb (aom_codec_ctx_t *ctx, aom_codec_put_frame_cb_fn_t cb, void *user_priv)
| Register for notification of frame completion. More...

## Detailed Description

The following functions are required to be implemented for all decoders that advertise the AOM_CODEC_CAP_PUT_FRAME capability. Calling these functions for codecs that don't advertise this capability will result in an error code being returned, usually AOM_CODEC_ERROR.

## Typedef Documentation

## ◆ aom_codec_put_frame_cb_fn_t

typedef void(* aom_codec_put_frame_cb_fn_t) (void *user_priv, const aom_image_t *img)

put frame callback prototype

This callback is invoked by the decoder to notify the application of the availability of decoded image data.

## Function Documentation

## ◆ aom_codec_register_put_frame_cb()

aom_codec_err_t aom_codec_register_put_frame_cb | ( | aom_codec_ctx_t * | ctx,
|  | aom_codec_put_frame_cb_fn_t | cb,
|  | void * | user_priv
| ) |  |

Register for notification of frame completion.

Registers a given function to be called when a decoded frame is available.

Parameters

  [in] | ctx | Pointer to this instance's context
  [in] | cb | Pointer to the callback function
  [in] | user_priv | User's private data

Return values

  AOM_CODEC_OK | Callback successfully registered.
  AOM_CODEC_ERROR | Decoder context not initialized, or algorithm not capable of posting slice completion.