# androidx.media3.common.util

*** ** * ** ***

## Annotations

|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/EGLSurfaceTexture.SecureMode` | Secure mode to be used by the EGL surface and context. |
| `https://developer.android.com/reference/androidx/media3/common/util/ExperimentalApi` | Signifies that a public API (class, method or field) is still under development. |
| `https://developer.android.com/reference/androidx/media3/common/util/Log.LogLevel` | Log level for ExoPlayer logcat logging. |
| `https://developer.android.com/reference/androidx/media3/common/util/NotificationUtil.Importance` | Notification channel importance levels. |
| `https://developer.android.com/reference/androidx/media3/common/util/NullableType` | Annotation for specifying a nullable type. |
| `https://developer.android.com/reference/androidx/media3/common/util/RepeatModeUtil.RepeatToggleModes` | Set of repeat toggle modes. |
| `https://developer.android.com/reference/androidx/media3/common/util/StuckPlayerException.StuckType` | The type of stuck playback. |
| `https://developer.android.com/reference/androidx/media3/common/util/UnknownNull` | Annotation for specifying unknown nullness. |
| `https://developer.android.com/reference/androidx/media3/common/util/UnstableApi` | Signifies that a public API (class, method or field) is subject to incompatible changes, or even removal, in a future release. |

## Interfaces

|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/BackgroundThreadStateHandler.StateChangeListener` | An interface to handle changes to the state on the foreground thread. |
| `https://developer.android.com/reference/androidx/media3/common/util/BitmapLoader` | Loads images. |
| `https://developer.android.com/reference/androidx/media3/common/util/Clock` | An interface through which system clocks can be read and `https://developer.android.com/reference/androidx/media3/common/util/HandlerWrapper`s created. |
| `https://developer.android.com/reference/androidx/media3/common/util/Consumer` | **This interface is deprecated.** Use `https://developer.android.com/reference/java/util/function/Consumer.html` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/common/util/EGLSurfaceTexture.TextureImageListener` | Listener to be called when the texture image on `https://developer.android.com/reference/android/graphics/SurfaceTexture.html` has been updated. |
| `https://developer.android.com/reference/androidx/media3/common/util/HandlerExecutor.Listener` | Listener for uncaught exceptions thrown during command execution. |
| `https://developer.android.com/reference/androidx/media3/common/util/HandlerWrapper` | An interface to call through to a `https://developer.android.com/reference/android/os/Handler.html`. |
| `https://developer.android.com/reference/androidx/media3/common/util/HandlerWrapper.Message` | A message obtained from the handler. |
| `https://developer.android.com/reference/androidx/media3/common/util/ListenerSet.Event` | An event sent to a listener. |
| `https://developer.android.com/reference/androidx/media3/common/util/ListenerSet.IterationFinishedEvent` | An event sent to a listener when all other events sent during one `https://developer.android.com/reference/android/os/Looper.html` message queue iteration were handled by the listener. |
| `https://developer.android.com/reference/androidx/media3/common/util/Log.Logger` | Interface for a logger that can output messages with a tag. |
| `https://developer.android.com/reference/androidx/media3/common/util/NetworkTypeObserver.Listener` | A listener for network type changes. |
| `https://developer.android.com/reference/androidx/media3/common/util/StuckPlayerDetector.Callback` | Callback notified when the player appears stuck. |
| `https://developer.android.com/reference/androidx/media3/common/util/ThrowingRunnable` | A `https://developer.android.com/reference/java/lang/Runnable.html`-like interface that allows throwing checked exceptions. |
| `https://developer.android.com/reference/androidx/media3/common/util/TimestampConsumer` | A consumer for long timestamp values. |
| `https://developer.android.com/reference/androidx/media3/common/util/TimestampIterator` | A primitive long iterator used for generating sequences of timestamps. |

## Classes

