Java 类com.google.android.exoplayer2.extractor.ExtractorOutput 实例源码

项目:transistor    文件:SeiReader.java   
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, null, Format.NO_VALUE,
        channelFormat.selectionFlags, channelFormat.language, channelFormat.accessibilityChannel,
        null));
    outputs[i] = output;
  }
}
项目:Exoplayer2Radio    文件:H264Reader.java   
@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);
}
项目:Exoplayer2Radio    文件:AdtsExtractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new AdtsReader(true);
  reader.createTracks(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:Exoplayer2Radio    文件:Ac3Extractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new Ac3Reader(); // TODO: Add support for embedded ID3.
  reader.createTracks(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:Exoplayer2Radio    文件:SeiReader.java   
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;
  }
}
项目:Exoplayer2Radio    文件:H265Reader.java   
@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);
}
项目:Exoplayer2Radio    文件:SpliceInfoSectionReader.java   
@Override
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput,
    TsPayloadReader.TrackIdGenerator idGenerator) {
  this.timestampAdjuster = timestampAdjuster;
  idGenerator.generateNewId();
  output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA);
  output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_SCTE35,
      null, Format.NO_VALUE, null));
}
项目:Exoplayer2Radio    文件:Id3Reader.java   
@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));
}
项目:Exoplayer2Radio    文件:DvbSubtitleReader.java   
@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,
        Collections.singletonList(subtitleInfo.initializationData), subtitleInfo.language, null));
    outputs[i] = output;
  }
}
项目:Exoplayer2Radio    文件:WavExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = output.track(0, C.TRACK_TYPE_AUDIO);
  wavHeader = null;
  output.endTracks();
}
项目:Exoplayer2Radio    文件:OggExtractor.java   
@Override
public void init(ExtractorOutput output) {
  TrackOutput trackOutput = output.track(0, C.TRACK_TYPE_AUDIO);
  output.endTracks();
  // TODO: fix the case if sniff() isn't called
  streamReader.init(output, trackOutput);
}
项目:Exoplayer2Radio    文件:StreamReader.java   
void init(ExtractorOutput output, TrackOutput trackOutput) {
  this.extractorOutput = output;
  this.trackOutput = trackOutput;
  this.oggPacket = new OggPacket();

  reset(true);
}
项目:Exoplayer2Radio    文件:FragmentedMp4Extractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  if (sideloadedTrack != null) {
    TrackBundle bundle = new TrackBundle(output.track(0, sideloadedTrack.type));
    bundle.init(sideloadedTrack, new DefaultSampleValues(0, 0, 0, 0));
    trackBundles.put(0, bundle);
    maybeInitExtraTracks();
    extractorOutput.endTracks();
  }
}
项目:Exoplayer2Radio    文件:RawCcExtractor.java   
@Override
public void init(ExtractorOutput output) {
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
  trackOutput = output.track(0, C.TRACK_TYPE_TEXT);
  output.endTracks();
  trackOutput.format(format);
}
项目:K-Sonic    文件:H264Reader.java   
@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);
}
项目:K-Sonic    文件:AdtsExtractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new AdtsReader(true);
  reader.createTracks(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:K-Sonic    文件:Ac3Extractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new Ac3Reader(); // TODO: Add support for embedded ID3.
  reader.createTracks(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:K-Sonic    文件:SeiReader.java   
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;
  }
}
项目:K-Sonic    文件:H265Reader.java   
@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);
}
项目:K-Sonic    文件:SpliceInfoSectionReader.java   
@Override
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput,
    TsPayloadReader.TrackIdGenerator idGenerator) {
  this.timestampAdjuster = timestampAdjuster;
  idGenerator.generateNewId();
  output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA);
  output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_SCTE35,
      null, Format.NO_VALUE, null));
}
项目:K-Sonic    文件:Id3Reader.java   
@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));
}
项目:K-Sonic    文件:WavExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = output.track(0, C.TRACK_TYPE_AUDIO);
  wavHeader = null;
  output.endTracks();
}
项目:K-Sonic    文件:OggExtractor.java   
@Override
public void init(ExtractorOutput output) {
  TrackOutput trackOutput = output.track(0, C.TRACK_TYPE_AUDIO);
  output.endTracks();
  // TODO: fix the case if sniff() isn't called
  streamReader.init(output, trackOutput);
}
项目:K-Sonic    文件:StreamReader.java   
void init(ExtractorOutput output, TrackOutput trackOutput) {
  this.extractorOutput = output;
  this.trackOutput = trackOutput;
  this.oggPacket = new OggPacket();

  reset(true);
}
项目:K-Sonic    文件:FragmentedMp4Extractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  if (sideloadedTrack != null) {
    TrackBundle bundle = new TrackBundle(output.track(0, sideloadedTrack.type));
    bundle.init(sideloadedTrack, new DefaultSampleValues(0, 0, 0, 0));
    trackBundles.put(0, bundle);
    maybeInitExtraTracks();
    extractorOutput.endTracks();
  }
}
项目:K-Sonic    文件:RawCcExtractor.java   
@Override
public void init(ExtractorOutput output) {
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
  trackOutput = output.track(0, C.TRACK_TYPE_TEXT);
  output.endTracks();
  trackOutput.format(format);
}
项目:videoPickPlayer    文件:AdtsExtractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new AdtsReader(true);
  reader.init(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:videoPickPlayer    文件:Ac3Extractor.java   
@Override
public void init(ExtractorOutput output) {
  reader = new Ac3Reader(); // TODO: Add support for embedded ID3.
  reader.init(output, new TrackIdGenerator(0, 1));
  output.endTracks();
  output.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
}
项目:videoPickPlayer    文件:WavExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = output.track(0);
  wavHeader = null;
  output.endTracks();
}
项目:videoPickPlayer    文件:OggExtractor.java   
@Override
public void init(ExtractorOutput output) {
  TrackOutput trackOutput = output.track(0);
  output.endTracks();
  // TODO: fix the case if sniff() isn't called
  streamReader.init(output, trackOutput);
}
项目:videoPickPlayer    文件:StreamReader.java   
void init(ExtractorOutput output, TrackOutput trackOutput) {
  this.extractorOutput = output;
  this.trackOutput = trackOutput;
  this.oggPacket = new OggPacket();

  reset(true);
}
项目:videoPickPlayer    文件:FragmentedMp4Extractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  if (sideloadedTrack != null) {
    TrackBundle bundle = new TrackBundle(output.track(0));
    bundle.init(sideloadedTrack, new DefaultSampleValues(0, 0, 0, 0));
    trackBundles.put(0, bundle);
    extractorOutput.endTracks();
  }
}
项目:videoPickPlayer    文件:RawCcExtractor.java   
@Override
public void init(ExtractorOutput output) {
  this.extractorOutput = output;
  extractorOutput.seekMap(new SeekMap.Unseekable(C.TIME_UNSET));
  trackOutput = extractorOutput.track(0);
  extractorOutput.endTracks();

  trackOutput.format(Format.createTextSampleFormat(null, MimeTypes.APPLICATION_CEA608,
      null, Format.NO_VALUE, 0, null, null));
}
项目:Komica    文件:FlacExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = extractorOutput.track(0);
  extractorOutput.endTracks();
  try {
    decoderJni = new FlacDecoderJni();
  } catch (FlacDecoderException e) {
    throw new RuntimeException(e);
  }
}
项目:Jockey    文件:FlacExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = extractorOutput.track(0, C.TRACK_TYPE_AUDIO);
  extractorOutput.endTracks();
  try {
    decoderJni = new FlacDecoderJni();
  } catch (FlacDecoderException e) {
    throw new RuntimeException(e);
  }
}
项目:transistor    文件:FlacExtractor.java   
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = extractorOutput.track(0, C.TRACK_TYPE_AUDIO);
  extractorOutput.endTracks();
  try {
    decoderJni = new FlacDecoderJni();
  } catch (FlacDecoderException e) {
    throw new RuntimeException(e);
  }
}
项目:transistor    文件:H264Reader.java   
@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);
}
项目:transistor    文件:H265Reader.java   
@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);
}
项目:transistor    文件:SpliceInfoSectionReader.java   
@Override
public void init(TimestampAdjuster timestampAdjuster, ExtractorOutput extractorOutput,
    TsPayloadReader.TrackIdGenerator idGenerator) {
  this.timestampAdjuster = timestampAdjuster;
  idGenerator.generateNewId();
  output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_METADATA);
  output.format(Format.createSampleFormat(idGenerator.getFormatId(), MimeTypes.APPLICATION_SCTE35,
      null, Format.NO_VALUE, null));
}
项目:transistor    文件:Id3Reader.java   
@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));
}