Commit 4398af3a by claincly Committed by Ian Baker

Create frame processor in MCVR

PiperOrigin-RevId: 495368262
parent 91557ac9
...@@ -1097,6 +1097,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer { ...@@ -1097,6 +1097,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
if (codecOperatingRate <= assumedMinimumCodecOperatingRate) { if (codecOperatingRate <= assumedMinimumCodecOperatingRate) {
codecOperatingRate = CODEC_OPERATING_RATE_UNSET; codecOperatingRate = CODEC_OPERATING_RATE_UNSET;
} }
onReadyToInitializeCodec(inputFormat);
codecInitializingTimestamp = SystemClock.elapsedRealtime(); codecInitializingTimestamp = SystemClock.elapsedRealtime();
MediaCodecAdapter.Configuration configuration = MediaCodecAdapter.Configuration configuration =
getMediaCodecConfiguration(codecInfo, inputFormat, crypto, codecOperatingRate); getMediaCodecConfiguration(codecInfo, inputFormat, crypto, codecOperatingRate);
...@@ -1382,6 +1383,22 @@ public abstract class MediaCodecRenderer extends BaseRenderer { ...@@ -1382,6 +1383,22 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
} }
/** /**
* Called when ready to initialize the {@link MediaCodecAdapter}.
*
* <p>This method is called just before the renderer obtains the {@linkplain
* #getMediaCodecConfiguration configuration} for the {@link MediaCodecAdapter} and creates the
* adapter via the passed in {@link MediaCodecAdapter.Factory}.
*
* <p>The default implementation is a no-op.
*
* @param format The {@link Format} for which the codec is being configured.
* @throws ExoPlaybackException If an error occurs preparing for initializing the codec.
*/
protected void onReadyToInitializeCodec(Format format) throws ExoPlaybackException {
// Do nothing.
}
/**
* Called when a {@link MediaCodec} has been created and configured. * Called when a {@link MediaCodec} has been created and configured.
* *
* <p>The default implementation is a no-op. * <p>The default implementation is a no-op.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment