docs/doc/reference/com/google/android/exoplayer2/transformer/SampleConsumer.html
Package com.google.android.exoplayer2.transformer
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceSampleConsumer
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.
Consumer of encoded media samples, raw audio or raw video frames.
All Methods Instance Methods Default Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| default ColorInfo | getExpectedInputColorInfo() |
Deprecated.
Returns the expected input ColorInfo.
|
| default DecoderInputBuffer | getInputBuffer() |
Deprecated.
Returns a DecoderInputBuffer, if available.
|
| default Surface | getInputSurface() |
Deprecated.
Returns the input Surface, where the consumer reads input frames from.
|
| default int | getPendingVideoFrameCount() |
Deprecated.
Returns the number of input video frames pending in the consumer.
|
| default boolean | queueInputBitmap(Bitmap inputBitmap, long durationUs, int frameRate) |
Deprecated.
Attempts to provide an input Bitmap to the consumer.
|
| default boolean | queueInputBuffer() |
Deprecated.
Attempts to queue new input to the consumer.
|
| default boolean | queueInputTexture(int texId, long presentationTimeUs) |
Deprecated.
Attempts to provide an input texture to the consumer.
|
| default boolean | registerVideoFrame(long presentationTimeUs) |
Deprecated.
Attempts to register a video frame to the consumer.
|
| default void | setOnInputFrameProcessedListener(OnInputFrameProcessedListener listener) |
Deprecated.
Provides a OnInputFrameProcessedListener to the consumer.
|
| default void | signalEndOfVideoInput() |
Deprecated.
Informs the consumer that no further input frames will be rendered. |
-
@Nullable
default[DecoderInputBuffer](../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")getInputBuffer()
Deprecated.
Returns a DecoderInputBuffer, if available.
This buffer should be filled with new input data and queued to the consumer.
If this method returns a non-null buffer:
- The buffer's [data](../decoder/DecoderInputBuffer.html#data) is non-null.
- The same buffer instance is returned if this method is called multiple times before [queuing](#queueInputBuffer()) input.
Should only be used for compressed data and raw audio data.
-
default boolean queueInputBuffer()
Deprecated.
Attempts to queue new input to the consumer.
The input buffer from getInputBuffer() should be filled with the new input before calling this method.
An input buffer should not be used anymore after it has been successfully queued.
Should only be used for compressed data and raw audio data.
Returns:Whether the input was successfully queued. If false, the caller should try again later.
-
default boolean queueInputBitmap([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")inputBitmap,
long durationUs,
int frameRate)
Deprecated.
Attempts to provide an input Bitmap to the consumer.
Should only be used for image data.
Parameters:inputBitmap - The Bitmap to queue to the consumer.durationUs - The duration for which to display the inputBitmap, in microseconds.frameRate - The frame rate at which to display the inputBitmap, in frames per second.Returns:Whether the Bitmap was successfully queued. If false, the caller should try again later.
-
default void setOnInputFrameProcessedListener([OnInputFrameProcessedListener](../util/OnInputFrameProcessedListener.html "interface in com.google.android.exoplayer2.util")listener)
Deprecated.
Provides a OnInputFrameProcessedListener to the consumer.
Should only be used for raw video data when input is provided by texture ID.
Parameters:listener - The OnInputFrameProcessedListener.
-
default boolean queueInputTexture(int texId,
long presentationTimeUs)
Deprecated.
Attempts to provide an input texture to the consumer.
Should only be used for raw video data.
Parameters:texId - The ID of the texture to queue to the consumer.presentationTimeUs - The presentation time for the texture, in microseconds.Returns:Whether the texture was successfully queued. If false, the caller should try again later.
-
default[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")getInputSurface()
Deprecated.
Returns the input Surface, where the consumer reads input frames from.
Should only be used for raw video data.
-
default[ColorInfo](../video/ColorInfo.html "class in com.google.android.exoplayer2.video")getExpectedInputColorInfo()
Deprecated.
Returns the expected input ColorInfo.
Should only be used for raw video data.
-
default int getPendingVideoFrameCount()
Deprecated.
Returns the number of input video frames pending in the consumer. Pending input frames are frames that have been registered but not processed off the input surface yet.
Should only be used for raw video data.
-
default boolean registerVideoFrame(long presentationTimeUs)
Deprecated.
Attempts to register a video frame to the consumer.
Each frame to consume should be registered using this method. After a frame is successfully registered, it should be rendered to the input surface.
Should only be used for raw video data.
Parameters:presentationTimeUs - The presentation time of the frame to register, in microseconds.Returns:Whether the frame was successfully registered. If false, the caller should try again later.
-
default void signalEndOfVideoInput()
Deprecated.
Informs the consumer that no further input frames will be rendered.
Should only be used for raw video data.