Search in sources :

Example 26 with BaseUrl

use of com.google.android.exoplayer2.source.dash.manifest.BaseUrl in project ExoPlayer by google.

the class DefaultDashChunkSource method updateSelectedBaseUrl.

private RepresentationHolder updateSelectedBaseUrl(int trackIndex) {
    RepresentationHolder representationHolder = representationHolders[trackIndex];
    @Nullable BaseUrl selectedBaseUrl = baseUrlExclusionList.selectBaseUrl(representationHolder.representation.baseUrls);
    if (selectedBaseUrl != null && !selectedBaseUrl.equals(representationHolder.selectedBaseUrl)) {
        representationHolder = representationHolder.copyWithNewSelectedBaseUrl(selectedBaseUrl);
        representationHolders[trackIndex] = representationHolder;
    }
    return representationHolder;
}
Also used : BaseUrl(com.google.android.exoplayer2.source.dash.manifest.BaseUrl) Nullable(androidx.annotation.Nullable)

Aggregations

BaseUrl (com.google.android.exoplayer2.source.dash.manifest.BaseUrl)17 Test (org.junit.Test)14 ArrayList (java.util.ArrayList)9 Nullable (androidx.annotation.Nullable)7 SingleSegmentBase (com.google.android.exoplayer2.source.dash.manifest.SegmentBase.SingleSegmentBase)6 Random (java.util.Random)5 Format (com.google.android.exoplayer2.Format)4 RangedUri (com.google.android.exoplayer2.source.dash.manifest.RangedUri)4 Representation (com.google.android.exoplayer2.source.dash.manifest.Representation)4 Uri (android.net.Uri)3 Pair (android.util.Pair)3 DataSpec (com.google.android.exoplayer2.upstream.DataSpec)3 LoadErrorHandlingPolicy (com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy)3 SystemClock (android.os.SystemClock)2 ApplicationProvider (androidx.test.core.app.ApplicationProvider)2 AndroidJUnit4 (androidx.test.ext.junit.runners.AndroidJUnit4)2 C (com.google.android.exoplayer2.C)2 PlayerId (com.google.android.exoplayer2.analytics.PlayerId)2 SchemeData (com.google.android.exoplayer2.drm.DrmInitData.SchemeData)2 LoadEventInfo (com.google.android.exoplayer2.source.LoadEventInfo)2