to top

SoC Vendor Dependencies for Media Resource Manager

In this document

This document is intended to help system on chip vendors (SoCs) properly implement support for priority, operating rate and the hooks needed for Android media resource manager.

1. OMX_ErrorInsufficientResources

The codec component should return OMX_ErrorInsufficientResources on GetHandle, Init, UseBuffer, AllocateBuffer or a state transition if the failure is due to insufficient resource. The error code will be used by the media resource manager as the indicator to potentially preempt media resource from other lower priority process.

An Android Compatibility Test Suite (CTS) test exists to allocate, configure and start each codec repeatedly until catching OMX_ErrorInsufficientResources (pass) or any other error (fail).

2. OMX_IndexConfigPriority

This configuration lets the application describe desired codec priority.

The associated value is an integer. Higher value means lower priority. Currently, only two levels are supported:

  • 0: realtime priority - meaning that the codec shall support the given performance configuration (e.g. framerate) at realtime. This will only be used by media playback, capture, and possibly by realtime communication scenarios if best effort performance is not suitable.
  • 1: non-realtime priority (best effort). This is the default value.

Vendor is suggested to use this as a hint used at codec configuration and resource planning - to understand the realtime requirements of the application.

Don’t assume realtime priority unless it is configured to 0.

3. OMX_IndexConfigOperatingRate

This configuration lets the application describe operating frame rate for video or sample rate for audio at which the codec will need to operate.

This is used for cases like high-speed/slow-motion video capture, where the video encoder format contains the target playback rate (e.g. 30fps), but the component must be able to handle the high operating capture rate (e.g. 240fps).

This rate should be used for resource planning and setting the operating points.