
This change makes asynchronous queueing non-experimental, it enables the feature by default on devices with API level >= 31 (Android 12+) and exposes APIs for apps to either fully opt-in or opt-out from the feature. The choice to use or not asynchronous queueing is moved out of MediaCodecRenderer to a new MediaCodecAdapter factory, the DefaultMediaCodecAdapterFactory. This is because, at the moment, if an app passes a custom adapter factory to a MediaCodecRenderer and then enables asynchronous queueing on it, the custom adapter factory is not used but this is not visible to the user. The default behavior of DefaultMediaCodecAdapterFactory is to create asynchronous MediaCodec adapters for devices with API level >= 31 (Android 12+), and synchronous MediaCodec adapters on devices with older API versions. DefaultMediaCodecAdapterFactory exposes methods to force enable or force disable the use of asynchronous adapters so that applications can enable asynchronous queueing on devices with API versions before 31 (but not before 23), or fully disable the feature. For applications that build MediaCodecRenderers directly, they will need to create a DefaultMediaCodecAdapterFactory and pass it to the renderer constructor. For applications that rely on the DefaultRenderersFactory, additional methods have been added on the DefaultRenderersFactory to control enabling/disabling asynchronous queueing. Issue: #6348 PiperOrigin-RevId: 400733506
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.