Skip to content

Commit ca0912d

Browse files
committed
Merge branch 'main' into meta/fragmented-mp4-multiple-sidx-seek-squashed
2 parents 2b9d7dc + 965fc81 commit ca0912d

File tree

1,120 files changed

+17498
-5199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,120 files changed

+17498
-5199
lines changed

.github/ISSUE_TEMPLATE/bug.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ body:
1919
options:
2020
- Media3 main branch
2121
- Media3 pre-release (alpha, beta or RC not in this list)
22+
- Media3 1.6.1
23+
- Media3 1.6.0
2224
- Media3 1.5.1
2325
- Media3 1.5.0
2426
- Media3 1.4.1
@@ -43,9 +45,6 @@ body:
4345
- ExoPlayer 2.16.0
4446
- ExoPlayer 2.15.1
4547
- ExoPlayer 2.15.0
46-
- ExoPlayer 2.14.2
47-
- ExoPlayer 2.14.1
48-
- ExoPlayer 2.14.0
4948
- ExoPlayer dev-v2 branch
5049
- Older (unsupported)
5150
validations:

RELEASENOTES.md

+130-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@
44

55
* Common Library:
66
* ExoPlayer:
7+
* Add `ExoPlayer.setScrubbingModeEnabled(boolean)` method. This optimizes
8+
the player for many frequent seeks (for example, from a user dragging a
9+
scrubber bar around). The behavior of scrubbing mode can be customized
10+
with `setScrubbingModeParameters(..)` on `ExoPlayer` and
11+
`ExoPlayer.Builder`.
12+
* Fix bug where prepare errors in the content of `AdsMediaSource` may be
13+
never reported ([#2337](https://github.com/androidx/media/issues/2337)).
14+
* Fix memory leak in `MergingMediaSource`, for example used when
15+
sideloading subtitles
16+
([#2338](https://github.com/androidx/media/issues/2338)).
717
* Transformer:
18+
* Filling an initial gap (added via `addGap()`) with silent audio now
19+
requires explicitly setting `experimentalSetForceAudioTrack(true)` in
20+
`EditedMediaItemSequence.Builder`. If the gap is in the middle of the
21+
sequence, then this flag is not required.
822
* Track Selection:
923
* Extractors:
1024
* MP3: Use duration and data size from unseekable Xing, VBRI and similar
@@ -18,6 +32,9 @@
1832
* DataSource:
1933
* Audio:
2034
* Allow constant power upmixing/downmixing in DefaultAudioMixer.
35+
* Make `ChannelMappingAudioProcessor`, `TrimmingAudioProcessor` and
36+
`ToFloatPcmAudioProcessor` public
37+
([#2339](https://github.com/androidx/media/issues/2339)).
2138
* Video:
2239
* Add experimental `ExoPlayer` API to include the
2340
`MediaCodec.BUFFER_FLAG_DECODE_ONLY` flag when queuing decode-only input
@@ -27,6 +44,13 @@
2744
* Improve codec performance checks for software video codecs. This may
2845
lead to some additional tracks being marked as `EXCEEDS_CAPABILITIES`.
2946
* Text:
47+
* Fix SSA and SubRip to display an in-progress cue when enabling subtitles
48+
([#2309](https://github.com/androidx/media/issues/2309)).
49+
* Fix playback getting stuck when switching from a stream with a subtitle
50+
error to a live stream with an empty subtitle track
51+
([#2328](https://github.com/androidx/media/issues/2328)).
52+
* Fix garbled CEA-608 subtitles when playing H.262 streams containing
53+
B-frames ([#2372](https://github.com/androidx/media/issues/2372)).
3054
* Metadata:
3155
* Image:
3256
* DataSource:
@@ -39,8 +63,28 @@
3963
* `writeSampleData()` API now uses muxer specific `BufferInfo` class
4064
instead of `MediaCodec.BufferInfo`.
4165
* IMA extension:
66+
* Fix a bug where a load error in one ad may accidentally invalidate
67+
another ad group.
4268
* Session:
69+
* Fix a bug where passing null into `getLibraryRoot` of a `MediaBrowser`
70+
connected to a legacy `MediaBrowserServiceCompat` produced a
71+
`NullPointerException`.
72+
* Fix a bug where where sending custom actions, a search result or a
73+
getItem request crashed the legacy session app with a
74+
`ClassNotFoundException`.
4375
* UI:
76+
* Fix a Compose bug which resulted in a gap between setting the initial
77+
button states and observing the change in state (e.g. icon shapes or
78+
being enabled). Any changes made to the Player outside of the
79+
observation period are now picked up
80+
([#2313](https://github.com/androidx/media/issues/2313)).
81+
* Add support for ExoPlayer's scrubbing mode to `PlayerControlView`. When
82+
enabled, this puts the player into scrubbing mode when the user starts
83+
dragging the scrubber bar, issues a `player.seekTo` call for every
84+
movement, and then exits scrubbing mode when the touch is lifted from
85+
the screen. This integration can be enabled with either
86+
`time_bar_scrubbing_enabled = true` in XML or the
87+
`setTimeBarScrubbingEnabled(boolean)` method from Java/Kotlin.
4488
* Downloads:
4589
* Add partial download support for progressive streams. Apps can prepare a
4690
progressive stream with `DownloadHelper`, and request a
@@ -51,26 +95,33 @@
5195
correspondingly.
5296
* Add `DownloadHelper.Factory` with which the static
5397
`DownloadHelper.forMediaItem()` methods are replaced.
98+
* Add `Factory` for `SegmentDownloader` implementations.
5499
* OkHttp extension:
55100
* Cronet extension:
56101
* RTMP extension:
57102
* HLS extension:
103+
* Support X-ASSET-LIST and live streams with `HlsInterstitialsAdsLoader`.
58104
* DASH extension:
59105
* Smooth Streaming extension:
60106
* RTSP extension:
61-
* Add support for URI with RTSPT scheme as a way to configure the RTSP
62-
session to use TCP
63-
([#1484](https://github.com/androidx/media/issues/1484)).
107+
* Add parsing support for SessionDescriptions containing lines with
108+
trailing whitespace characters
109+
([#2357](https://github.com/androidx/media/issues/2357)).
64110
* Decoder extensions (FFmpeg, VP9, AV1, etc.):
65111
* MIDI extension:
66112
* Leanback extension:
67113
* Cast extension:
68-
* Add support for playlist metadata
69-
([#2235](https://github.com/androidx/media/pull/2235)).
114+
* Add support for `getDeviceVolume()`, `setDeviceVolume()`,
115+
`getDeviceMuted()`, and `setDeviceMuted()`
116+
([#2089](https://github.com/androidx/media/issues/2089)).
70117
* Test Utilities:
71-
* Demo app:
72-
* Add `PlaybackSpeedPopUpButton` Composable UI element to be part of
73-
`ExtraControls` in `demo-compose`.
118+
* Removed `transformer.TestUtil.addAudioDecoders(String...)`,
119+
`transformer.TestUtil.addAudioEncoders(String...)`, and
120+
`transformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig,
121+
String...)`. Use `ShadowMediaCodecConfig` to configure shadow encoders
122+
and decoders instead.
123+
* Replaced the "exotest" prefix with "media3" in codec names reported by
124+
`ShadowMediaCodecConfig`.
74125
* Remove deprecated symbols:
75126
* Removed deprecated `SegmentDownloader` constructor
76127
`SegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory,
@@ -86,9 +137,76 @@
86137
`Player.seekToNextMediaItem()` instead.
87138
* Removed deprecated `BaseAudioProcessor` in `exoplayer` module. Use
88139
`BaseAudioProcessor` under `common` module.
140+
* Remove deprecated `MediaCodecVideoRenderer` constructor
141+
`MediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor,
142+
MediaCodecSelector, long, boolean, @Nullable Handler, @Nullable
143+
VideoRendererEventListener, int, float, @Nullable VideoSinkProvider)`.
89144

90145
## 1.6
91146

147+
### 1.6.1 (2025-04-14)
148+
149+
This release includes the following changes since the
150+
[1.6.0 release](#160-2025-03-26):
151+
152+
* Common Library:
153+
* Add `PlaybackParameters.withPitch(float)` method for easily copying a
154+
`PlaybackParameters` with a new `pitch` value
155+
([#2257](https://github.com/androidx/media/issues/2257)).
156+
* ExoPlayer:
157+
* Fix issue where media item transition fails due to recoverable renderer
158+
error during initialization of the next media item
159+
([#2229](https://github.com/androidx/media/issues/2229)).
160+
* Fix issue where `ProgressiveMediaPeriod` throws an
161+
`IllegalStateException` as `PreloadMediaSource` attempts to call its
162+
`getBufferedDurationUs()` before it is prepared
163+
([#2315](https://github.com/androidx/media/issues/2315)).
164+
* Fix sending `CmcdData` in manifest requests for DASH, HLS, and
165+
SmoothStreaming ([#2253](https://github.com/androidx/media/pull/2253)).
166+
* Ensure `AdPlaybackState.withAdDurationsUs(long[][])` can be used after
167+
ad groups have been removed. The user still needs to pass in an array of
168+
durations for removed ad groups which can be empty or null
169+
([#2267](https://github.com/androidx/media/issues/2267)).
170+
* Extractors:
171+
* MP4: Parse `alternate_group` from the `tkhd` box and expose it as an
172+
`Mp4AlternateGroupData` entry in each track's `Format.metadata`
173+
([#2242](https://github.com/androidx/media/issues/2242)).
174+
* Audio:
175+
* Fix offload issue where the position might get stuck when playing a
176+
playlist of short content
177+
([#1920](https://github.com/androidx/media/issues/1920)).
178+
* Session:
179+
* Lower aggregation timeout for platform `MediaSession` callbacks from 500
180+
to 100 milliseconds and add an experimental setter to allow apps to
181+
configure this value.
182+
* Fix issue where notifications reappear after they have been dismissed by
183+
the user ([#2302](https://github.com/androidx/media/issues/2302)).
184+
* Fix a bug where the session returned a single-item timeline when the
185+
wrapped player is actually empty. This happened when the wrapped player
186+
doesn't have `COMMAND_GET_TIMELINE` available while
187+
`COMMAND_GET_CURRENT_MEDIA_ITEM` is available and the wrapped player is
188+
empty ([#2320](https://github.com/androidx/media/issues/2320)).
189+
* Fix a bug where calling
190+
`MediaSessionService.setMediaNotificationProvider` is silently ignored
191+
after other interactions with the service like
192+
`setForegroundServiceTimeoutMs`
193+
([#2305](https://github.com/androidx/media/issues/2305)).
194+
* UI:
195+
* Enable `PlayerSurface` to work with `ExoPlayer.setVideoEffects` and
196+
`CompositionPlayer`.
197+
* Fix bug where `PlayerSurface` can't be recomposed with a new `Player`.
198+
* HLS extension:
199+
* Fix issue where chunk duration wasn't set in `CmcdData` for HLS media,
200+
causing an assertion failure when processing encrypted media segments
201+
([#2312](https://github.com/androidx/media/issues/2312)).
202+
* RTSP extension:
203+
* Add support for URI with RTSPT scheme as a way to configure the RTSP
204+
session to use TCP
205+
([#1484](https://github.com/androidx/media/issues/1484)).
206+
* Cast extension:
207+
* Add support for playlist metadata
208+
([#2235](https://github.com/androidx/media/pull/2235)).
209+
92210
### 1.6.0 (2025-03-26)
93211

94212
This release includes the following changes since the
@@ -2917,6 +3035,10 @@ This release corresponds to the
29173035
* Ad playback / IMA:
29183036
* Decrease ad polling rate from every 100ms to every 200ms, to line up
29193037
with Media Rating Council (MRC) recommendations.
3038+
* Fix bug where ad groups after the end of a VOD window stalled playback.
3039+
Ads groups with a start time after the window are not enqueued into the
3040+
`MediaPeriodQueue` anymore
3041+
([#2215](https://github.com/androidx/media/issues/2215)).
29203042
* FFmpeg extension:
29213043
* Update CMake version to `3.21.0+` to avoid a CMake bug causing
29223044
AndroidStudio's gradle sync to fail

api.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,7 @@ package androidx.media3.common {
885885
field public static final int MEDIA_ITEM_TRANSITION_REASON_REPEAT = 0; // 0x0
886886
field public static final int MEDIA_ITEM_TRANSITION_REASON_SEEK = 2; // 0x2
887887
field public static final int PLAYBACK_SUPPRESSION_REASON_NONE = 0; // 0x0
888+
field public static final int PLAYBACK_SUPPRESSION_REASON_SCRUBBING = 4; // 0x4
888889
field public static final int PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS = 1; // 0x1
889890
field public static final int PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT = 3; // 0x3
890891
field @Deprecated public static final int PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_ROUTE = 2; // 0x2
@@ -969,7 +970,7 @@ package androidx.media3.common {
969970
@IntDef({androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST, androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS, androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY, androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_REMOTE, androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM, androidx.media3.common.Player.PLAY_WHEN_READY_CHANGE_REASON_SUPPRESSED_TOO_LONG}) @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.TYPE_USE}) public static @interface Player.PlayWhenReadyChangeReason {
970971
}
971972

972-
@IntDef({androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_NONE, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_ROUTE, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT}) @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.TYPE_USE}) public static @interface Player.PlaybackSuppressionReason {
973+
@IntDef({androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_NONE, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_ROUTE, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT, androidx.media3.common.Player.PLAYBACK_SUPPRESSION_REASON_SCRUBBING}) @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.TYPE_USE}) public static @interface Player.PlaybackSuppressionReason {
973974
}
974975

975976
public static final class Player.PositionInfo {
@@ -1265,6 +1266,7 @@ package androidx.media3.common.util {
12651266
method public static boolean checkCleartextTrafficPermitted(androidx.media3.common.MediaItem...);
12661267
method @Nullable public static String getAdaptiveMimeTypeForContentType(@androidx.media3.common.C.ContentType int);
12671268
method @Nullable public static java.util.UUID getDrmUuid(String);
1269+
method public static String getUserAgent(android.content.Context, String);
12681270
method public static boolean handlePauseButtonAction(@Nullable androidx.media3.common.Player);
12691271
method public static boolean handlePlayButtonAction(@Nullable androidx.media3.common.Player);
12701272
method public static boolean handlePlayPauseButtonAction(@Nullable androidx.media3.common.Player);
@@ -1304,6 +1306,7 @@ package androidx.media3.datasource {
13041306

13051307
public static final class DefaultHttpDataSource.Factory implements androidx.media3.datasource.HttpDataSource.Factory {
13061308
ctor public DefaultHttpDataSource.Factory();
1309+
method public androidx.media3.datasource.DefaultHttpDataSource.Factory setUserAgent(@Nullable String);
13071310
}
13081311

13091312
public interface HttpDataSource extends androidx.media3.datasource.DataSource {
@@ -1344,6 +1347,7 @@ package androidx.media3.datasource.cronet {
13441347

13451348
public static final class CronetDataSource.Factory implements androidx.media3.datasource.HttpDataSource.Factory {
13461349
ctor public CronetDataSource.Factory(org.chromium.net.CronetEngine, java.util.concurrent.Executor);
1350+
method public androidx.media3.datasource.cronet.CronetDataSource.Factory setUserAgent(@Nullable String);
13471351
}
13481352

13491353
public final class CronetUtil {
@@ -1359,6 +1363,7 @@ package androidx.media3.datasource.okhttp {
13591363

13601364
public static final class OkHttpDataSource.Factory implements androidx.media3.datasource.HttpDataSource.Factory {
13611365
ctor public OkHttpDataSource.Factory(okhttp3.Call.Factory);
1366+
method public androidx.media3.datasource.okhttp.OkHttpDataSource.Factory setUserAgent(@Nullable String);
13621367
}
13631368

13641369
}
@@ -1382,6 +1387,8 @@ package androidx.media3.exoplayer {
13821387
method public androidx.media3.exoplayer.ExoPlayer.Builder setAudioAttributes(androidx.media3.common.AudioAttributes, boolean);
13831388
method public androidx.media3.exoplayer.ExoPlayer.Builder setHandleAudioBecomingNoisy(boolean);
13841389
method public androidx.media3.exoplayer.ExoPlayer.Builder setMediaSourceFactory(androidx.media3.exoplayer.source.MediaSource.Factory);
1390+
method public androidx.media3.exoplayer.ExoPlayer.Builder setSeekBackIncrementMs(@IntRange(from=1) long);
1391+
method public androidx.media3.exoplayer.ExoPlayer.Builder setSeekForwardIncrementMs(@IntRange(from=1) long);
13851392
method public androidx.media3.exoplayer.ExoPlayer.Builder setWakeMode(@androidx.media3.common.C.WakeMode int);
13861393
}
13871394

constants.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
project.ext {
15-
releaseVersion = '1.6.0'
16-
releaseVersionCode = 1_006_000_3_00
15+
releaseVersion = '1.6.1'
16+
releaseVersionCode = 1_006_001_3_00
1717
minSdkVersion = 21
1818
// See https://developer.android.com/training/cars/media/automotive-os#automotive-module
1919
automotiveMinSdkVersion = 28

demos/compose/src/main/java/androidx/media3/demo/compose/buttons/MinimalControls.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ internal fun MinimalControls(player: Player, modifier: Modifier = Modifier) {
4444
horizontalArrangement = Arrangement.SpaceEvenly,
4545
verticalAlignment = Alignment.CenterVertically,
4646
) {
47-
PreviousButton(player, modifierForIconButton)
48-
PlayPauseButton(player, modifierForIconButton)
49-
NextButton(player, modifierForIconButton)
47+
PreviousButton(player, Modifier.weight(1f).then(modifierForIconButton))
48+
PlayPauseButton(player, Modifier.weight(1f).then(modifierForIconButton))
49+
NextButton(player, Modifier.weight(1f).then(modifierForIconButton))
5050
}
5151
}

demos/composition/src/main/java/androidx/media3/demo/composition/CompositionPreviewActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package androidx.media3.demo.composition;
1717

1818
import static android.content.pm.ActivityInfo.COLOR_MODE_HDR;
19-
import static androidx.media3.common.util.Util.SDK_INT;
19+
import static android.os.Build.VERSION.SDK_INT;
2020
import static androidx.media3.transformer.Composition.HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR;
2121
import static androidx.media3.transformer.Composition.HDR_MODE_KEEP_HDR;
2222
import static androidx.media3.transformer.Composition.HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC;

demos/effect/src/main/assets/media.playlist.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[
22
{
3-
"name": "Cats -> Dogs",
3+
"name": "Dogs Short -> Dogs",
44
"playlist": [
55
{
6-
"uri": "https://html5demos.com/assets/dizzy.mp4"
6+
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/mp4/android-screens-10s.mp4"
77
},
88
{
99
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv"

0 commit comments

Comments
 (0)