Media modules handle media types and codecs, interact with ExoPlayer, expose transport controls and playback information to the framework and perform other media-related functions.
Media components are a frequent target of attacks (many recent security bugs are media related), so tightening security by accelerating updates for security bugs and features should reduce the number of security bugs that can be exploited by attacks. The media framework remains extensible; partners can continue to extend media codecs and media format extractors.
Media modules and components
Updatable media components exist in the following modules.
Media module. Includes the following media components.
Media extractors handle different types of media. Each extractor is an individual
.sofile with a sniffer function to determine whether the extractor can handle a given media file and a factory function that creates an instance of the extractor for that media file.
MediaSession2APIs allow media apps to expose their transport controls and playback information to other processes such as the Android framework and other apps.
MediaParserAPIs (new in Android 11) allow ExoPlayer to make efficient use of framework media container parsers to extract media samples from media containers.
Compatible media transcoding (new in Android 12) enables the platform’s compatible media transcoding feature.
Media Codecs module. Includes updatable software Codec2 components.
For details on these modules and components, see the Media section.
The Media module (
com.android.media) and Media Codec module
com.android.media.swcodec) are in APEX
format and are available for devices running Android
10 or higher.
For details on adding custom extractors and decoders, see Customizing Media Components.