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

项目:Exoplayer2Radio    文件:PriorityDataSourceFactory.java   
/**
 * @param upstreamFactory A {@link DataSource.Factory} to be used to create an upstream {@link
 *     DataSource} for {@link PriorityDataSource}.
 * @param priorityTaskManager The priority manager to which PriorityDataSource task is registered.
 * @param priority The priority of PriorityDataSource task.
 */
public PriorityDataSourceFactory(Factory upstreamFactory, PriorityTaskManager priorityTaskManager,
    int priority) {
  this.upstreamFactory = upstreamFactory;
  this.priorityTaskManager = priorityTaskManager;
  this.priority = priority;
}
项目:Exoplayer2Radio    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
 *     EventListener)
 */
public CacheDataSourceFactory(Cache cache, Factory upstreamFactory,
    Factory cacheReadDataSourceFactory, DataSink.Factory cacheWriteDataSinkFactory,
    @CacheDataSource.Flags int flags, EventListener eventListener) {
  this.cache = cache;
  this.upstreamFactory = upstreamFactory;
  this.cacheReadDataSourceFactory = cacheReadDataSourceFactory;
  this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
  this.flags = flags;
  this.eventListener = eventListener;
}
项目:K-Sonic    文件:PriorityDataSourceFactory.java   
/**
 * @param upstreamFactory A {@link DataSource.Factory} to be used to create an upstream {@link
 *     DataSource} for {@link PriorityDataSource}.
 * @param priorityTaskManager The priority manager to which PriorityDataSource task is registered.
 * @param priority The priority of PriorityDataSource task.
 */
public PriorityDataSourceFactory(Factory upstreamFactory, PriorityTaskManager priorityTaskManager,
    int priority) {
  this.upstreamFactory = upstreamFactory;
  this.priorityTaskManager = priorityTaskManager;
  this.priority = priority;
}
项目:K-Sonic    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
 *     EventListener)
 */
public CacheDataSourceFactory(Cache cache, Factory upstreamFactory,
    Factory cacheReadDataSourceFactory,
    DataSink.Factory cacheWriteDataSinkFactory, int flags, EventListener eventListener) {
  this.cache = cache;
  this.upstreamFactory = upstreamFactory;
  this.cacheReadDataSourceFactory = cacheReadDataSourceFactory;
  this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
  this.flags = flags;
  this.eventListener = eventListener;
}
项目:videoPickPlayer    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
 *     EventListener)
 */
public CacheDataSourceFactory(Cache cache, Factory upstreamFactory,
    Factory cacheReadDataSourceFactory,
    DataSink.Factory cacheWriteDataSinkFactory, int flags, EventListener eventListener) {
  this.cache = cache;
  this.upstreamFactory = upstreamFactory;
  this.cacheReadDataSourceFactory = cacheReadDataSourceFactory;
  this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
  this.flags = flags;
  this.eventListener = eventListener;
}
项目:transistor    文件:DownloaderConstructorHelper.java   
/**
 * @param cache Cache instance to be used to store downloaded data.
 * @param upstreamDataSourceFactory A {@link Factory} for downloading data.
 * @param cacheReadDataSourceFactory A {@link Factory} for reading data from the cache.
 *     If null, null is passed to {@link Downloader} constructor.
 * @param cacheWriteDataSinkFactory A {@link DataSink.Factory} for writing data to the cache. If
 *     null, null is passed to {@link Downloader} constructor.
 * @param priorityTaskManager If one is given then the download priority is set lower than
 *     loading. If null, null is passed to {@link Downloader} constructor.
 */
public DownloaderConstructorHelper(Cache cache, Factory upstreamDataSourceFactory,
    @Nullable Factory cacheReadDataSourceFactory,
    @Nullable DataSink.Factory cacheWriteDataSinkFactory,
    @Nullable PriorityTaskManager priorityTaskManager) {
  Assertions.checkNotNull(upstreamDataSourceFactory);
  this.cache = cache;
  this.upstreamDataSourceFactory = upstreamDataSourceFactory;
  this.cacheReadDataSourceFactory = cacheReadDataSourceFactory;
  this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
  this.priorityTaskManager = priorityTaskManager;
}
项目:transistor    文件:PriorityDataSourceFactory.java   
/**
 * @param upstreamFactory A {@link DataSource.Factory} to be used to create an upstream {@link
 *     DataSource} for {@link PriorityDataSource}.
 * @param priorityTaskManager The priority manager to which PriorityDataSource task is registered.
 * @param priority The priority of PriorityDataSource task.
 */
public PriorityDataSourceFactory(Factory upstreamFactory, PriorityTaskManager priorityTaskManager,
    int priority) {
  this.upstreamFactory = upstreamFactory;
  this.priorityTaskManager = priorityTaskManager;
  this.priority = priority;
}
项目:transistor    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
 *     EventListener)
 */