|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/Assertions` | Provides methods for asserting the truth of expressions and properties. |
| `https://developer.android.com/reference/androidx/media3/common/util/AtomicFile` | A helper class for performing atomic operations on a file by creating a backup file until a write has successfully completed. |
| `https://developer.android.com/reference/androidx/media3/common/util/BackgroundExecutor` | A utility class to obtain an `https://developer.android.com/reference/java/util/concurrent/Executor.html` for background tasks. |
| `https://developer.android.com/reference/androidx/media3/common/util/BackgroundThreadStateHandler` | Helper class to handle state updates on a background thread while maintaining a placeholder state on the foreground thread. |
| `https://developer.android.com/reference/androidx/media3/common/util/BundleCollectionUtil` | Utilities for converting collections to and from `https://developer.android.com/reference/android/os/Bundle.html` instances. |
| `https://developer.android.com/reference/androidx/media3/common/util/CodecSpecificDataUtil` | Provides utilities for handling various types of codec-specific data. |
| `https://developer.android.com/reference/androidx/media3/common/util/CodecSpecificDataUtil.MediaCodecProfileAndLevel` | A tuple of profile and level constants for `https://developer.android.com/reference/android/media/MediaCodec.html`. |
| `https://developer.android.com/reference/androidx/media3/common/util/ColorParser` | Parser for color expressions found in styling formats, e.g. TTML and CSS. |
| `https://developer.android.com/reference/androidx/media3/common/util/ConditionVariable` | An interruptible condition variable. |
| `https://developer.android.com/reference/androidx/media3/common/util/ConstantRateTimestampIterator` | A `https://developer.android.com/reference/androidx/media3/common/util/TimestampIterator` that generates monotonically increasing timestamps (in microseconds) distributed evenly over the given `durationUs` based on the given `frameRate`. |
| `https://developer.android.com/reference/androidx/media3/common/util/CopyOnWriteMultiset` | An unordered collection of elements that allows duplicates, but also allows access to a set of unique elements. |
| `https://developer.android.com/reference/androidx/media3/common/util/EGLSurfaceTexture` | Generates a `https://developer.android.com/reference/android/graphics/SurfaceTexture.html` using EGL/GLES functions. |
| `https://developer.android.com/reference/androidx/media3/common/util/GlProgram` | Represents a GLSL shader program. |
| `https://developer.android.com/reference/androidx/media3/common/util/GlRect` | Represents a rectangle by the coordinates of its 4 edges (left, bottom, right, top). |
| `https://developer.android.com/reference/androidx/media3/common/util/GlUtil` | OpenGL ES utilities. |
| `https://developer.android.com/reference/androidx/media3/common/util/HandlerExecutor` | An `https://developer.android.com/reference/java/util/concurrent/Executor.html` that posts commands to a `https://developer.android.com/reference/android/os/Handler.html` or `https://developer.android.com/reference/androidx/media3/common/util/HandlerWrapper` and forwards uncaught `https://developer.android.com/reference/java/lang/RuntimeException.html` to a `https://developer.android.com/reference/androidx/media3/common/util/HandlerExecutor.Listener`. |
| `https://developer.android.com/reference/androidx/media3/common/util/LibraryLoader` | Configurable loader for native libraries. |
| `https://developer.android.com/reference/androidx/media3/common/util/ListenerSet` | A set of listeners. |
| `https://developer.android.com/reference/androidx/media3/common/util/Log` | Wrapper around `https://developer.android.com/reference/android/util/Log.html` which allows to set the log level and to specify a custom log output. |
| `https://developer.android.com/reference/androidx/media3/common/util/LongArray` | An append-only, auto-growing `long[]`. |
| `https://developer.android.com/reference/androidx/media3/common/util/LongArrayQueue` | Array-based unbounded queue for long primitives with amortized O(1) add and remove. |
| `https://developer.android.com/reference/androidx/media3/common/util/MediaFormatUtil` | Helper class containing utility methods for managing `https://developer.android.com/reference/android/media/MediaFormat.html` instances. |
| `https://developer.android.com/reference/androidx/media3/common/util/NetworkTypeObserver` | Observer for network type changes. |
| `https://developer.android.com/reference/androidx/media3/common/util/NotificationUtil` | Utility methods for displaying `https://developer.android.com/reference/android/app/Notification.html`. |
| `https://developer.android.com/reference/androidx/media3/common/util/ParsableBitArray` | Wraps a byte array, providing methods that allow it to be read as a bitstream. |
| `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray` | Wraps a byte array, providing a set of methods for parsing data from it. |
| `https://developer.android.com/reference/androidx/media3/common/util/RepeatModeUtil` | Util class for repeat mode handling. |
| `https://developer.android.com/reference/androidx/media3/common/util/RunnableFutureTask` | A `https://developer.android.com/reference/java/util/concurrent/RunnableFuture.html` that supports additional uninterruptible operations to query whether execution has started and finished. |
| `https://developer.android.com/reference/androidx/media3/common/util/Size` | Immutable class for describing width and height dimensions in pixels. |
| `https://developer.android.com/reference/androidx/media3/common/util/SpeedProviderUtil` | Utilities for `https://developer.android.com/reference/androidx/media3/common/audio/SpeedProvider`. |
| `https://developer.android.com/reference/androidx/media3/common/util/SpeedProviderUtil.SpeedProviderMapper` | Class that maps timestamps between original media time and adjusted time after applying a `https://developer.android.com/reference/androidx/media3/common/audio/SpeedProvider`. |
| `https://developer.android.com/reference/androidx/media3/common/util/StuckPlayerDetector` | A utility class to detect whether a `https://developer.android.com/reference/androidx/media3/common/Player` is stuck. |
| `https://developer.android.com/reference/androidx/media3/common/util/SystemClock` | The standard implementation of `https://developer.android.com/reference/androidx/media3/common/util/Clock`, an instance of which is available via `https://developer.android.com/reference/androidx/media3/common/util/Clock#DEFAULT()`. |
| `https://developer.android.com/reference/androidx/media3/common/util/TimedValueQueue` | A utility class to keep a queue of values with timestamps. |
| `https://developer.android.com/reference/androidx/media3/common/util/TimestampAdjuster` | Adjusts and offsets sample timestamps. |
| `https://developer.android.com/reference/androidx/media3/common/util/TraceUtil` | Calls through to `https://developer.android.com/reference/android/os/Trace.html` methods if `https://developer.android.com/reference/androidx/media3/common/MediaLibraryInfo#TRACE_ENABLED()` is `true`. |
| `https://developer.android.com/reference/androidx/media3/common/util/UriUtil` | Utility methods for manipulating URIs. |
| `https://developer.android.com/reference/androidx/media3/common/util/Util` | Miscellaneous utility methods. |
| `https://developer.android.com/reference/androidx/media3/common/util/WakeLockManager` | Utility class to handle a `https://developer.android.com/reference/android/os/PowerManager.WakeLock.html`. |
| `https://developer.android.com/reference/androidx/media3/common/util/WavUtil` | Utilities for handling WAVE files. |
| `https://developer.android.com/reference/androidx/media3/common/util/WifiLockManager` | Utility class to handle a `https://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html` |
| `https://developer.android.com/reference/androidx/media3/common/util/XmlPullParserUtil` | `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html` utility methods. |

## Exceptions

|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/GlUtil.GlException` | Thrown when an OpenGL error occurs. |
| `https://developer.android.com/reference/androidx/media3/common/util/StuckPlayerException` | Exception thrown when the player is stuck in `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_BUFFERING()` while `https://developer.android.com/reference/androidx/media3/common/Player#getPlayWhenReady()` is true without observable progress and no means of unblocking itself. |