Search in sources :

Example 6 with TrackIdGenerator

use of com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator in project ExoPlayer by google.

the class AdtsReader method createTracks.

@Override
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) {
    idGenerator.generateNewId();
    formatId = idGenerator.getFormatId();
    output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO);
    if (exposeId3) {
        idGenerator.generateNewId();
        id3Output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA);
        id3Output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null));
    } else {
        id3Output = new DummyTrackOutput();
    }
}
Also used : DummyTrackOutput(com.google.android.exoplayer2.extractor.DummyTrackOutput)

Aggregations

TrackIdGenerator (com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator)4 SeekMap (com.google.android.exoplayer2.extractor.SeekMap)2 Format (com.google.android.exoplayer2.Format)1 DummyTrackOutput (com.google.android.exoplayer2.extractor.DummyTrackOutput)1 TrackOutput (com.google.android.exoplayer2.extractor.TrackOutput)1 FakeExtractorOutput (com.google.android.exoplayer2.testutil.FakeExtractorOutput)1 ParsableByteArray (com.google.android.exoplayer2.util.ParsableByteArray)1