public final class DummyTrackOutput extends java.lang.Object implements TrackOutput
TrackOutput implementation.TrackOutput.CryptoData| Constructor and Description |
|---|
DummyTrackOutput() |
| Modifier and Type | Method and Description |
|---|---|
void |
format(Format format)
Called when the
Format of the track has been extracted from the stream. |
int |
sampleData(ExtractorInput input,
int length,
boolean allowEndOfInput)
Called to write sample data to the output.
|
void |
sampleData(ParsableByteArray data,
int length)
Called to write sample data to the output.
|
void |
sampleMetadata(long timeUs,
int flags,
int size,
int offset,
TrackOutput.CryptoData cryptoData)
Called when metadata associated with a sample has been extracted from the stream.
|
public void format(Format format)
TrackOutputFormat of the track has been extracted from the stream.format in interface TrackOutputformat - The extracted Format.public int sampleData(ExtractorInput input, int length, boolean allowEndOfInput) throws java.io.IOException, java.lang.InterruptedException
TrackOutputsampleData in interface TrackOutputinput - An ExtractorInput from which to read the sample data.length - The maximum length to read from the input.allowEndOfInput - True if encountering the end of the input having read no data is
allowed, and should result in C.RESULT_END_OF_INPUT being returned. False if it
should be considered an error, causing an EOFException to be thrown.java.io.IOException - If an error occurred reading from the input.java.lang.InterruptedException - If the thread was interrupted.public void sampleData(ParsableByteArray data, int length)
TrackOutputsampleData in interface TrackOutputdata - A ParsableByteArray from which to read the sample data.length - The number of bytes to read.public void sampleMetadata(long timeUs,
int flags,
int size,
int offset,
TrackOutput.CryptoData cryptoData)
TrackOutput
The corresponding sample data will have already been passed to the output via calls to
TrackOutput.sampleData(ExtractorInput, int, boolean) or
TrackOutput.sampleData(ParsableByteArray, int).
sampleMetadata in interface TrackOutputtimeUs - The media timestamp associated with the sample, in microseconds.flags - Flags associated with the sample. See C.BUFFER_FLAG_*.size - The size of the sample data, in bytes.offset - The number of bytes that have been passed to
TrackOutput.sampleData(ExtractorInput, int, boolean) or
TrackOutput.sampleData(ParsableByteArray, int) since the last byte belonging to the sample
whose metadata is being passed.cryptoData - The encryption data required to decrypt the sample. May be null.