Java 类com.google.android.exoplayer2.upstream.FileDataSourceFactory 实例源码

项目:homerplayer    文件:Player.java   
private void prepareAudioFile(File file, long startPositionMs) {
    Uri fileUri = Uri.fromFile(file);

    DataSource.Factory dataSourceFactory = new FileDataSourceFactory();
    DefaultExtractorsFactory extractorsFactory = new DefaultExtractorsFactory();
    extractorsFactory.setMp3ExtractorFlags(Mp3Extractor.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING);
    MediaSource source = new ExtractorMediaSource(
            fileUri, dataSourceFactory, extractorsFactory, null, null);

    exoPlayer.seekTo(startPositionMs);
    exoPlayer.prepare(source, false, true);
}
项目:Exoplayer2Radio    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int, long)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory,
    @CacheDataSource.Flags int flags, long maxCacheFileSize) {
  this(cache, upstreamFactory, new FileDataSourceFactory(),
      new CacheDataSinkFactory(cache, maxCacheFileSize), flags, null);
}
项目:nuclei-android    文件:ExoPlayerPlayback.java   
protected DataSource.Factory buildFileDataSourceFactory(boolean useBandwidthMeter) {
    return new FileDataSourceFactory(useBandwidthMeter ? BANDWIDTH_METER : null);
}
项目:K-Sonic    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int, long)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory, int flags,
    long maxCacheFileSize) {
  this(cache, upstreamFactory, new FileDataSourceFactory(),
      new CacheDataSinkFactory(cache, maxCacheFileSize), flags, null);
}
项目:videoPickPlayer    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int, long)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory, int flags,
    long maxCacheFileSize) {
  this(cache, upstreamFactory, new FileDataSourceFactory(),
      new CacheDataSinkFactory(cache, maxCacheFileSize), flags, null);
}
项目:projectBlue    文件:ExtractorMediaSourceFactoryProvider.java   
@Override
protected ExtractorMediaSource.Factory create() throws Throwable {
    final ExtractorMediaSource.Factory factory = new ExtractorMediaSource.Factory(new FileDataSourceFactory());
    factory.setMinLoadableRetryCount(ExtractorMediaSource.DEFAULT_MIN_LOADABLE_RETRY_COUNT_LIVE);
    return factory;
}
项目:transistor    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int, long)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory,
    @CacheDataSource.Flags int flags, long maxCacheFileSize) {
  this(cache, upstreamFactory, new FileDataSourceFactory(),
      new CacheDataSinkFactory(cache, maxCacheFileSize), flags, null);
}