org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codecpublic final class RandomizedMp3Decoder extends Object implements org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codec
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().
| Constructor | Description |
|---|---|
RandomizedMp3Decoder() |
| 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) |
public void process(ByteBuffer in, ByteBuffer out)
process in interface org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codecpublic void onConfigured(MediaFormat format, Surface surface, MediaCrypto crypto, int flags)
onConfigured in interface org.robolectric.shadows.ShadowMediaCodec.CodecConfig.Codecpublic ImmutableList<byte[]> getAllOutputBytes()