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
)

Asserts that the skipped output buffer count is expected.

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

Asserts that the skipped output buffer count is within tolerance of 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
)

Asserts that the skipped output buffer count is expected.

Parameters
String name

The name of the decoder.

DecoderCounters counters

The decoder counters.

int expected

The expected number of skipped output buffers.

assertSkippedOutputBufferCount

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

Asserts that the skipped output buffer count is within tolerance of expected.

Parameters
String name

The name of the decoder.

DecoderCounters counters

The decoder counters.

int expected

The expected number of skipped output buffers.

int tolerance

The allowed tolerance around the expected count.

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.