DecoderCountersUtil


@UnstableApi
public final class DecoderCountersUtil


Assertions for DecoderCounters.

Summary

Public methods

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

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

Returns the sum of the skipped, dropped and rendered buffers.

Public methods

assertConsecutiveDroppedBufferLimit

public static void assertConsecutiveDroppedBufferLimit(
    String name,
    DecoderCounters counters,
    int limit
)

assertDroppedBufferLimit

public static void assertDroppedBufferLimit(
    String name,
    DecoderCounters counters,
    int limit
)

assertSkippedOutputBufferCount

public static void assertSkippedOutputBufferCount(
    String name,
    DecoderCounters counters,
    int expected
)

assertTotalBufferCount

public static void assertTotalBufferCount(String name, DecoderCounters counters)

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

assertTotalBufferCount

public static void assertTotalBufferCount(
    String name,
    DecoderCounters counters,
    int minCount,
    int maxCount
)

assertVideoFrameProcessingOffsetSampleCount

public static void assertVideoFrameProcessingOffsetSampleCount(
    String name,
    DecoderCounters counters,
    int minCount,
    int maxCount
)

getTotalBufferCount

public static int getTotalBufferCount(DecoderCounters counters)

Returns the sum of the skipped, dropped and rendered buffers.

Parameters
DecoderCounters counters

The counters for which the total should be calculated.

Returns
int

The sum of the skipped, dropped and rendered buffers.