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


Java ExtractorOutput.track方法代码示例

本文整理汇总了Java中com.google.android.exoplayer2.extractor.ExtractorOutput.track方法的典型用法代码示例。如果您正苦于以下问题:Java ExtractorOutput.track方法的具体用法?Java ExtractorOutput.track怎么用?Java ExtractorOutput.track使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.exoplayer2.extractor.ExtractorOutput的用法示例。


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

示例1: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
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;
  }
}
 
开发者ID:y20k,项目名称:transistor,代码行数:17,代码来源:SeiReader.java

示例2: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:9,代码来源:H264Reader.java

示例3: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
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;
  }
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:16,代码来源:SeiReader.java

示例4: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:9,代码来源:H265Reader.java

示例5: init

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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));
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:10,代码来源:SpliceInfoSectionReader.java

示例6: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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));
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:8,代码来源:Id3Reader.java

示例7: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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;
  }
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:13,代码来源:DvbSubtitleReader.java

示例8: init

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

示例9: init

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:8,代码来源:OggExtractor.java

示例10: init

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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();
  }
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:12,代码来源:FragmentedMp4Extractor.java

示例11: init

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:8,代码来源:RawCcExtractor.java

示例12: init

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@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);
}
 
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:8,代码来源:OggExtractor.java

示例13: init

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

示例14: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@Override
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) {
  idGenerator.generateNewId();
  output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_UNKNOWN);
  output.format(Format.createTextSampleFormat(idGenerator.getFormatId(), "mime", null, 0, 0,
      language, null, 0));
}
 
开发者ID:y20k,项目名称:transistor,代码行数:8,代码来源:TsExtractorTest.java

示例15: createTracks

import com.google.android.exoplayer2.extractor.ExtractorOutput; //导入方法依赖的package包/类
@Override
public void createTracks(ExtractorOutput extractorOutput, TrackIdGenerator idGenerator) {
  idGenerator.generateNewId();
  formatId = idGenerator.getFormatId();
  output = extractorOutput.track(idGenerator.getTrackId(), C.TRACK_TYPE_VIDEO);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:7,代码来源:H262Reader.java


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