DecoderReuseEvaluation


@UnstableApi
class DecoderReuseEvaluation


The result of an evaluation to determine whether a decoder can be reused for a new input format.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(flag = true, value = )
annotation DecoderReuseEvaluation.DecoderDiscardReasons

Possible reasons why reuse is not possible.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = TYPE_USE)
@IntDef(value = )
annotation DecoderReuseEvaluation.DecoderReuseResult

Possible outcomes of the evaluation.

Constants

const Int

Decoder reuse is disabled by overriding behavior in application code.

const Int

The audio bypass mode is possible.

const Int

The audio channel count is changing.

const Int

The audio encoding is changing.

const Int

The audio sample rate is changing.

const Int

The DRM session is changing.

const Int

The format initialization data is changing.

const Int

The new format may exceed the decoder's configured maximum sample size, in bytes.

const Int

The sample MIME type is changing.

const Int

The codec's operating rate is changing.

const Int

Decoder reuse is not implemented.

const Int

The video ColorInfo is changing.

const Int

The new format may exceed the decoder's configured maximum resolution.

const Int

The video resolution is changing.

const Int

The video rotation is changing.

const Int

Decoder reuse is disabled by a workaround.

const Int

The decoder cannot be reused.

const Int

The decoder can be kept.

const Int

The decoder can be reused, but must be flushed.

const Int

The decoder can be reused.

Public constructors

DecoderReuseEvaluation(
    decoderName: String!,
    oldFormat: Format!,
    newFormat: Format!,
    @DecoderReuseEvaluation.DecoderReuseResult result: Int,
    @DecoderReuseEvaluation.DecoderDiscardReasons discardReasons: Int
)

Public functions

Boolean
equals(obj: Any?)
Int

Public properties

String!

The name of the decoder.

Int

Reasons why the decoder cannot be reused.

Format!

The new Format being evaluated.

Format!

The Format for which the decoder was previously configured.

Int

The result of the evaluation.

Constants

DISCARD_REASON_APP_OVERRIDE

const val DISCARD_REASON_APP_OVERRIDE = 4: Int

Decoder reuse is disabled by overriding behavior in application code.

DISCARD_REASON_AUDIO_BYPASS_POSSIBLE

const val DISCARD_REASON_AUDIO_BYPASS_POSSIBLE = 32768: Int

The audio bypass mode is possible.

DISCARD_REASON_AUDIO_CHANNEL_COUNT_CHANGED

const val DISCARD_REASON_AUDIO_CHANNEL_COUNT_CHANGED = 4096: Int

The audio channel count is changing.

DISCARD_REASON_AUDIO_ENCODING_CHANGED

const val DISCARD_REASON_AUDIO_ENCODING_CHANGED = 16384: Int

The audio encoding is changing.

DISCARD_REASON_AUDIO_SAMPLE_RATE_CHANGED

const val DISCARD_REASON_AUDIO_SAMPLE_RATE_CHANGED = 8192: Int

The audio sample rate is changing.

DISCARD_REASON_DRM_SESSION_CHANGED

const val DISCARD_REASON_DRM_SESSION_CHANGED = 128: Int

The DRM session is changing.

DISCARD_REASON_INITIALIZATION_DATA_CHANGED

const val DISCARD_REASON_INITIALIZATION_DATA_CHANGED = 32: Int

The format initialization data is changing.

DISCARD_REASON_MAX_INPUT_SIZE_EXCEEDED

const val DISCARD_REASON_MAX_INPUT_SIZE_EXCEEDED = 64: Int

The new format may exceed the decoder's configured maximum sample size, in bytes.

DISCARD_REASON_MIME_TYPE_CHANGED

const val DISCARD_REASON_MIME_TYPE_CHANGED = 8: Int

The sample MIME type is changing.

DISCARD_REASON_OPERATING_RATE_CHANGED

const val DISCARD_REASON_OPERATING_RATE_CHANGED = 16: Int

The codec's operating rate is changing.

DISCARD_REASON_REUSE_NOT_IMPLEMENTED

const val DISCARD_REASON_REUSE_NOT_IMPLEMENTED = 1: Int

Decoder reuse is not implemented.

DISCARD_REASON_VIDEO_COLOR_INFO_CHANGED

const val DISCARD_REASON_VIDEO_COLOR_INFO_CHANGED = 2048: Int

The video ColorInfo is changing.

DISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDED

const val DISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDED = 256: Int

The new format may exceed the decoder's configured maximum resolution.

DISCARD_REASON_VIDEO_RESOLUTION_CHANGED

const val DISCARD_REASON_VIDEO_RESOLUTION_CHANGED = 512: Int

The video resolution is changing.

DISCARD_REASON_VIDEO_ROTATION_CHANGED

const val DISCARD_REASON_VIDEO_ROTATION_CHANGED = 1024: Int

The video rotation is changing.

DISCARD_REASON_WORKAROUND

const val DISCARD_REASON_WORKAROUND = 2: Int

Decoder reuse is disabled by a workaround.

REUSE_RESULT_NO

const val REUSE_RESULT_NO = 0: Int

The decoder cannot be reused.

REUSE_RESULT_YES_WITHOUT_RECONFIGURATION

const val REUSE_RESULT_YES_WITHOUT_RECONFIGURATION = 3: Int

The decoder can be kept. It does not need to be flushed and no reconfiguration is required.

REUSE_RESULT_YES_WITH_FLUSH

const val REUSE_RESULT_YES_WITH_FLUSH = 1: Int

The decoder can be reused, but must be flushed.

REUSE_RESULT_YES_WITH_RECONFIGURATION

const val REUSE_RESULT_YES_WITH_RECONFIGURATION = 2: Int

The decoder can be reused. It does not need to be flushed, but must be reconfigured by prefixing the next input buffer with the new format's configuration data.

Public constructors

DecoderReuseEvaluation

DecoderReuseEvaluation(
    decoderName: String!,
    oldFormat: Format!,
    newFormat: Format!,
    @DecoderReuseEvaluation.DecoderReuseResult result: Int,
    @DecoderReuseEvaluation.DecoderDiscardReasons discardReasons: Int
)
Parameters
decoderName: String!

The name of the decoder.

oldFormat: Format!

The Format for which the decoder was previously configured.

newFormat: Format!

The new Format being evaluated.

@DecoderReuseEvaluation.DecoderReuseResult result: Int

The result of the evaluation.

@DecoderReuseEvaluation.DecoderDiscardReasons discardReasons: Int

One or more reasons why the decoder cannot be reused, or 0 if reuse is possible.

Public functions

equals

fun equals(obj: Any?): Boolean

hashCode

fun hashCode(): Int

Public properties

decoderName

val decoderNameString!

The name of the decoder.

discardReasons

@DecoderReuseEvaluation.DecoderDiscardReasons
val discardReasonsInt

Reasons why the decoder cannot be reused. Always 0 if reuse is possible. May also be {code 0} if reuse is not possible for an unspecified reason.

newFormat

val newFormatFormat!

The new Format being evaluated.

oldFormat

val oldFormatFormat!

The Format for which the decoder was previously configured.

result

@DecoderReuseEvaluation.DecoderReuseResult
val resultInt

The result of the evaluation.