android.media

Interfaces

OnAudioFocusChangeListener

Interface definition for a callback to be invoked when the audio focus of the system is updated.

OnCommunicationDeviceChangedListener

Listener registered by client to be notified upon communication audio device change.

OnModeChangedListener

Interface definition of a callback that is notified when the audio mode changes

OnPreferredMixerAttributesChangedListener

Interface to be notified of changes in the preferred mixer attributes.

Key

Key interface for the AudioMetadata map.

AudioMetadataMap

AudioMetadataMap is a writeable Map-style interface of AudioMetadata.Key value pairs.

AudioMetadataReadMap

A read only Map-style interface of AudioMetadata.Key value pairs used for AudioMetadata.

OnRecordPositionUpdateListener

Interface definition for a callback to be invoked when an AudioRecord has reached a notification marker set by AudioRecord#setNotificationMarkerPosition(int) or for periodic updates on the progress of the record head, as set by AudioRecord#setPositionNotificationPeriod(int).

OnRoutingChangedListener

Defines the interface by which applications can receive notifications of routing changes for the associated AudioRecord.

AudioRecordingMonitor

AudioRecordingMonitor defines an interface implemented by AudioRecord and MediaRecorder allowing applications to install a callback and be notified of changes in the capture path while recoding is active.

AudioRouting

AudioRouting defines an interface for controlling routing and routing notifications in AudioTrack and AudioRecord objects.

OnCodecFormatChangedListener

Interface definition for a listener for codec format changes.

OnPlaybackPositionUpdateListener

Interface definition for a callback to be invoked when the playback head position of an AudioTrack has reached a notification marker or has increased by a certain period.

OnRoutingChangedListener

Defines the interface by which applications can receive notifications of routing changes for the associated AudioTrack.

OnImageAvailableListener

Callback interface for being notified that a new image is available.

OnImageReleasedListener

ImageWriter callback interface, used to to asynchronously notify the application of various ImageWriter events.

OnJetEventListener

Handles the notification when the JET engine generates an event.

EventListener

An interface registered by the caller to setEventListener to receives scheme-specific notifications from a MediaCas instance.

OnFirstTunnelFrameReadyListener

Listener to be called when the first output frame has been decoded and is ready to be rendered for a codec configured for tunnel mode with KEY_AUDIO_SESSION_ID.

OnFrameRenderedListener

Listener to be called when an output frame has rendered on the output surface

OnEventListener

Interface definition for a callback to be invoked when a drm event occurs

OnExpirationUpdateListener

Interface definition for a callback to be invoked when a drm session expiration update occurs

OnKeyStatusChangeListener

Interface definition for a callback to be invoked when the keys in a drm session change states.

OnSessionLostStateListener

Interface definition for a callback to be invoked when the session state has been lost and is now invalid

MediaDrmThrowable

A @Throwable thrown from MediaDrm or @MediaCrypto APIs

InputReader

Provides input data to MediaParser.

OutputConsumer

Receives extracted media sample data and metadata from MediaParser.

SeekableInputReader

InputReader that allows setting the read position.

OnBufferingUpdateListener

Interface definition of a callback to be invoked indicating buffering status of a media resource being streamed over the network.

OnCompletionListener

Interface definition for a callback to be invoked when playback of a media source has completed.

OnDrmConfigHelper

Interface definition of a callback to be invoked when the app can do DRM configuration (get/set properties) before the session is opened.

OnDrmInfoListener

Interface definition of a callback to be invoked when the DRM info becomes available

OnDrmPreparedListener

Interface definition of a callback to notify the app when the DRM is ready for key request/response

OnErrorListener

Interface definition of a callback to be invoked when there has been an error during an asynchronous operation (other errors will throw exceptions at method call time).

OnInfoListener

Interface definition of a callback to be invoked to communicate some info and/or warning about the media or its playback.

OnMediaTimeDiscontinuityListener

Interface definition of a callback to be invoked when discontinuity in the normal progression of the media time is detected.

OnPreparedListener

Interface definition for a callback to be invoked when the media source is ready for playback.

OnSeekCompleteListener

Interface definition of a callback to be invoked indicating the completion of a seek operation.

OnSubtitleDataListener

Interface definition of a callback to be invoked when a player subtitle track has new subtitle data available.

OnTimedMetaDataAvailableListener

Interface definition of a callback to be invoked when a track has timed metadata available.

OnTimedTextListener

Interface definition of a callback to be invoked when a timed text is available for display.

OnVideoSizeChangedListener

Interface definition of a callback to be invoked when the video size is first known or updated

OnErrorListener

Interface definition for a callback to be invoked when an error occurs while recording.

OnInfoListener

Interface definition of a callback to be invoked to communicate some info and/or warning about the recording.

OnGetControllerHintsListener

A listener interface to send optional app-specific hints when creating a RoutingController.

MediaScannerConnectionClient

An interface for notifying clients of MediaScannerConnection when a connection to the MediaScanner service has been established and when the scanning of a file has completed.

