package com.google.android.exoplayer2.mediacodec; import android.media.MediaCodec; import android.media.MediaCrypto; import android.media.MediaFormat; import android.os.Bundle; import android.os.Handler; import android.os.PersistableBundle; import android.view.Surface; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.decoder.CryptoInfo; import java.io.IOException; import java.nio.ByteBuffer; /* loaded from: classes2.dex */ public interface MediaCodecAdapter { /* loaded from: classes2.dex */ public interface Factory { public static final Factory DEFAULT = new DefaultMediaCodecAdapterFactory(); MediaCodecAdapter createAdapter(Configuration configuration) throws IOException; } /* loaded from: classes2.dex */ public interface OnFrameRenderedListener { void onFrameRendered(MediaCodecAdapter mediaCodecAdapter, long j, long j2); } int dequeueInputBufferIndex(); int dequeueOutputBufferIndex(MediaCodec.BufferInfo bufferInfo); void flush(); ByteBuffer getInputBuffer(int i); PersistableBundle getMetrics(); ByteBuffer getOutputBuffer(int i); MediaFormat getOutputFormat(); boolean needsReconfiguration(); void queueInputBuffer(int i, int i2, int i3, long j, int i4); void queueSecureInputBuffer(int i, int i2, CryptoInfo cryptoInfo, long j, int i3); void release(); void releaseOutputBuffer(int i, long j); void releaseOutputBuffer(int i, boolean z); void setOnFrameRenderedListener(OnFrameRenderedListener onFrameRenderedListener, Handler handler); void setOutputSurface(Surface surface); void setParameters(Bundle bundle); void setVideoScalingMode(int i); /* loaded from: classes2.dex */ public static final class Configuration { public final MediaCodecInfo codecInfo; public final MediaCrypto crypto; public final int flags; public final Format format; public final MediaFormat mediaFormat; public final Surface surface; public static Configuration createForAudioDecoding(MediaCodecInfo mediaCodecInfo, MediaFormat mediaFormat, Format format, MediaCrypto mediaCrypto) { return new Configuration(mediaCodecInfo, mediaFormat, format, null, mediaCrypto, 0); } public static Configuration createForVideoDecoding(MediaCodecInfo mediaCodecInfo, MediaFormat mediaFormat, Format format, Surface surface, MediaCrypto mediaCrypto) { return new Configuration(mediaCodecInfo, mediaFormat, format, surface, mediaCrypto, 0); } private Configuration(MediaCodecInfo mediaCodecInfo, MediaFormat mediaFormat, Format format, Surface surface, MediaCrypto mediaCrypto, int i) { this.codecInfo = mediaCodecInfo; this.mediaFormat = mediaFormat; this.format = format; this.surface = surface; this.crypto = mediaCrypto; this.flags = i; } } }