Google is committed to advancing racial equity for Black communities. See how.

Low Latency Decoding in MediaCodec

This feature was added in Android 11 to enable media decoding with low latency, which is critical for real-time apps. The SoC partners need to provide a decoder driver to support this feature. The media framework signals this mode using Codec 2.0/OMX configuration parameters available in AOSP. See the reference implementation for enabling this feature.

Implementation

The SoC partners need to implement decoder drivers to support this feature. App developers can use the new API to use the feature. Partners need to provide decoder drivers. This is a new public API that hasn't been used. There's no need to implement a system UI or an extension for this feature.

Customization

The API allows users to turn this feature on or off. If turned on, the decoder must return decoded frames as soon as possible based on the coding standard (without waiting for further input) and must stay awake. If turned off, the decoder can use power optimizations that may result in decoded frames being returned later than strictly necessary, and the decoder may power down when stalled.