OnScanCompletedListener

Interface for notifying clients of the result of scanning a requested media file.

OnErrorListener

Interface definition of a callback to be invoked when there has been an error during an asynchronous operation (other errors will throw exceptions at method call time).

MicrophoneDirection

Interface defining mechanism for controlling the directionality and field width of audio capture.

OnGetPlaybackPositionListener

Interface definition for a callback to be invoked when the media playback position is queried.

OnMetadataUpdateListener

Interface definition for a callback to be invoked when one of the metadata values has been updated.

OnPlaybackPositionUpdateListener

Interface definition for a callback to be invoked when the media playback position is requested to be updated.

OnClientUpdateListener

Interface definition for the callbacks to be invoked whenever media events, metadata and playback status are available.

OnLoadCompleteListener

OnHeadTrackerAvailableListener

Interface to be notified of changes to the availability of a head tracker on the audio device to be used by the spatializer effect.

OnSpatializerStateChangedListener

An interface to be notified of changes to the state of the spatializer effect.

VolumeAutomation

VolumeAutomation defines an interface for automatic volume control of AudioTrack and MediaPlayer objects.

Classes

ApplicationMediaCapabilities

ApplicationMediaCapabilities is an immutable class that encapsulates an application's capabilities for handling newer video codec format and media features.

AsyncPlayer

Plays a series of audio URIs, but does all the hard work on another thread so that any slowness with preparing or loading doesn't block the calling thread.

AudioAttributes

A class to encapsulate a collection of attributes describing information about an audio stream.

AudioDescriptor

The AudioDescriptor contains the information to describe the audio playback/capture capabilities.

AudioDeviceCallback

AudioDeviceCallback defines the mechanism by which applications can receive notifications of audio device connection and disconnection events.

AudioDeviceInfo

Provides information about an audio device.

AudioFocusRequest

A class to encapsulate information about an audio focus request.

AudioFormat

The AudioFormat class is used to access a number of audio format and channel configuration constants.

AudioManager

AudioManager provides access to volume and ringer mode control.

AudioMetadata

AudioMetadata class is used to manage typed key-value pairs for configuration and capability requests within the Audio Framework.

AudioMixerAttributes

Class to represent the attributes of the audio mixer: its format, which represents by an AudioFormat object and mixer behavior.

AudioPlaybackCaptureConfiguration

Configuration for capturing audio played by other apps.

AudioPlaybackConfiguration

The AudioPlaybackConfiguration class collects the information describing an audio playback session.

AudioPresentation

The AudioPresentation class encapsulates the information that describes an audio presentation which is available in next generation audio content.

AudioProfile

An AudioProfile is specific to an audio format and lists supported sampling rates and channel masks for that format.

AudioRecord

The AudioRecord class manages the audio resources for Java applications to record audio from the audio input hardware of the platform.

AudioRecordingConfiguration

The AudioRecordingConfiguration class collects the information describing an audio recording session.

AudioTimestamp

Structure that groups a position in frame units relative to an assumed audio stream, together with the estimated time when that frame enters or leaves the audio processing pipeline on that device.

AudioTrack

The AudioTrack class manages and plays a single audio resource for Java applications.

CamcorderProfile

Retrieves the predefined camcorder profile settings for camcorder applications.

CameraProfile

The CameraProfile class is used to retrieve the pre-defined still image capture (jpeg) quality levels (0-100) used for low, medium, and high quality settings in the Camera application.

DrmInitData

Encapsulates initialization data required by a MediaDrm instance.

EncoderProfiles

Describes a set of encoding profiles for a given media (audio and/or video) profile.

ExifInterface

This is a class for reading and writing Exif tags in various image file formats.

FaceDetector

Identifies the faces of people in a android.graphics.Bitmap graphic object.

Image

A single complete image buffer to use with a media source such as a MediaCodec or a CameraDevice.

ImageReader

The ImageReader class allows direct application access to image data rendered into a android.view.Surface

ImageWriter

The ImageWriter class allows an application to produce Image data into a android.view.Surface, and have it be consumed by another component like CameraDevice.

JetPlayer

JetPlayer provides access to JET content playback and control.

MediaActionSound

A class for producing sounds that match those produced by various actions taken by the media and camera APIs.

MediaCas

MediaCas can be used to obtain keys for descrambling protected media streams, in conjunction with android.media.MediaDescrambler.

MediaCodec

MediaCodec class can be used to access low-level media codecs, i.

MediaCodecInfo

Provides information about a given media codec available on the device.

MediaCodecList

Allows you to enumerate available codecs, each specified as a MediaCodecInfo object, find a codec supporting a given format and query the capabilities of a given codec.

MediaCommunicationManager

Provides support for interacting with MediaSession2s that applications have published to express their ongoing media playback state.

MediaController2

This API is not generally intended for third party application developers.

MediaCrypto

MediaCrypto class can be used in conjunction with android.media.MediaCodec to decode encrypted media data.

