Class DecoderReuseEvaluation
- java.lang.Object
-
- com.google.android.exoplayer2.decoder.DecoderReuseEvaluation
-
public final class DecoderReuseEvaluation extends Object
The result of an evaluation to determine whether a decoder can be reused for a new input format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDecoderReuseEvaluation.DecoderDiscardReasonsPossible reasons why reuse is not possible.static interfaceDecoderReuseEvaluation.DecoderReuseResultPossible outcomes of the evaluation.
-
Field Summary
Fields Modifier and Type Field Description StringdecoderNameThe name of the decoder.static intDISCARD_REASON_APP_OVERRIDEDecoder reuse is disabled by overriding behavior in application code.static intDISCARD_REASON_AUDIO_CHANNEL_COUNT_CHANGEDThe audio channel count is changing.static intDISCARD_REASON_AUDIO_ENCODING_CHANGEDThe audio encoding is changing.static intDISCARD_REASON_AUDIO_SAMPLE_RATE_CHANGEDThe audio sample rate is changing.static intDISCARD_REASON_DRM_SESSION_CHANGEDThe DRM session is changing.static intDISCARD_REASON_INITIALIZATION_DATA_CHANGEDThe format initialization data is changing.static intDISCARD_REASON_MAX_INPUT_SIZE_EXCEEDEDThe new format may exceed the decoder's configured maximum sample size, in bytes.static intDISCARD_REASON_MIME_TYPE_CHANGEDThe sample MIME type is changing.static intDISCARD_REASON_OPERATING_RATE_CHANGEDThe codec's operating rate is changing.static intDISCARD_REASON_REUSE_NOT_IMPLEMENTEDDecoder reuse is not implemented.static intDISCARD_REASON_VIDEO_COLOR_INFO_CHANGEDThe videoColorInfois changing.static intDISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDEDThe new format may exceed the decoder's configured maximum resolution.static intDISCARD_REASON_VIDEO_RESOLUTION_CHANGEDThe video resolution is changing.static intDISCARD_REASON_VIDEO_ROTATION_CHANGEDThe video rotation is changing.static intDISCARD_REASON_WORKAROUNDDecoder reuse is disabled by a workaround.@com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderDiscardReasons intdiscardReasonsReasonswhy the decoder cannot be reused.FormatnewFormatThe newFormatbeing evaluated.FormatoldFormatTheFormatfor which the decoder was previously configured.@com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderReuseResult intresultTheresultof the evaluation.static intREUSE_RESULT_NOThe decoder cannot be reused.static intREUSE_RESULT_YES_WITH_FLUSHThe decoder can be reused, but must be flushed.static intREUSE_RESULT_YES_WITH_RECONFIGURATIONThe decoder can be reused.static intREUSE_RESULT_YES_WITHOUT_RECONFIGURATIONThe decoder can be kept.
-
Constructor Summary
Constructors Constructor Description DecoderReuseEvaluation(String decoderName, Format oldFormat, Format newFormat, @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderReuseResult int result, @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderDiscardReasons int discardReasons)
-
-
-
Field Detail
-
REUSE_RESULT_NO
public static final int REUSE_RESULT_NO
The decoder cannot be reused.- See Also:
- Constant Field Values
-
REUSE_RESULT_YES_WITH_FLUSH
public static final int REUSE_RESULT_YES_WITH_FLUSH
The decoder can be reused, but must be flushed.- See Also:
- Constant Field Values
-
REUSE_RESULT_YES_WITH_RECONFIGURATION
public static final int REUSE_RESULT_YES_WITH_RECONFIGURATION
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.- See Also:
- Constant Field Values
-
REUSE_RESULT_YES_WITHOUT_RECONFIGURATION
public static final int REUSE_RESULT_YES_WITHOUT_RECONFIGURATION
The decoder can be kept. It does not need to be flushed and no reconfiguration is required.- See Also:
- Constant Field Values
-
DISCARD_REASON_REUSE_NOT_IMPLEMENTED
public static final int DISCARD_REASON_REUSE_NOT_IMPLEMENTED
Decoder reuse is not implemented.- See Also:
- Constant Field Values
-
DISCARD_REASON_WORKAROUND
public static final int DISCARD_REASON_WORKAROUND
Decoder reuse is disabled by a workaround.- See Also:
- Constant Field Values
-
DISCARD_REASON_APP_OVERRIDE
public static final int DISCARD_REASON_APP_OVERRIDE
Decoder reuse is disabled by overriding behavior in application code.- See Also:
- Constant Field Values
-
DISCARD_REASON_MIME_TYPE_CHANGED
public static final int DISCARD_REASON_MIME_TYPE_CHANGED
The sample MIME type is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_OPERATING_RATE_CHANGED
public static final int DISCARD_REASON_OPERATING_RATE_CHANGED
The codec's operating rate is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_INITIALIZATION_DATA_CHANGED
public static final int DISCARD_REASON_INITIALIZATION_DATA_CHANGED
The format initialization data is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_MAX_INPUT_SIZE_EXCEEDED
public static final int DISCARD_REASON_MAX_INPUT_SIZE_EXCEEDED
The new format may exceed the decoder's configured maximum sample size, in bytes.- See Also:
- Constant Field Values
-
DISCARD_REASON_DRM_SESSION_CHANGED
public static final int DISCARD_REASON_DRM_SESSION_CHANGED
The DRM session is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDED
public static final int DISCARD_REASON_VIDEO_MAX_RESOLUTION_EXCEEDED
The new format may exceed the decoder's configured maximum resolution.- See Also:
- Constant Field Values
-
DISCARD_REASON_VIDEO_RESOLUTION_CHANGED
public static final int DISCARD_REASON_VIDEO_RESOLUTION_CHANGED
The video resolution is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_VIDEO_ROTATION_CHANGED
public static final int DISCARD_REASON_VIDEO_ROTATION_CHANGED
The video rotation is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_VIDEO_COLOR_INFO_CHANGED
public static final int DISCARD_REASON_VIDEO_COLOR_INFO_CHANGED
The videoColorInfois changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_AUDIO_CHANNEL_COUNT_CHANGED
public static final int DISCARD_REASON_AUDIO_CHANNEL_COUNT_CHANGED
The audio channel count is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_AUDIO_SAMPLE_RATE_CHANGED
public static final int DISCARD_REASON_AUDIO_SAMPLE_RATE_CHANGED
The audio sample rate is changing.- See Also:
- Constant Field Values
-
DISCARD_REASON_AUDIO_ENCODING_CHANGED
public static final int DISCARD_REASON_AUDIO_ENCODING_CHANGED
The audio encoding is changing.- See Also:
- Constant Field Values
-
decoderName
public final String decoderName
The name of the decoder.
-
result
public final @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderReuseResult int result
Theresultof the evaluation.
-
discardReasons
public final @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderDiscardReasons int discardReasons
Reasonswhy the decoder cannot be reused. Always0if reuse is possible. May also be {code 0} if reuse is not possible for an unspecified reason.
-
-
Constructor Detail
-
DecoderReuseEvaluation
public DecoderReuseEvaluation(String decoderName, Format oldFormat, Format newFormat, @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderReuseResult int result, @com.google.android.exoplayer2.decoder.DecoderReuseEvaluation.DecoderDiscardReasons int discardReasons)
- Parameters:
decoderName- The name of the decoder.oldFormat- TheFormatfor which the decoder was previously configured.newFormat- The newFormatbeing evaluated.result- Theresultof the evaluation.discardReasons- One or morereasonswhy the decoder cannot be reused, or0if reuse is possible.
-
-