docs/doc/reference/com/google/android/exoplayer2/robolectric/RandomizedMp3Decoder.html
Package com.google.android.exoplayer2.robolectric
All Implemented Interfaces:org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codec
@RequiresApi(29)
public final classRandomizedMp3Decoderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codec
Generates randomized, but correct amount of data on MP3 audio input.
The decoder reads the MP3 header for each input MP3 frame, determines the number of bytes the input frame should inflate to, and writes randomized data of that amount to the output buffer. Decoder randomness can help us identify possible errors in downstream renderers and audio processors. The random bahavior is deterministic, it outputs the same bytes across multiple runs.
All the data written to the output by the decoder can be obtained by getAllOutputBytes().
Constructors | Constructor | Description |
| --- | --- |
| RandomizedMp3Decoder() | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| ImmutableList<byte[]> | getAllOutputBytes() |
Returns all arrays of bytes output from the decoder.
|
| void | onConfigured(MediaFormat format, Surface surface, MediaCrypto crypto, int flags) | |
| void | process(ByteBuffer in, ByteBuffer out) | |
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public RandomizedMp3Decoder()
-
public void process([ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")in,[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer.html "class or interface in java.nio")out)
Specified by:process in interface org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codec
-
public void onConfigured([MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html "class or interface in android.media")format,[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface,[MediaCrypto](https://developer.android.com/reference/android/media/MediaCrypto.html "class or interface in android.media")crypto,
int flags)
Specified by:onConfigured in interface org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codec
-
public[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<byte[]> getAllOutputBytes()
Returns all arrays of bytes output from the decoder. Returns:a list of byte arrays (for each MP3 frame input) that were previously output from the decoder.