本文整理汇总了Java中com.google.android.exoplayer2.upstream.FileDataSourceFactory类的典型用法代码示例。如果您正苦于以下问题:Java FileDataSourceFactory类的具体用法?Java FileDataSourceFactory怎么用?Java FileDataSourceFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileDataSourceFactory类属于com.google.android.exoplayer2.upstream包,在下文中一共展示了FileDataSourceFactory类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: prepareAudioFile
import com.google.android.exoplayer2.upstream.FileDataSourceFactory; //导入依赖的package包/类
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);
}
开发者ID:msimonides,项目名称:homerplayer,代码行数:13,代码来源:Player.java
示例2: CacheDataSourceFactory
import com.google.android.exoplayer2.upstream.FileDataSourceFactory; //导入依赖的package包/类
/**
* @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);
}
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:9,代码来源:CacheDataSourceFactory.java
示例3: buildFileDataSourceFactory
import com.google.android.exoplayer2.upstream.FileDataSourceFactory; //导入依赖的package包/类
protected DataSource.Factory buildFileDataSourceFactory(boolean useBandwidthMeter) {
return new FileDataSourceFactory(useBandwidthMeter ? BANDWIDTH_METER : null);
}
开发者ID:lifechurch,项目名称:nuclei-android,代码行数:4,代码来源:ExoPlayerPlayback.java
示例4: CacheDataSourceFactory
import com.google.android.exoplayer2.upstream.FileDataSourceFactory; //导入依赖的package包/类
/**
* @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);
}
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:9,代码来源:CacheDataSourceFactory.java
示例5: create
import com.google.android.exoplayer2.upstream.FileDataSourceFactory; //导入依赖的package包/类
@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;
}
开发者ID:danrien,项目名称:projectBlue,代码行数:7,代码来源:ExtractorMediaSourceFactoryProvider.java
注:本文中的com.google.android.exoplayer2.upstream.FileDataSourceFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论