docs/doc/reference/com/google/android/exoplayer2/decoder/DecoderCounters.html
Package com.google.android.exoplayer2.decoder
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDecoderCountersextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Maintains decoder event counts, for debugging purposes only.
Counters should be written from the playback thread only. Counters may be read from any thread. To ensure that the counter values are made visible across threads, users of this class should invoke ensureUpdated() prior to reading and after writing.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | decoderInitCount |
Deprecated.
The number of times a decoder has been initialized.
|
| int | decoderReleaseCount |
Deprecated.
The number of times a decoder has been released.
|
| int | droppedBufferCount |
Deprecated.
The number of dropped buffers.
|
| int | droppedInputBufferCount |
Deprecated.
The number of input buffers dropped.
|
| int | droppedToKeyframeCount |
Deprecated.
The number of times all buffers to a keyframe were dropped.
|
| int | maxConsecutiveDroppedBufferCount |
Deprecated.
The maximum number of dropped buffers without an interleaving rendered output buffer.
|
| int | queuedInputBufferCount |
Deprecated.
The number of input buffers queued to the decoder.
|
| int | renderedOutputBufferCount |
Deprecated.
The number of rendered output buffers.
|
| int | skippedInputBufferCount |
Deprecated.
The number of skipped input buffers.
|
| int | skippedOutputBufferCount |
Deprecated.
The number of skipped output buffers.
|
| long | totalVideoFrameProcessingOffsetUs |
Deprecated.
The sum of the video frame processing offsets in microseconds.
|
| int | videoFrameProcessingOffsetCount |
Deprecated.
The number of video frame processing offsets added. |
Constructors | Constructor | Description |
| --- | --- |
| DecoderCounters() |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| void | addVideoFrameProcessingOffset(long processingOffsetUs) |
Deprecated.
Adds a video frame processing offset to totalVideoFrameProcessingOffsetUs and increases videoFrameProcessingOffsetCount by one.
|
| void | ensureUpdated() |
Deprecated.
Should be called to ensure counter values are made visible across threads.
|
| void | merge(DecoderCounters other) |
Deprecated.
Merges the counts from other into this instance.
|
| String | toString() |
Deprecated.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
public int decoderInitCount
Deprecated.
The number of times a decoder has been initialized.
-
public int decoderReleaseCount
Deprecated.
The number of times a decoder has been released.
-
public int queuedInputBufferCount
Deprecated.
The number of input buffers queued to the decoder.
-
public int skippedInputBufferCount
Deprecated.
The number of skipped input buffers.
A skipped input buffer is an input buffer that was deliberately not queued to the decoder.
-
public int renderedOutputBufferCount
Deprecated.
The number of rendered output buffers.
-
public int skippedOutputBufferCount
Deprecated.
The number of skipped output buffers.
A skipped output buffer is an output buffer that was deliberately not rendered. This includes buffers that were never dequeued from the decoder and instead skipped while 'inside' the codec due to a flush.
-
public int droppedBufferCount
Deprecated.
The number of dropped buffers.
A dropped buffer is a buffer that was supposed to be decoded/rendered, but was instead dropped because it could not be rendered in time.
This includes all of droppedInputBufferCount in addition to buffers dropped after being queued to the decoder.
-
public int droppedInputBufferCount
Deprecated.
The number of input buffers dropped.
A dropped input buffer is a buffer that was not queued to the decoder because it would not be rendered in time.
-
public int maxConsecutiveDroppedBufferCount
Deprecated.
The maximum number of dropped buffers without an interleaving rendered output buffer.
Skipped buffers are ignored for the purposes of calculating this value.
-
public int droppedToKeyframeCount
Deprecated.
The number of times all buffers to a keyframe were dropped.
Each time buffers to a keyframe are dropped:
- This counter is incremented by one.
- [`droppedInputBufferCount`](#droppedInputBufferCount) is incremented by the number of buffers dropped from the source to advance to the keyframe.
- [`droppedBufferCount`](#droppedBufferCount) is incremented by the sum of the number of buffers dropped from the source to advance to the keyframe and the number of buffers 'inside' the decoder.
-
public long totalVideoFrameProcessingOffsetUs
Deprecated.
The sum of the video frame processing offsets in microseconds.
The processing offset for a video frame is the difference between the time at which the frame became available to render, and the time at which it was scheduled to be rendered. A positive value indicates the frame became available early enough, whereas a negative value indicates that the frame wasn't available until after the time at which it should have been rendered.
Note: Use addVideoFrameProcessingOffset(long) to update this field instead of updating it directly.
-
public int videoFrameProcessingOffsetCount
Deprecated.
The number of video frame processing offsets added.
Note: Use addVideoFrameProcessingOffset(long) to update this field instead of updating it directly.
-
public DecoderCounters()
Deprecated.
-
public void ensureUpdated()
Deprecated.
Should be called to ensure counter values are made visible across threads. The playback thread should call this method after updating the counter values. Any other thread should call this method before reading the counters.
-
public void merge([DecoderCounters](DecoderCounters.html "class in com.google.android.exoplayer2.decoder")other)
Deprecated.
Merges the counts from other into this instance.
Parameters:other - The DecoderCounters to merge into this instance.
-
public void addVideoFrameProcessingOffset(long processingOffsetUs)
Deprecated.
Adds a video frame processing offset to totalVideoFrameProcessingOffsetUs and increases videoFrameProcessingOffsetCount by one.
Convenience method to ensure both fields are updated when adding a single offset.
Parameters:processingOffsetUs - The video frame processing offset in microseconds.
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()
Deprecated.
Overrides:toString in class Object