@Override protected void onInputFormatChanged(Format newFormat) throws ExoPlaybackException { super.onInputFormatChanged(newFormat); eventDispatcher.inputFormatChanged(newFormat); // If the input format is anything other than PCM then we assume that the audio decoder will // output 16-bit PCM. pcmEncoding = MimeTypes.AUDIO_RAW.equals(newFormat.sampleMimeType) ? newFormat.pcmEncoding : C.ENCODING_PCM_16BIT; channelCount = newFormat.channelCount; encoderDelay = newFormat.encoderDelay; encoderPadding = newFormat.encoderPadding; }
@Override protected void onFormatChanged(Format format) { eventDispatcher.inputFormatChanged(format); eventDispatcher.decoderInitialized( /* decoderName= */ "fake.audio.decoder", /* initializedTimestampMs= */ SystemClock.elapsedRealtime(), /* initializationDurationMs= */ 0); }
encoderPadding = newFormat.encoderPadding; eventDispatcher.inputFormatChanged(newFormat);