From 8374c6340998c224c5da1041fc84cb9f0b2dfb8f Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 7 Feb 2022 15:18:20 +0000 Subject: [PATCH] Remove deprecated ProgressiveMediaSource.Factory setters #minor-release PiperOrigin-RevId: 426909957 --- RELEASENOTES.md | 7 ++++ .../source/ProgressiveMediaSource.java | 34 ------------------- 2 files changed, 7 insertions(+), 34 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 82b73f50ac..cd383e4736 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -173,6 +173,13 @@ * Remove `ActionFile` and `ActionFileUpgradeUtil`. Use ExoPlayer 2.16.1 or before to use `ActionFileUpgradeUtil` to merge legacy action files into `DefaultDownloadIndex`. + * Remove `ProgressiveMediaSource#setExtractorsFactory`. Use + `ProgressiveMediaSource.Factory(DataSource.Factory, ExtractorsFactory)` + constructor instead. + * Remove `ProgressiveMediaSource.Factory#setTag` and, and + `ProgressiveMediaSource.Factory#setCustomCacheKey`. Use + `MediaItem.Builder#setTag` and `MediaItem.Builder#setCustomCacheKey` + instead. * Change the following `IntDefs` to `@Target(TYPE_USE)` only. This may break the compilation of usages in Kotlin, which can be fixed by moving the annotation to annotate the type (`Int`). diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java index ebee71dcfd..daaba7f13d 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java @@ -124,40 +124,6 @@ public final class ProgressiveMediaSource extends BaseMediaSource this.continueLoadingCheckIntervalBytes = continueLoadingCheckIntervalBytes; } - /** - * @deprecated Pass the {@link ExtractorsFactory} via {@link #Factory(DataSource.Factory, - * ExtractorsFactory)}. This is necessary so that proguard can treat the default extractors - * factory as unused. - */ - @Deprecated - public Factory setExtractorsFactory(@Nullable ExtractorsFactory extractorsFactory) { - this.progressiveMediaExtractorFactory = - playerId -> - new BundledExtractorsAdapter( - extractorsFactory != null ? extractorsFactory : new DefaultExtractorsFactory()); - return this; - } - - /** - * @deprecated Use {@link MediaItem.Builder#setCustomCacheKey(String)} and {@link - * #createMediaSource(MediaItem)} instead. - */ - @Deprecated - public Factory setCustomCacheKey(@Nullable String customCacheKey) { - this.customCacheKey = customCacheKey; - return this; - } - - /** - * @deprecated Use {@link MediaItem.Builder#setTag(Object)} and {@link - * #createMediaSource(MediaItem)} instead. - */ - @Deprecated - public Factory setTag(@Nullable Object tag) { - this.tag = tag; - return this; - } - /** * Sets the {@link LoadErrorHandlingPolicy}. The default value is created by calling {@link * DefaultLoadErrorHandlingPolicy#DefaultLoadErrorHandlingPolicy()}.