Java Code Examples for com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator#getFormatId()
The following examples show how to use
com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator#getFormatId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SeiReader.java From Telegram with GNU General Public License v2.0 | 6 votes |
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); Format channelFormat = closedCaptionFormats.get(i); String channelMimeType = channelFormat.sampleMimeType; Assertions.checkArgument(MimeTypes.APPLICATION_CEA608.equals(channelMimeType) || MimeTypes.APPLICATION_CEA708.equals(channelMimeType), "Invalid closed caption mime type provided: " + channelMimeType); String formatId = channelFormat.id != null ? channelFormat.id : idGenerator.getFormatId(); output.format( Format.createTextSampleFormat( formatId, channelMimeType, /* codecs= */ null, /* bitrate= */ Format.NO_VALUE, channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel, /* drmInitData= */ null, Format.OFFSET_SAMPLE_RELATIVE, channelFormat.initializationData)); outputs[i] = output; } }
Example 2
Source File: SeiReader.java From MediaSDK with Apache License 2.0 | 6 votes |
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); Format channelFormat = closedCaptionFormats.get(i); String channelMimeType = channelFormat.sampleMimeType; Assertions.checkArgument(MimeTypes.APPLICATION_CEA608.equals(channelMimeType) || MimeTypes.APPLICATION_CEA708.equals(channelMimeType), "Invalid closed caption mime type provided: " + channelMimeType); String formatId = channelFormat.id != null ? channelFormat.id : idGenerator.getFormatId(); output.format( Format.createTextSampleFormat( formatId, channelMimeType, /* codecs= */ null, /* bitrate= */ Format.NO_VALUE, channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel, /* drmInitData= */ null, Format.OFFSET_SAMPLE_RELATIVE, channelFormat.initializationData)); outputs[i] = output; } }
Example 3
Source File: SeiReader.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); Format channelFormat = closedCaptionFormats.get(i); String channelMimeType = channelFormat.sampleMimeType; Assertions.checkArgument(MimeTypes.APPLICATION_CEA608.equals(channelMimeType) || MimeTypes.APPLICATION_CEA708.equals(channelMimeType), "Invalid closed caption mime type provided: " + channelMimeType); String formatId = channelFormat.id != null ? channelFormat.id : idGenerator.getFormatId(); output.format( Format.createTextSampleFormat( formatId, channelMimeType, /* codecs= */ null, /* bitrate= */ Format.NO_VALUE, channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel, /* drmInitData= */ null, Format.OFFSET_SAMPLE_RELATIVE, channelFormat.initializationData)); outputs[i] = output; } }
Example 4
Source File: H265Reader.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO); sampleReader = new SampleReader(output); seiReader.createTracks(extractorOutput, idGenerator); }
Example 5
Source File: H265Reader.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO); sampleReader = new SampleReader(output); seiReader.createTracks(extractorOutput, idGenerator); }
Example 6
Source File: H264Reader.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO); sampleReader = new SampleReader(output, allowNonIdrKeyframes, detectAccessUnits); seiReader.createTracks(extractorOutput, idGenerator); }
Example 7
Source File: H262Reader.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO); if (userDataReader != null) { userDataReader.createTracks(extractorOutput, idGenerator); } }
Example 8
Source File: H262Reader.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO); if (userDataReader != null) { userDataReader.createTracks(extractorOutput, idGenerator); } }
Example 9
Source File: LatmReader.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); formatId = idGenerator.getFormatId(); }
Example 10
Source File: Ac3Reader.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator generator) { generator.generateNewId(); trackFormatId = generator.getFormatId(); output = extractorOutput.track(generator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 11
Source File: MpegAudioReader.java From MediaSDK with Apache License 2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 12
Source File: Ac4Reader.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator generator) { generator.generateNewId(); trackFormatId = generator.getFormatId(); output = extractorOutput.track(generator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 13
Source File: DtsReader.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 14
Source File: MpegAudioReader.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 15
Source File: Ac3Reader.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator generator) { generator.generateNewId(); trackFormatId = generator.getFormatId(); output = extractorOutput.track(generator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 16
Source File: DtsReader.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 17
Source File: MpegAudioReader.java From K-Sonic with MIT License | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 18
Source File: Ac3Reader.java From MediaSDK with Apache License 2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator generator) { generator.generateNewId(); trackFormatId = generator.getFormatId(); output = extractorOutput.track(generator.getTrackId(), C.TRACK_TYPE_AUDIO); }
Example 19
Source File: LatmReader.java From MediaSDK with Apache License 2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); formatId = idGenerator.getFormatId(); }
Example 20
Source File: DtsReader.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); formatId = idGenerator.getFormatId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_AUDIO); }