Search in sources :

Example 1 with CompositeSequenceableLoaderFactory

use of androidx.media3.exoplayer.source.CompositeSequenceableLoaderFactory in project media by androidx.

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(androidx.media3.exoplayer.source.MediaSourceEventListener.EventDispatcher) MediaSourceEventListener(androidx.media3.exoplayer.source.MediaSourceEventListener) DrmSessionEventListener(androidx.media3.exoplayer.drm.DrmSessionEventListener)

Example 2 with CompositeSequenceableLoaderFactory

use of androidx.media3.exoplayer.source.CompositeSequenceableLoaderFactory in project media by androidx.

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(androidx.media3.exoplayer.source.MediaSourceEventListener.EventDispatcher) MediaSourceEventListener(androidx.media3.exoplayer.source.MediaSourceEventListener) DrmSessionEventListener(androidx.media3.exoplayer.drm.DrmSessionEventListener)

Aggregations

DrmSessionEventListener (androidx.media3.exoplayer.drm.DrmSessionEventListener)2 MediaSourceEventListener (androidx.media3.exoplayer.source.MediaSourceEventListener)2 EventDispatcher (androidx.media3.exoplayer.source.MediaSourceEventListener.EventDispatcher)2