MediaDataSource

For supplying media data to the framework.

MediaDescrambler

MediaDescrambler class can be used in conjunction with android.media.MediaCodec and android.media.MediaExtractor to decode media data scrambled by conditional access (CA) systems such as those in the ISO/IEC13818-1.

MediaDescription

A simple set of metadata for a media item suitable for display.

MediaDrm

MediaDrm can be used to obtain keys for decrypting protected media streams, in conjunction with android.media.MediaCrypto.

MediaExtractor

MediaExtractor facilitates extraction of demuxed, typically encoded, media data from a data source.

MediaFeature

MediaFeature defines various media features, e.

MediaFormat

Encapsulates the information describing the format of media data, be it audio or video, as well as optional feature metadata.

MediaMetadata

Contains metadata about an item, such as the title, artist, etc.

MediaMetadataEditor

An abstract class for editing and storing metadata that can be published by RemoteControlClient.

MediaMetadataRetriever

MediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file.

MediaMuxer

MediaMuxer facilitates muxing elementary streams.

MediaParser

Parses media container formats and extracts contained media samples and metadata.

MediaPlayer

MediaPlayer class can be used to control playback of audio/video files and streams.

MediaRecorder

Used to record audio and video.

MediaRoute2Info

Describes the properties of a route.

MediaRoute2ProviderService

Base class for media route provider services.

MediaRouter

This API is not recommended for new applications.

MediaRouter2

This API is not generally intended for third party application developers.

MediaScannerConnection

MediaScannerConnection provides a way for applications to pass a newly created or downloaded media file to the media scanner service.

MediaSession2

This API is not generally intended for third party application developers.

MediaSession2Service

This API is not generally intended for third party application developers.

MediaSync

MediaSync class can be used to synchronously play audio and video streams.

MediaSyncEvent

The MediaSyncEvent class defines events that can be used to synchronize playback or capture actions between different players and recorders.

MediaTimestamp

An immutable object that represents the linear correlation between the media time and the system time.

MicrophoneInfo

Class providing information on a microphone.

PlaybackParams

Structure for common playback params.

Rating

A class to encapsulate rating information used as content metadata.

RemoteControlClient

RemoteControlClient enables exposing information meant to be consumed by remote controls capable of displaying metadata, artwork and media transport control buttons.

RemoteController

The RemoteController class is used to control media playback, display and update media metadata and playback status, published by applications using the RemoteControlClient class.

Ringtone

Ringtone provides a quick method for playing a ringtone, notification, or other similar types of sounds.

RingtoneManager

RingtoneManager provides access to ringtones, notification, and other types of sounds.

RouteDiscoveryPreference

A media route discovery preference describing the features of routes that media router would like to discover and whether to perform active scanning.

RouteListingPreference

Allows applications to customize the list of routes used for media routing (for example, in the System UI Output Switcher).

RoutingSessionInfo

Describes a routing session which is created when a media route is selected.

Session2Command

This API is not generally intended for third party application developers.

Session2CommandGroup

This API is not generally intended for third party application developers.

Session2Token

This API is not generally intended for third party application developers.

SoundPool

The SoundPool class manages and plays audio resources for applications.

Spatializer

Spatializer provides access to querying capabilities and behavior of sound spatialization on the device.

SubtitleData

Class encapsulating subtitle data, as received through the MediaPlayer.OnSubtitleDataListener interface.

SyncParams

Structure for common A/V sync params.

ThumbnailUtils

Utilities for generating visual thumbnails from files.

TimedMetaData

Class that embodies one timed metadata access unit, including

  • a time stamp, and
  • raw uninterpreted byte-array extracted directly from the container.

TimedText

Class to hold the timed text's metadata, including:

  • The characters for rendering
  • The rendering position for the timed text

ToneGenerator

This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.001, CEPT) and proprietary tones (3GPP TS 31.111).

VolumeProvider

Handles requests to adjust or set the volume on a session.

VolumeShaper

The VolumeShaper class is used to automatically control audio volume during media playback, allowing simple implementation of transition effects and ducking.

Exceptions

DeniedByServerException

Exception thrown when the provisioning server or key server denies a certficate or license for a device.

MediaCasException

Base class for MediaCas exceptions

MediaCasStateException

Base class for MediaCas runtime exceptions

MediaCryptoException

Exception thrown if MediaCrypto object could not be instantiated or if unable to perform an operation on the MediaCrypto object.

MediaDrmException

Base class for MediaDrm exceptions

MediaDrmResetException

This exception is thrown when the MediaDrm instance has become unusable due to a restart of the mediaserver process.

NotProvisionedException

Exception thrown when an operation on a MediaDrm object is attempted and the device does not have a certificate.

ResourceBusyException

Exception thrown when an operation on a MediaDrm object is attempted and hardware resources are not available, due to being in use.

UnsupportedSchemeException

Exception thrown when an attempt is made to construct a MediaDrm object using a crypto scheme UUID that is not supported by the device