Back to Exoplayer

TeeAudioProcessor (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/audio/TeeAudioProcessor.html

latest7.0 KB
Original Source

Package com.google.android.exoplayer2.audio

Class TeeAudioProcessor


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTeeAudioProcessorextends[BaseAudioProcessor](BaseAudioProcessor.html "class in com.google.android.exoplayer2.audio")

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 AudioProcessorChain when 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 interface | TeeAudioProcessor.AudioBufferSink | Deprecated.

A sink for audio buffers handled by the audio processor. | | static class | TeeAudioProcessor.WavFileAudioBufferSink | Deprecated.

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 given TeeAudioProcessor.AudioBufferSink. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | AudioProcessor.AudioFormat | onConfigure​(AudioProcessor.AudioFormat inputAudioFormat) | Deprecated.

Called when the processor is configured for a new input format. | | protected void | onFlush() | Deprecated.

Called when the processor is flushed, directly or as part of resetting. | | protected void | onQueueEndOfStream() | Deprecated.

Called when the end-of-stream is queued to the processor. | | protected void | onReset() | Deprecated.

Called when the processor is reset. | | void | queueInput​(ByteBuffer inputBuffer) | Deprecated.

Queues audio data between the position and limit of the inputBuffer for processing. |

- 

Methods inherited from class com.google.android.exoplayer2.audio.BaseAudioProcessor

configure, flush, getOutput, hasPendingOutput, isActive, isEnded, queueEndOfStream, replaceOutputBuffer, reset

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

TeeAudioProcessor

public TeeAudioProcessor​([TeeAudioProcessor.AudioBufferSink](TeeAudioProcessor.AudioBufferSink.html "interface in com.google.android.exoplayer2.audio")audioBufferSink)

Deprecated.

Creates a new tee audio processor, sending incoming data to the given TeeAudioProcessor.AudioBufferSink. Parameters:audioBufferSink - The audio buffer sink that will receive input queued to this audio processor.

Method Detail

- 

onConfigure

public[AudioProcessor.AudioFormat](AudioProcessor.AudioFormat.html "class in com.google.android.exoplayer2.audio")onConfigure​([AudioProcessor.AudioFormat](AudioProcessor.AudioFormat.html "class in com.google.android.exoplayer2.audio")inputAudioFormat)

Deprecated.

Description copied from class: BaseAudioProcessor

Called when the processor is configured for a new input format. Overrides:onConfigure in class BaseAudioProcessor

- 

queueInput

public void queueInput​([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")inputBuffer)

Deprecated.

Description copied from interface: AudioProcessor

Queues audio data between the position and limit of the inputBuffer for processing. After calling this method, processed output may be available via AudioProcessor.getOutput(). Calling queueInput(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: BaseAudioProcessor

Called when the processor is flushed, directly or as part of resetting. Overrides:onFlush in class BaseAudioProcessor

- 

onQueueEndOfStream

protected void onQueueEndOfStream()

Deprecated.

Description copied from class: BaseAudioProcessor

Called when the end-of-stream is queued to the processor. Overrides:onQueueEndOfStream in class BaseAudioProcessor

- 

onReset

protected void onReset()

Deprecated.

Description copied from class: BaseAudioProcessor

Called when the processor is reset. Overrides:onReset in class BaseAudioProcessor