use of com.google.android.exoplayer2.upstream.LoaderErrorThrower in project ExoPlayer by google.
the class DashMediaSource method prepareSource.
// MediaSource implementation.
@Override
public void prepareSource(ExoPlayer player, boolean isTopLevelSource, Listener listener) {
sourceListener = listener;
if (sideloadedManifest) {
loaderErrorThrower = new LoaderErrorThrower.Dummy();
processManifest(false);
} else {
dataSource = manifestDataSourceFactory.createDataSource();
loader = new Loader("Loader:DashMediaSource");
loaderErrorThrower = loader;
handler = new Handler();
startLoadingManifest();
}
}
use of com.google.android.exoplayer2.upstream.LoaderErrorThrower in project ExoPlayer by google.
the class DashMediaSource method createPeriod.
@Override
public MediaPeriod createPeriod(int periodIndex, Allocator allocator, long positionUs) {
EventDispatcher periodEventDispatcher = eventDispatcher.copyWithMediaTimeOffsetMs(manifest.getPeriod(periodIndex).startMs);
DashMediaPeriod mediaPeriod = new DashMediaPeriod(firstPeriodId + periodIndex, manifest, periodIndex, chunkSourceFactory, minLoadableRetryCount, periodEventDispatcher, elapsedRealtimeOffsetMs, loaderErrorThrower, allocator);
periodsById.put(mediaPeriod.id, mediaPeriod);
return mediaPeriod;
}
Aggregations