diff --git a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManagerProvider.java b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManagerProvider.java index d8a16fc077..a11af2f8a0 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManagerProvider.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManagerProvider.java @@ -23,7 +23,6 @@ import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import com.google.android.exoplayer2.MediaItem; import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; -import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.util.Util; import com.google.common.primitives.Ints; @@ -51,10 +50,10 @@ public final class DefaultDrmSessionManagerProvider implements DrmSessionManager /** * Sets the {@link HttpDataSource.Factory} to be used for creating {@link HttpMediaDrmCallback * HttpMediaDrmCallbacks} which executes key and provisioning requests over HTTP. If {@code null} - * is passed the {@link DefaultHttpDataSourceFactory} is used. + * is passed the {@link DefaultHttpDataSource.Factory} is used. * * @param drmHttpDataSourceFactory The HTTP data source factory or {@code null} to use {@link - * DefaultHttpDataSourceFactory}. + * DefaultHttpDataSource.Factory}. */ public void setDrmHttpDataSourceFactory( @Nullable HttpDataSource.Factory drmHttpDataSourceFactory) { diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceFactory.java b/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceFactory.java index 3a09452f24..755096bbe9 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceFactory.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceFactory.java @@ -25,7 +25,7 @@ import com.google.android.exoplayer2.drm.DrmSessionManager; import com.google.android.exoplayer2.drm.DrmSessionManagerProvider; import com.google.android.exoplayer2.drm.HttpMediaDrmCallback; import com.google.android.exoplayer2.offline.StreamKey; -import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; +import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; import com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy; import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy; @@ -83,7 +83,7 @@ public interface MediaSourceFactory { * #setDrmSessionManager(DrmSessionManager) concrete DrmSessionManager} are provided. * * @param drmHttpDataSourceFactory The HTTP data source factory, or {@code null} to use {@link - * DefaultHttpDataSourceFactory}. + * DefaultHttpDataSource.Factory}. * @return This factory, for convenience. * @deprecated Use {@link #setDrmSessionManagerProvider(DrmSessionManagerProvider)} and pass an * implementation that configures the returned {@link DrmSessionManager} with the desired diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java index 2029b370de..513ab6403c 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java @@ -51,7 +51,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType; * CacheDataSource.Factory cacheDataSourceFactory = * new CacheDataSource.Factory() * .setCache(cache) - * .setUpstreamDataSourceFactory(new DefaultHttpDataSourceFactory(userAgent)); + * .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()); * // Create a downloader for the first representation of the first adaptation set of the first * // period. * DashDownloader dashDownloader = diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java index e68ffcc7c9..0fe719c263 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloader.java @@ -44,7 +44,7 @@ import java.util.concurrent.Executor; * CacheDataSource.Factory cacheDataSourceFactory = * new CacheDataSource.Factory() * .setCache(cache) - * .setUpstreamDataSourceFactory(new DefaultHttpDataSourceFactory(userAgent)); + * .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()); * // Create a downloader for the first variant in a master playlist. * HlsDownloader hlsDownloader = * new HlsDownloader( diff --git a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java index 416e4b92a6..e5def39cd1 100644 --- a/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java +++ b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloader.java @@ -41,7 +41,7 @@ import java.util.concurrent.Executor; * CacheDataSource.Factory cacheDataSourceFactory = * new CacheDataSource.Factory() * .setCache(cache) - * .setUpstreamDataSourceFactory(new DefaultHttpDataSourceFactory(userAgent)); + * .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()); * // Create a downloader for the first track of the first stream element. * SsDownloader ssDownloader = * new SsDownloader( diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java index 418cb69176..0518fec094 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java @@ -30,7 +30,7 @@ import com.google.android.exoplayer2.source.dash.manifest.Representation; import com.google.android.exoplayer2.source.dash.offline.DashDownloader; import com.google.android.exoplayer2.testutil.HostActivity; import com.google.android.exoplayer2.upstream.DataSource; -import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; +import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; import com.google.android.exoplayer2.upstream.cache.CacheDataSource; import com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor; import com.google.android.exoplayer2.upstream.cache.SimpleCache; @@ -73,7 +73,7 @@ public final class DashDownloadTest { cache = new SimpleCache( tempFolder, new NoOpCacheEvictor(), new ExoDatabaseProvider(testRule.getActivity())); - httpDataSourceFactory = new DefaultHttpDataSourceFactory("ExoPlayer", null); + httpDataSourceFactory = new DefaultHttpDataSource.Factory(); offlineDataSourceFactory = new CacheDataSource.Factory().setCache(cache); } diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java index 9d962c281d..dd8f225075 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java @@ -35,7 +35,7 @@ import com.google.android.exoplayer2.source.dash.manifest.DashManifest; import com.google.android.exoplayer2.testutil.ActionSchedule; import com.google.android.exoplayer2.testutil.HostActivity; import com.google.android.exoplayer2.upstream.DataSource; -import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory; +import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.Util; import java.io.IOException; @@ -51,10 +51,9 @@ import org.junit.runner.RunWith; public final class DashWidevineOfflineTest { private static final String TAG = "DashWidevineOfflineTest"; - private static final String USER_AGENT = "ExoPlayerPlaybackTests"; private DashTestRunner testRunner; - private DefaultHttpDataSourceFactory httpDataSourceFactory; + private DefaultHttpDataSource.Factory httpDataSourceFactory; private OfflineLicenseHelper offlineLicenseHelper; private byte[] offlineLicenseKeySetId; @@ -75,7 +74,7 @@ public final class DashWidevineOfflineTest { boolean useL1Widevine = DashTestRunner.isL1WidevineAvailable(MimeTypes.VIDEO_H264); String widevineLicenseUrl = DashTestData.getWidevineLicenseUrl(true, useL1Widevine); - httpDataSourceFactory = new DefaultHttpDataSourceFactory(USER_AGENT); + httpDataSourceFactory = new DefaultHttpDataSource.Factory(); if (Util.SDK_INT >= 18) { offlineLicenseHelper = OfflineLicenseHelper.newWidevineInstance(