diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 30ce0f1e1d..a3130c00eb 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -2,6 +2,8 @@ ### Unreleased changes +* Common Library: + * Add `Format.labels` to allow localized or other alternative labels. * ExoPlayer: * Fix issue where `PreloadMediaPeriod` cannot retain the streams when it is preloaded again. @@ -28,7 +30,7 @@ from WAV files ([#1117](https://github.com/androidx/media/pull/1117)). * MP3: Populate `Format.averageBitrate` from metadata frames such as `XING` and `VBRI`. -* Audio: +* Audio: * Allow renderer recovery by disabling offload if audio track fails to initialize in offload mode. * Video: @@ -60,10 +62,13 @@ * Fix issue where `MediaMetadata` with just non-null `extras` is not transmitted between media controllers and sessions ([#1176](https://github.com/androidx/media/issues/1176)). -* UI: +* UI: * Fallback to include audio track language name if `Locale` cannot identify a display name ([#988](https://github.com/androidx/media/issues/988)). +* DASH Extension: + * Populate all `Label` elements from the manifest into `Format.labels` + ([#1054](https://github.com/androidx/media/pull/1054)). * RTSP Extension: * Skip empty session information values (i-tags) in SDP parsing ([#1087](https://github.com/androidx/media/issues/1087)). diff --git a/libraries/common/src/main/java/androidx/media3/common/Format.java b/libraries/common/src/main/java/androidx/media3/common/Format.java index 1a9a77a214..cda7ac23e9 100644 --- a/libraries/common/src/main/java/androidx/media3/common/Format.java +++ b/libraries/common/src/main/java/androidx/media3/common/Format.java @@ -15,15 +15,18 @@ */ package androidx.media3.common; +import static androidx.media3.common.util.Assertions.checkState; import static java.lang.annotation.ElementType.TYPE_USE; import android.os.Bundle; +import android.text.TextUtils; import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.media3.common.util.BundleCollectionUtil; import androidx.media3.common.util.UnstableApi; import androidx.media3.common.util.Util; import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.annotation.Documented; import java.lang.annotation.Retention; @@ -50,6 +53,7 @@ import java.util.UUID; *