public CacheDataSourceFactory(Cache cache, Factory upstreamFactory,
    Factory cacheReadDataSourceFactory, DataSink.Factory cacheWriteDataSinkFactory,
    @CacheDataSource.Flags int flags, EventListener eventListener) {
  this.cache = cache;
  this.upstreamFactory = upstreamFactory;
  this.cacheReadDataSourceFactory = cacheReadDataSourceFactory;
  this.cacheWriteDataSinkFactory = cacheWriteDataSinkFactory;
  this.flags = flags;
  this.eventListener = eventListener;
}
项目:Exoplayer2Radio    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory) {
  this(cache, upstreamFactory, 0);
}
项目:Exoplayer2Radio    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory,
    @CacheDataSource.Flags int flags) {
  this(cache, upstreamFactory, flags, CacheDataSource.DEFAULT_MAX_CACHE_FILE_SIZE);
}
项目: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);
}
项目:K-Sonic    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory, int flags) {
  this(cache, upstreamFactory, flags, CacheDataSource.DEFAULT_MAX_CACHE_FILE_SIZE);
}
项目: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)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory, int flags) {
  this(cache, upstreamFactory, flags, CacheDataSource.DEFAULT_MAX_CACHE_FILE_SIZE);
}
项目: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);
}
项目:transistor    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory) {
  this(cache, upstreamFactory, 0);
}
项目:transistor    文件:CacheDataSourceFactory.java   
/**
 * @see CacheDataSource#CacheDataSource(Cache, DataSource, int)
 */
public CacheDataSourceFactory(Cache cache, DataSource.Factory upstreamFactory,
    @CacheDataSource.Flags int flags) {
  this(cache, upstreamFactory, flags, CacheDataSource.DEFAULT_MAX_CACHE_FILE_SIZE);
}
项目: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);
}
项目:Exoplayer2Radio    文件:DefaultDataSourceFactory.java   
/**
 * @param context A context.
 * @param listener An optional listener.
 * @param baseDataSourceFactory A {@link Factory} to be used to create a base {@link DataSource}
 *     for {@link DefaultDataSource}.
 * @see DefaultDataSource#DefaultDataSource(Context, TransferListener, DataSource)
 */
public DefaultDataSourceFactory(Context context, TransferListener<? super DataSource> listener,
    DataSource.Factory baseDataSourceFactory) {
  this.context = context.getApplicationContext();
  this.listener = listener;
  this.baseDataSourceFactory = baseDataSourceFactory;
}
项目:K-Sonic    文件:DefaultDataSourceFactory.java   
/**
 * @param context A context.
 * @param listener An optional listener.
 * @param baseDataSourceFactory A {@link Factory} to be used to create a base {@link DataSource}
 *     for {@link DefaultDataSource}.
 * @see DefaultDataSource#DefaultDataSource(Context, TransferListener, DataSource)
 */
public DefaultDataSourceFactory(Context context, TransferListener<? super DataSource> listener,
    DataSource.Factory baseDataSourceFactory) {
  this.context = context.getApplicationContext();
  this.listener = listener;
  this.baseDataSourceFactory = baseDataSourceFactory;
}
项目:videoPickPlayer    文件:DefaultDataSourceFactory.java   
/**
 * @param context A context.
 * @param listener An optional listener.
 * @param baseDataSourceFactory A {@link Factory} to be used to create a base {@link DataSource}
 *     for {@link DefaultDataSource}.
 * @see DefaultDataSource#DefaultDataSource(Context, TransferListener, DataSource)
 */
public DefaultDataSourceFactory(Context context, TransferListener<? super DataSource> listener,
    DataSource.Factory baseDataSourceFactory) {
  this.context = context.getApplicationContext();
  this.listener = listener;
  this.baseDataSourceFactory = baseDataSourceFactory;
}
项目:transistor    文件:DefaultDataSourceFactory.java   
/**
 * @param context A context.
 * @param listener An optional listener.
 * @param baseDataSourceFactory A {@link Factory} to be used to create a base {@link DataSource}
 *     for {@link DefaultDataSource}.
 * @see DefaultDataSource#DefaultDataSource(Context, TransferListener, DataSource)
 */
public DefaultDataSourceFactory(Context context, TransferListener<? super DataSource> listener,
    DataSource.Factory baseDataSourceFactory) {
  this.context = context.getApplicationContext();
  this.listener = listener;
  this.baseDataSourceFactory = baseDataSourceFactory;
}
项目:transistor    文件:DownloaderConstructorHelper.java   
/**
 * @param cache Cache instance to be used to store downloaded data.
 * @param upstreamDataSourceFactory A {@link Factory} for downloading data.
 */
public DownloaderConstructorHelper(Cache cache, Factory upstreamDataSourceFactory) {
  this(cache, upstreamDataSourceFactory, null, null, null);
}