Back to Exoplayer

DecoderCountersUtil (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/DecoderCountersUtil.html

latest5.1 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class DecoderCountersUtil


public final classDecoderCountersUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Assertions for DecoderCounters.

Method Summary

All Methods Static Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static void | assertConsecutiveDroppedBufferLimit​(String name, DecoderCounters counters, int limit) | | | static void | assertDroppedBufferLimit​(String name, DecoderCounters counters, int limit) | | | static void | assertSkippedOutputBufferCount​(String name, DecoderCounters counters, int expected) | | | static void | assertTotalBufferCount​(String name, DecoderCounters counters) | Asserts that the input and output values in counters are self-consistent. | | static void | assertTotalBufferCount​(String name, DecoderCounters counters, int minCount, int maxCount) | | | static void | assertVideoFrameProcessingOffsetSampleCount​(String name, DecoderCounters counters, int minCount, int maxCount) | | | static int | getTotalBufferCount​(DecoderCounters counters) | Returns the sum of the skipped, dropped and rendered buffers. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

- 

getTotalBufferCount

public static int getTotalBufferCount​([DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters)

Returns the sum of the skipped, dropped and rendered buffers. Parameters:counters - The counters for which the total should be calculated.Returns:The sum of the skipped, dropped and rendered buffers.

- 

assertSkippedOutputBufferCount

public static void assertSkippedOutputBufferCount​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters,
                                                  int expected)
- 

assertTotalBufferCount

public static void assertTotalBufferCount​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters)

Asserts that the input and output values in counters are self-consistent.

- 

assertTotalBufferCount

public static void assertTotalBufferCount​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters,
                                          int minCount,
                                          int maxCount)
- 

assertDroppedBufferLimit

public static void assertDroppedBufferLimit​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters,
                                            int limit)
- 

assertConsecutiveDroppedBufferLimit

public static void assertConsecutiveDroppedBufferLimit​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters,
                                                       int limit)
- 

assertVideoFrameProcessingOffsetSampleCount

public static void assertVideoFrameProcessingOffsetSampleCount​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[DecoderCounters](../decoder/DecoderCounters.html "class in com.google.android.exoplayer2.decoder")counters,
                                                               int minCount,
                                                               int maxCount)