Search in sources :

Example 1 with CompositeSequenceableLoaderFactory

use of com.google.android.exoplayer2.source.CompositeSequenceableLoaderFactory in project ExoPlayer by google.

the class SsMediaSource method createPeriod.

@Override
public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs) {
    MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher = createEventDispatcher(id);
    DrmSessionEventListener.EventDispatcher drmEventDispatcher = createDrmEventDispatcher(id);
    SsMediaPeriod period = new SsMediaPeriod(manifest, chunkSourceFactory, mediaTransferListener, compositeSequenceableLoaderFactory, drmSessionManager, drmEventDispatcher, loadErrorHandlingPolicy, mediaSourceEventDispatcher, manifestLoaderErrorThrower, allocator);
    mediaPeriods.add(period);
    return period;
}
Also used : EventDispatcher(com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher) MediaSourceEventListener(com.google.android.exoplayer2.source.MediaSourceEventListener) DrmSessionEventListener(com.google.android.exoplayer2.drm.DrmSessionEventListener)

Example 2 with CompositeSequenceableLoaderFactory

use of com.google.android.exoplayer2.source.CompositeSequenceableLoaderFactory in project ExoPlayer by google.

the class DashMediaSource method createPeriod.

@Override
public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs) {
    int periodIndex = (Integer) id.periodUid - firstPeriodId;
    MediaSourceEventListener.EventDispatcher periodEventDispatcher = createEventDispatcher(id, manifest.getPeriod(periodIndex).startMs);
    DrmSessionEventListener.EventDispatcher drmEventDispatcher = createDrmEventDispatcher(id);
    DashMediaPeriod mediaPeriod = new DashMediaPeriod(firstPeriodId + periodIndex, manifest, baseUrlExclusionList, periodIndex, chunkSourceFactory, mediaTransferListener, drmSessionManager, drmEventDispatcher, loadErrorHandlingPolicy, periodEventDispatcher, elapsedRealtimeOffsetMs, manifestLoadErrorThrower, allocator, compositeSequenceableLoaderFactory, playerEmsgCallback, getPlayerId());
    periodsById.put(mediaPeriod.id, mediaPeriod);
    return mediaPeriod;
}
Also used : EventDispatcher(com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher) MediaSourceEventListener(com.google.android.exoplayer2.source.MediaSourceEventListener) DrmSessionEventListener(com.google.android.exoplayer2.drm.DrmSessionEventListener)

Aggregations

DrmSessionEventListener (com.google.android.exoplayer2.drm.DrmSessionEventListener)2 MediaSourceEventListener (com.google.android.exoplayer2.source.MediaSourceEventListener)2 EventDispatcher (com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher)2