当前位置: 首页>>代码示例>>Java>>正文


Java ExtractorOutput类代码示例

本文整理汇总了Java中com.google.android.exoplayer.extractor.ExtractorOutput的典型用法代码示例。如果您正苦于以下问题:Java ExtractorOutput类的具体用法?Java ExtractorOutput怎么用?Java ExtractorOutput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ExtractorOutput类属于com.google.android.exoplayer.extractor包,在下文中一共展示了ExtractorOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: consume

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void consume(ParsableByteArray data, boolean payloadUnitStartIndicator,
    ExtractorOutput output) {
  // Skip pointer.
  if (payloadUnitStartIndicator) {
    int pointerField = data.readUnsignedByte();
    data.skipBytes(pointerField);
  }

  data.readBytes(patScratch, 3);
  patScratch.skipBits(12); // table_id (8), section_syntax_indicator (1), '0' (1), reserved (2)
  int sectionLength = patScratch.readBits(12);
  // transport_stream_id (16), reserved (2), version_number (5), current_next_indicator (1),
  // section_number (8), last_section_number (8)
  data.skipBytes(5);

  int programCount = (sectionLength - 9) / 4;
  for (int i = 0; i < programCount; i++) {
    data.readBytes(patScratch, 4);
    patScratch.skipBits(19); // program_number (16), reserved (3)
    int pid = patScratch.readBits(13);
    tsPayloadReaders.put(pid, new PmtReader());
  }

  // Skip CRC_32.
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:27,代码来源:TsExtractor.java

示例2: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  this.output = output;
  this.trackOutput = output.track(0);
  output.endTracks();

  try {
    decoder = new FlacJni();
  } catch (FlacDecoderException e) {
    throw new RuntimeException(e);
  }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:13,代码来源:FlacExtractor.java

示例3: consume

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void consume(ParsableByteArray data, boolean payloadUnitStartIndicator,
    ExtractorOutput output) {
  // Skip pointer.
  if (payloadUnitStartIndicator) {
    int pointerField = data.readUnsignedByte();
    data.skipBytes(pointerField);
  }

  data.readBytes(patScratch, 3);
  patScratch.skipBits(12); // table_id (8), section_syntax_indicator (1), '0' (1), reserved (2)
  int sectionLength = patScratch.readBits(12);
  // transport_stream_id (16), reserved (2), version_number (5), current_next_indicator (1),
  // section_number (8), last_section_number (8)
  data.skipBytes(5);

  int programCount = (sectionLength - 9) / 4;
  for (int i = 0; i < programCount; i++) {
    data.readBytes(patScratch, 4);
    int programNumber = patScratch.readBits(16);
    patScratch.skipBits(3); // reserved (3)
    if (programNumber == 0) {
      patScratch.skipBits(13); // network_PID (13)
    } else {
      int pid = patScratch.readBits(13);
      tsPayloadReaders.put(pid, new PmtReader());
    }
  }

  // Skip CRC_32.
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:32,代码来源:TsExtractor.java

示例4: consume

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
/**
 * Consumes the payload of a PS packet.
 *
 * @param data The PES packet. The position will be set to the start of the payload.
 * @param output The output to which parsed data should be written.
 */
public void consume(ParsableByteArray data, ExtractorOutput output) {
  data.readBytes(pesScratch.data, 0, 3);
  pesScratch.setPosition(0);
  parseHeader();
  data.readBytes(pesScratch.data, 0, extendedHeaderLength);
  pesScratch.setPosition(0);
  parseHeaderExtension();
  pesPayloadReader.packetStarted(timeUs, true);
  pesPayloadReader.consume(data);
  // We always have complete PES packets with program stream.
  pesPayloadReader.packetFinished();
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:19,代码来源:PsExtractor.java

示例5: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = output.track(0);
  wavHeader = null;
  output.endTracks();
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:8,代码来源:WavExtractor.java

示例6: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public final 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();
  }
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:11,代码来源:FragmentedMp4Extractor.java

示例7: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  adtsReader = new AdtsReader(output.track(0));
  output.endTracks();
  output.seekMap(SeekMap.UNSEEKABLE);
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:7,代码来源:AdtsExtractor.java

示例8: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  this.output = output;
  output.seekMap(SeekMap.UNSEEKABLE);
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:6,代码来源:TsExtractor.java

示例9: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:5,代码来源:Mp4Extractor.java

示例10: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  extractorOutput = output;
  trackOutput = output.track(0);
  extractorOutput.endTracks();
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:7,代码来源:FragmentedMp4Extractor.java

示例11: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput extractorOutput) {
  this.extractorOutput = extractorOutput;
  trackOutput = extractorOutput.track(0);
  extractorOutput.endTracks();
}
 
开发者ID:XueyanLiu,项目名称:miku,代码行数:7,代码来源:Mp3Extractor.java

示例12: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  adtsReader = new AdtsReader(output.track(0), output.track(1));
  output.endTracks();
  output.seekMap(SeekMap.UNSEEKABLE);
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:7,代码来源:AdtsExtractor.java

示例13: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  TrackOutput trackOutput = output.track(0);
  output.endTracks();
  streamReader.init(output, trackOutput);
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:7,代码来源:OggExtractor.java

示例14: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
void init(ExtractorOutput output, TrackOutput trackOutput) {
  this.extractorOutput = output;
  this.trackOutput = trackOutput;
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:5,代码来源:StreamReader.java

示例15: init

import com.google.android.exoplayer.extractor.ExtractorOutput; //导入依赖的package包/类
@Override
public void init(ExtractorOutput output) {
  this.extractorOutput = output;
}
 
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:5,代码来源:FlvExtractor.java


注:本文中的com.google.android.exoplayer.extractor.ExtractorOutput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。