public interface TrackOutput
Extractor.| Modifier and Type | Interface and Description |
|---|---|
static class |
TrackOutput.CryptoData
Holds data required to decrypt a sample.
|
| 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 encryptionData)
Called when metadata associated with a sample has been extracted from the stream.
|
void format(Format format)
Format of the track has been extracted from the stream.format - The extracted Format.int sampleData(ExtractorInput input, int length, boolean allowEndOfInput) throws java.io.IOException, java.lang.InterruptedException
input - 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.void sampleData(ParsableByteArray data, int length)
data - A ParsableByteArray from which to read the sample data.length - The number of bytes to read.void sampleMetadata(long timeUs,
int flags,
int size,
int offset,
TrackOutput.CryptoData encryptionData)
The corresponding sample data will have already been passed to the output via calls to
sampleData(ExtractorInput, int, boolean) or
sampleData(ParsableByteArray, int).
timeUs - 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
sampleData(ExtractorInput, int, boolean) or
sampleData(ParsableByteArray, int) since the last byte belonging to the sample
whose metadata is being passed.encryptionData - The encryption data required to decrypt the sample. May be null.