com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator Java Examples
The following examples show how to use
com.google.android.exoplayer2.extractor.ts.TsPayloadReader.TrackIdGenerator.
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: DvbSubtitleReader.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { DvbSubtitleInfo subtitleInfo = subtitleInfos.get(i); idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); output.format( Format.createImageSampleFormat( idGenerator.getFormatId(), MimeTypes.APPLICATION_DVBSUBS, null, Format.NO_VALUE, 0, Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null)); outputs[i] = output; } }
Example #2
Source File: DvbSubtitleReader.java From TelePlus-Android with GNU General Public License v2.0 | 6 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { DvbSubtitleInfo subtitleInfo = subtitleInfos.get(i); idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); output.format( Format.createImageSampleFormat( idGenerator.getFormatId(), MimeTypes.APPLICATION_DVBSUBS, null, Format.NO_VALUE, 0, Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null)); outputs[i] = output; } }
Example #3
Source File: DvbSubtitleReader.java From MediaSDK with Apache License 2.0 | 6 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { DvbSubtitleInfo subtitleInfo = subtitleInfos.get(i); idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); output.format( Format.createImageSampleFormat( idGenerator.getFormatId(), MimeTypes.APPLICATION_DVBSUBS, null, Format.NO_VALUE, 0, Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null)); outputs[i] = output; } }
Example #4
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 #5
Source File: DvbSubtitleReader.java From Telegram with GNU General Public License v2.0 | 6 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { DvbSubtitleInfo subtitleInfo = subtitleInfos.get(i); idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); output.format( Format.createImageSampleFormat( idGenerator.getFormatId(), MimeTypes.APPLICATION_DVBSUBS, null, Format.NO_VALUE, 0, Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null)); outputs[i] = output; } }
Example #6
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 #7
Source File: SeiReader.java From TelePlus-Android 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 #8
Source File: DvbSubtitleReader.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { for (int i = 0; i < outputs.length; i++) { DvbSubtitleInfo subtitleInfo = subtitleInfos.get(i); idGenerator.generateNewId(); TrackOutput output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_TEXT); output.format( Format.createImageSampleFormat( idGenerator.getFormatId(), MimeTypes.APPLICATION_DVBSUBS, null, Format.NO_VALUE, 0, Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null)); outputs[i] = output; } }
Example #9
Source File: H265Reader.java From MediaSDK with Apache License 2.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 #10
Source File: Id3Reader.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA); output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null)); }
Example #11
Source File: Id3Reader.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA); output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null)); }
Example #12
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 #13
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 #14
Source File: Ac4Extractor.java From Telegram with GNU General Public License v2.0 | 5 votes |
@Override public void init(ExtractorOutput output) { reader.createTracks( output, new TrackIdGenerator(/* firstTrackId= */ 0, /* trackIdIncrement= */ 1)); output.endTracks(); output.seekMap(new SeekMap.Unseekable(/* durationUs= */ C.TIME_UNSET)); }
Example #15
Source File: H265Reader.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); seiReader.createTracks(extractorOutput, idGenerator); }
Example #16
Source File: Id3Reader.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA); output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null)); }
Example #17
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 #18
Source File: H262Reader.java From MediaSDK with Apache License 2.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 #19
Source File: H264Reader.java From K-Sonic with MIT License | 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 #20
Source File: H264Reader.java From MediaSDK with Apache License 2.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 #21
Source File: SeiReader.java From K-Sonic with MIT License | 5 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); output.format(Format.createTextSampleFormat(idGenerator.getFormatId(), channelMimeType, null, Format.NO_VALUE, channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel, null)); outputs[i] = output; } }
Example #22
Source File: H265Reader.java From K-Sonic with MIT License | 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 #23
Source File: Id3Reader.java From K-Sonic with MIT License | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA); output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null)); }
Example #24
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 #25
Source File: H264Reader.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, allowNonIdrKeyframes, detectAccessUnits); seiReader.createTracks(extractorOutput, idGenerator); }
Example #26
Source File: Ac4Extractor.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public void init(ExtractorOutput output) { reader.createTracks( output, new TrackIdGenerator(/* firstTrackId= */ 0, /* trackIdIncrement= */ 1)); output.endTracks(); output.seekMap(new SeekMap.Unseekable(/* durationUs= */ C.TIME_UNSET)); }
Example #27
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 #28
Source File: Id3Reader.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
@Override public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) { idGenerator.generateNewId(); output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA); output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_ID3, null, Format.NO_VALUE, null)); }
Example #29
Source File: H262Reader.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); if (userDataReader != null) { userDataReader.createTracks(extractorOutput, idGenerator); } }
Example #30
Source File: H264Reader.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, allowNonIdrKeyframes, detectAccessUnits); seiReader.createTracks(extractorOutput, idGenerator); }