Java 类com.google.android.exoplayer2.source.hls.HlsDataSourceFactory 实例源码

项目:transistor    文件:HlsPlaylistTracker.java   
/**
 * @param initialPlaylistUri Uri for the initial playlist of the stream. Can refer a media
 *     playlist or a master playlist.
 * @param dataSourceFactory A factory for {@link DataSource} instances.
 * @param eventDispatcher A dispatcher to notify of events.
 * @param minRetryCount The minimum number of times loads must be retried before
 *     {@link #maybeThrowPlaylistRefreshError(HlsUrl)} and
 *     {@link #maybeThrowPrimaryPlaylistRefreshError()} propagate any loading errors.
 * @param primaryPlaylistListener A callback for the primary playlist change events.
 */
public HlsPlaylistTracker(Uri initialPlaylistUri, HlsDataSourceFactory dataSourceFactory,
    EventDispatcher eventDispatcher, int minRetryCount,
    PrimaryPlaylistListener primaryPlaylistListener,
    ParsingLoadable.Parser<HlsPlaylist> playlistParser) {
  this.initialPlaylistUri = initialPlaylistUri;
  this.dataSourceFactory = dataSourceFactory;
  this.eventDispatcher = eventDispatcher;
  this.minRetryCount = minRetryCount;
  this.primaryPlaylistListener = primaryPlaylistListener;
  this.playlistParser = playlistParser;
  listeners = new ArrayList<>();
  initialPlaylistLoader = new Loader("HlsPlaylistTracker:MasterPlaylist");
  playlistBundles = new IdentityHashMap<>();
  playlistRefreshHandler = new Handler();
}
项目:Exoplayer2Radio    文件:HlsPlaylistTracker.java   
/**
 * @param initialPlaylistUri Uri for the initial playlist of the stream. Can refer a media
 *     playlist or a master playlist.
 * @param dataSourceFactory A factory for {@link DataSource} instances.
 * @param eventDispatcher A dispatcher to notify of events.
 * @param minRetryCount The minimum number of times the load must be retried before blacklisting a
 *     playlist.
 * @param primaryPlaylistListener A callback for the primary playlist change events.
 */
public HlsPlaylistTracker(Uri initialPlaylistUri, HlsDataSourceFactory dataSourceFactory,
    EventDispatcher eventDispatcher, int minRetryCount,
    PrimaryPlaylistListener primaryPlaylistListener) {
  this.initialPlaylistUri = initialPlaylistUri;
  this.dataSourceFactory = dataSourceFactory;
  this.eventDispatcher = eventDispatcher;
  this.minRetryCount = minRetryCount;
  this.primaryPlaylistListener = primaryPlaylistListener;
  listeners = new ArrayList<>();
  initialPlaylistLoader = new Loader("HlsPlaylistTracker:MasterPlaylist");
  playlistParser = new HlsPlaylistParser();
  playlistBundles = new IdentityHashMap<>();
  playlistRefreshHandler = new Handler();
}
项目:K-Sonic    文件:HlsPlaylistTracker.java   
/**
 * @param initialPlaylistUri Uri for the initial playlist of the stream. Can refer a media
 *     playlist or a master playlist.
 * @param dataSourceFactory A factory for {@link DataSource} instances.
 * @param eventDispatcher A dispatcher to notify of events.
 * @param minRetryCount The minimum number of times the load must be retried before blacklisting a
 *     playlist.
 * @param primaryPlaylistListener A callback for the primary playlist change events.
 */
public HlsPlaylistTracker(Uri initialPlaylistUri, HlsDataSourceFactory dataSourceFactory,
    EventDispatcher eventDispatcher, int minRetryCount,
    PrimaryPlaylistListener primaryPlaylistListener) {
  this.initialPlaylistUri = initialPlaylistUri;
  this.dataSourceFactory = dataSourceFactory;
  this.eventDispatcher = eventDispatcher;
  this.minRetryCount = minRetryCount;
  this.primaryPlaylistListener = primaryPlaylistListener;
  listeners = new ArrayList<>();
  initialPlaylistLoader = new Loader("HlsPlaylistTracker:MasterPlaylist");
  playlistParser = new HlsPlaylistParser();
  playlistBundles = new IdentityHashMap<>();
  playlistRefreshHandler = new Handler();
}