Class TeeAudioProcessor
- java.lang.Object
-
- com.google.android.exoplayer2.audio.BaseAudioProcessor
-
- com.google.android.exoplayer2.audio.TeeAudioProcessor
-
- All Implemented Interfaces:
AudioProcessor
@Deprecated public final class TeeAudioProcessor extends BaseAudioProcessor
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Audio processor that outputs its input unmodified and also outputs its input to a given sink. This is intended to be used for diagnostics and debugging.This audio processor can be inserted into the audio processor chain to access audio data before/after particular processing steps have been applied. For example, to get audio output after playback speed adjustment and silence skipping have been applied it is necessary to pass a custom
AudioProcessorChainwhen creating the audio sink, and include this audio processor after all other audio processors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTeeAudioProcessor.AudioBufferSinkDeprecated.A sink for audio buffers handled by the audio processor.static classTeeAudioProcessor.WavFileAudioBufferSinkDeprecated.A sink for audio buffers that writes output audio as .wav files with a given path prefix.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.audio.AudioProcessor
AudioProcessor.AudioFormat, AudioProcessor.UnhandledAudioFormatException
-
-
Field Summary
-
Fields inherited from class com.google.android.exoplayer2.audio.BaseAudioProcessor
inputAudioFormat, outputAudioFormat
-
Fields inherited from interface com.google.android.exoplayer2.audio.AudioProcessor
EMPTY_BUFFER
-
-
Constructor Summary
Constructors Constructor Description TeeAudioProcessor(TeeAudioProcessor.AudioBufferSink audioBufferSink)Deprecated.Creates a new tee audio processor, sending incoming data to the givenTeeAudioProcessor.AudioBufferSink.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AudioProcessor.AudioFormatonConfigure(AudioProcessor.AudioFormat inputAudioFormat)Deprecated.Called when the processor is configured for a new input format.protected voidonFlush()Deprecated.Called when the processor is flushed, directly or as part of resetting.protected voidonQueueEndOfStream()Deprecated.Called when the end-of-stream is queued to the processor.protected voidonReset()Deprecated.Called when the processor is reset.voidqueueInput(ByteBuffer inputBuffer)Deprecated.Queues audio data between the position and limit of theinputBufferfor processing.-
Methods inherited from class com.google.android.exoplayer2.audio.BaseAudioProcessor
configure, flush, getOutput, hasPendingOutput, isActive, isEnded, queueEndOfStream, replaceOutputBuffer, reset
-
-
-
-
Constructor Detail
-
TeeAudioProcessor
public TeeAudioProcessor(TeeAudioProcessor.AudioBufferSink audioBufferSink)
Deprecated.Creates a new tee audio processor, sending incoming data to the givenTeeAudioProcessor.AudioBufferSink.- Parameters:
audioBufferSink- The audio buffer sink that will receive input queued to this audio processor.
-
-
Method Detail
-
onConfigure
public AudioProcessor.AudioFormat onConfigure(AudioProcessor.AudioFormat inputAudioFormat)
Deprecated.Description copied from class:BaseAudioProcessorCalled when the processor is configured for a new input format.- Overrides:
onConfigurein classBaseAudioProcessor
-
queueInput
public void queueInput(ByteBuffer inputBuffer)
Deprecated.Description copied from interface:AudioProcessorQueues audio data between the position and limit of theinputBufferfor processing. After calling this method, processed output may be available viaAudioProcessor.getOutput(). CallingqueueInput(ByteBuffer)again invalidates any pending output.- Parameters:
inputBuffer- The input buffer to process. It must be a direct byte buffer with native byte order. Its contents are treated as read-only. Its position will be advanced by the number of bytes consumed (which may be zero). The caller retains ownership of the provided buffer.
-
onFlush
protected void onFlush()
Deprecated.Description copied from class:BaseAudioProcessorCalled when the processor is flushed, directly or as part of resetting.- Overrides:
onFlushin classBaseAudioProcessor
-
onQueueEndOfStream
protected void onQueueEndOfStream()
Deprecated.Description copied from class:BaseAudioProcessorCalled when the end-of-stream is queued to the processor.- Overrides:
onQueueEndOfStreamin classBaseAudioProcessor
-
onReset
protected void onReset()
Deprecated.Description copied from class:BaseAudioProcessorCalled when the processor is reset.- Overrides:
onResetin classBaseAudioProcessor
-
-