mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add @ForOverride to DecoderAudioRenderer protected methods
PiperOrigin-RevId: 487779266
This commit is contained in:
parent
62d6c303c1
commit
9d6d30d81d
1 changed files with 6 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ import androidx.media3.exoplayer.audio.AudioSink.SinkFormatSupport;
|
||||||
import androidx.media3.exoplayer.drm.DrmSession;
|
import androidx.media3.exoplayer.drm.DrmSession;
|
||||||
import androidx.media3.exoplayer.drm.DrmSession.DrmSessionException;
|
import androidx.media3.exoplayer.drm.DrmSession.DrmSessionException;
|
||||||
import androidx.media3.exoplayer.source.SampleStream.ReadDataResult;
|
import androidx.media3.exoplayer.source.SampleStream.ReadDataResult;
|
||||||
|
import com.google.errorprone.annotations.ForOverride;
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
@ -262,6 +263,7 @@ public abstract class DecoderAudioRenderer<
|
||||||
* @param format The format, which has an audio {@link Format#sampleMimeType}.
|
* @param format The format, which has an audio {@link Format#sampleMimeType}.
|
||||||
* @return The {@link C.FormatSupport} for this {@link Format}.
|
* @return The {@link C.FormatSupport} for this {@link Format}.
|
||||||
*/
|
*/
|
||||||
|
@ForOverride
|
||||||
protected abstract @C.FormatSupport int supportsFormatInternal(Format format);
|
protected abstract @C.FormatSupport int supportsFormatInternal(Format format);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -351,6 +353,7 @@ public abstract class DecoderAudioRenderer<
|
||||||
|
|
||||||
/** See {@link AudioSink.Listener#onPositionDiscontinuity()}. */
|
/** See {@link AudioSink.Listener#onPositionDiscontinuity()}. */
|
||||||
@CallSuper
|
@CallSuper
|
||||||
|
@ForOverride
|
||||||
protected void onPositionDiscontinuity() {
|
protected void onPositionDiscontinuity() {
|
||||||
// We are out of sync so allow currentPositionUs to jump backwards.
|
// We are out of sync so allow currentPositionUs to jump backwards.
|
||||||
allowPositionDiscontinuity = true;
|
allowPositionDiscontinuity = true;
|
||||||
|
|
@ -365,6 +368,7 @@ public abstract class DecoderAudioRenderer<
|
||||||
* @return The decoder.
|
* @return The decoder.
|
||||||
* @throws DecoderException If an error occurred creating a suitable decoder.
|
* @throws DecoderException If an error occurred creating a suitable decoder.
|
||||||
*/
|
*/
|
||||||
|
@ForOverride
|
||||||
protected abstract T createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
|
protected abstract T createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
|
||||||
throws DecoderException;
|
throws DecoderException;
|
||||||
|
|
||||||
|
|
@ -374,6 +378,7 @@ public abstract class DecoderAudioRenderer<
|
||||||
*
|
*
|
||||||
* @param decoder The decoder.
|
* @param decoder The decoder.
|
||||||
*/
|
*/
|
||||||
|
@ForOverride
|
||||||
protected abstract Format getOutputFormat(T decoder);
|
protected abstract Format getOutputFormat(T decoder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -386,6 +391,7 @@ public abstract class DecoderAudioRenderer<
|
||||||
* @param newFormat The new format.
|
* @param newFormat The new format.
|
||||||
* @return The result of the evaluation.
|
* @return The result of the evaluation.
|
||||||
*/
|
*/
|
||||||
|
@ForOverride
|
||||||
protected DecoderReuseEvaluation canReuseDecoder(
|
protected DecoderReuseEvaluation canReuseDecoder(
|
||||||
String decoderName, Format oldFormat, Format newFormat) {
|
String decoderName, Format oldFormat, Format newFormat) {
|
||||||
return new DecoderReuseEvaluation(
|
return new DecoderReuseEvaluation(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue