Skip to content

Commit f425665

Browse files
authored
Merge pull request #11241 from google/release-v2-r2.19.0
Release v2 r2.19.0
2 parents ac9d533 + fd29199 commit f425665

File tree

2,398 files changed

+192787
-43230
lines changed

Some content is hidden

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

2,398 files changed

+192787
-43230
lines changed

.idea/icon.svg

Lines changed: 10 additions & 0 deletions
Loading

RELEASENOTES.md

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,265 @@
11
# Release notes
22

3+
### 2.19.0 (2023-07-05)
4+
5+
This is the last planned release of the `com.google.android.exoplayer2`
6+
artifacts. This project is now deprecated. All users should migrate to
7+
`androidx.media3` (which contains the same ExoPlayer code). See
8+
[the migration guide](https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide)
9+
for more details, including a script to help with the migration.
10+
11+
This release corresponds to the
12+
[AndroidX Media3 1.1.0 release](https://github.com/androidx/media/releases/tag/1.1.0).
13+
14+
* Common Library:
15+
* Add suppression reason for unsuitable audio route and play when ready
16+
change reason for suppressed too long.
17+
([#15](https://github.com/androidx/media/issues/15)).
18+
* Add commands to Player:
19+
* `COMMAND_GET_METADATA`
20+
* `COMMAND_SET_PLAYLIST_METADATA`
21+
* `COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS`
22+
* `COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS`
23+
* Add overloaded methods to Player which allow users to specify volume
24+
flags:
25+
* `void setDeviceVolume(int, int)`
26+
* `void increaseDeviceVolume(int)`
27+
* `void decreaseDeviceVolume(int)`
28+
* `void setDeviceMuted(boolean, int)`
29+
* Add `Builder` for `DeviceInfo` and deprecate existing constructor.
30+
* Add `DeviceInfo.routingControllerId` to specify the routing controller
31+
ID for remote playbacks.
32+
* Add `Player.replaceMediaItem(s)` as a shortcut to adding and removing
33+
items at the same position
34+
([#8046](https://github.com/google/ExoPlayer/issues/8046)).
35+
* ExoPlayer:
36+
* Allow ExoPlayer to have control of device volume methods only if
37+
explicitly opted in. Use
38+
`ExoPlayer.Builder.setDeviceVolumeControlEnabled` to have access to:
39+
* `getDeviceVolume()`
40+
* `isDeviceMuted()`
41+
* `setDeviceVolume(int)` and `setDeviceVolume(int, int)`
42+
* `increaseDeviceVolume(int)` and `increaseDeviceVolume(int, int)`
43+
* `decreaseDeviceVolume(int)` and `decreaseDeviceVolume(int, int)`
44+
* Add `FilteringMediaSource` that allows to filter available track types
45+
from a `MediaSource`.
46+
* Add support for including Common Media Client Data (CMCD) in the
47+
outgoing requests of adaptive streaming formats DASH, HLS, and
48+
SmoothStreaming. The following fields, `br`, `bl`, `cid`, `rtp`, and
49+
`sid`, have been incorporated
50+
([#8699](https://github.com/google/ExoPlayer/issues/8699)). API
51+
structure and API methods:
52+
* CMCD logging is disabled by default, use
53+
`MediaSource.Factory.setCmcdConfigurationFactory(CmcdConfiguration.Factory
54+
cmcdConfigurationFactory)` to enable it.
55+
* All keys are enabled by default, override
56+
`CmcdConfiguration.RequestConfig.isKeyAllowed(String key)` to filter
57+
out which keys are logged.
58+
* Override `CmcdConfiguration.RequestConfig.getCustomData()` to enable
59+
custom key logging.
60+
* Add additional action to manifest of main demo to make it easier to
61+
start the demo app with a custom `*.exolist.json` file
62+
([#439](https://github.com/androidx/media/pull/439)).
63+
* Add `ExoPlayer.setVideoEffects()` for using `Effect` during video
64+
playback.
65+
* Update `SampleQueue` to store `sourceId` as a `long` rather than an
66+
`int`. This changes the signatures of public methods
67+
`SampleQueue.sourceId` and `SampleQueue.peekSourceId`.
68+
* Add parameters to `LoadControl` methods `shouldStartPlayback` and
69+
`onTracksSelected` that allow associating these methods with the
70+
relevant `MediaPeriod`.
71+
* Change signature of
72+
`ServerSideAdInsertionMediaSource.setAdPlaybackStates(Map<Object,
73+
AdPlaybackState>)` by adding a timeline parameter that contains the
74+
periods with the UIDs used as keys in the map. This is required to avoid
75+
concurrency issues with multi-period live streams.
76+
* Deprecate `EventDispatcher.withParameters(int windowIndex, @Nullable
77+
MediaPeriodId mediaPeriodId, long mediaTimeOffsetMs)` and
78+
`BaseMediaSource.createEventDispatcher(..., long mediaTimeOffsetMs)`.
79+
The variant of the methods without the `mediaTimeOffsetUs` can be called
80+
instead. Note that even for the deprecated variants, the offset is not
81+
anymore added to `startTimeUs` and `endTimeUs` of the `MediaLoadData`
82+
objects that are dispatched by the dispatcher.
83+
* Rename `ExoTrackSelection.blacklist` to `excludeTrack` and
84+
`isBlacklisted` to `isTrackExcluded`.
85+
* Fix inconsistent behavior between `ExoPlayer.setMediaItem(s)` and
86+
`addMediaItem(s)` when called on an empty playlist.
87+
* Transformer:
88+
* Remove `Transformer.Builder.setMediaSourceFactory(MediaSource.Factory)`.
89+
Use `ExoPlayerAssetLoader.Factory(MediaSource.Factory)` and
90+
`Transformer.Builder.setAssetLoaderFactory(AssetLoader.Factory)`
91+
instead.
92+
* Remove `Transformer.startTransformation(MediaItem,
93+
ParcelFileDescriptor)`.
94+
* Fix a bug where transformation could get stuck (leading to muxer
95+
timeout) if the end of the video stream was signaled at the moment when
96+
an input frame was pending processing.
97+
* Query codecs via `MediaCodecList` instead of using
98+
`findDecoder/EncoderForFormat` utilities, to expand support.
99+
* Remove B-frame configuration in `DefaultEncoderFactory` because it
100+
doesn't work on some devices.
101+
* Track selection:
102+
* Add
103+
`DefaultTrackSelector.Parameters.allowInvalidateSelectionsForRendererCapabilitiesChange`
104+
which is disabled by default. When enabled, the `DefaultTrackSelector`
105+
will trigger a new track selection when the renderer capabilities
106+
changed.
107+
* Extractors:
108+
* Ogg: Fix bug when seeking in files with a long duration
109+
([#391](https://github.com/androidx/media/issues/391)).
110+
* FMP4: Fix issue where `TimestampAdjuster` initializes a wrong timestamp
111+
offset with metadata sample time from emsg atom
112+
([#356](https://github.com/androidx/media/issues/356)).
113+
* Audio:
114+
* Fix bug where some playbacks fail when tunneling is enabled and
115+
`AudioProcessors` are active, e.g. for gapless trimming
116+
([#10847](https://github.com/google/ExoPlayer/issues/10847)).
117+
* Encapsulate Opus frames in Ogg packets in direct playbacks (offload).
118+
* Extrapolate current position during sleep with offload scheduling.
119+
* Add `Renderer.release()` and `AudioSink.release()` for releasing the
120+
resources at the end of player's lifecycle.
121+
* Listen to audio capabilities changes in `DefaultAudioSink`. Add a
122+
required parameter `context` in the constructor of `DefaultAudioSink`,
123+
with which the `DefaultAudioSink` will register as the listener to the
124+
`AudioCapabilitiesReceiver` and update its `audioCapabilities` property
125+
when informed with a capabilities change.
126+
* Propagate audio capabilities changes via a new event
127+
`onAudioCapabilitiesChanged` in `AudioSink.Listener` interface, and a
128+
new interface `RendererCapabilities.Listener` which triggers
129+
`onRendererCapabilitiesChanged` events.
130+
* Add `ChannelMixingAudioProcessor` for applying scaling/mixing to audio
131+
channels.
132+
* Add new int value `DISCARD_REASON_AUDIO_BYPASS_POSSIBLE` to
133+
`DecoderDiscardReasons` to discard audio decoder when bypass mode is
134+
possible after audio capabilities change.
135+
* Add direct playback support for DTS Express and DTS:X
136+
([#335](https://github.com/androidx/media/pull/335)).
137+
* Video:
138+
* Make `MediaCodecVideoRenderer` report a `VideoSize` with a width and
139+
height of 0 when the renderer is disabled.
140+
`Player.Listener.onVideoSizeChanged` is called accordingly when
141+
`Player.getVideoSize()` changes. With this change, ExoPlayer's video
142+
size with `MediaCodecVideoRenderer` has a width and height of 0 when
143+
`Player.getCurrentTracks` does not support video, or the size of the
144+
supported video track is not yet determined.
145+
* DRM:
146+
* Reduce the visibility of several internal-only methods on
147+
`DefaultDrmSession` that aren't expected to be called from outside the
148+
DRM package:
149+
* `void onMediaDrmEvent(int)`
150+
* `void provision()`
151+
* `void onProvisionCompleted()`
152+
* `onProvisionError(Exception, boolean)`
153+
* Muxer:
154+
* Add a new muxer library which can be used to create an MP4 container
155+
file.
156+
* IMA extension:
157+
* Enable multi-period live DASH streams for DAI. Please note that the
158+
current implementation does not yet support seeking in live streams
159+
([#10912](https://github.com/google/ExoPlayer/issues/10912)).
160+
* Fix a bug where a new ad group is inserted in live streams because the
161+
calculated content position in consecutive timelines varies slightly.
162+
* UI:
163+
* Add Util methods `shouldShowPlayButton` and
164+
`handlePlayPauseButtonAction` to write custom UI elements with a
165+
play/pause button.
166+
* RTSP Extension:
167+
* For MPEG4-LATM, use default profile-level-id value if absent in Describe
168+
Response SDP message
169+
([#302](https://github.com/androidx/media/issues/302)).
170+
* Use base Uri for relative path resolution from the RTSP session if
171+
present in DESCRIBE response header
172+
([#11160](https://github.com/google/ExoPlayer/issues/11160)).
173+
* DASH Extension:
174+
* Remove the media time offset from `MediaLoadData.startTimeMs` and
175+
`MediaLoadData.endTimeMs` for multi period DASH streams.
176+
* Fix a bug where re-preparing a multi-period live Dash media source
177+
produced a `IndexOutOfBoundsException`
178+
([#10838](https://github.com/google/ExoPlayer/issues/10838)).
179+
* HLS Extension:
180+
* Add
181+
`HlsMediaSource.Factory.setTimestampAdjusterInitializationTimeoutMs(long)`
182+
to set a timeout for the loading thread to wait for the
183+
`TimestampAdjuster` to initialize. If the initialization doesn't
184+
complete before the timeout, a `PlaybackException` is thrown to avoid
185+
the playback endless stalling. The timeout is set to zero by default
186+
([#323](https://github.com/androidx/media/issues//323)).
187+
* Test Utilities:
188+
* Check for URI scheme case insensitivity in `DataSourceContractTest`.
189+
* Remove deprecated symbols:
190+
* Remove `DefaultAudioSink` constructors, use `DefaultAudioSink.Builder`
191+
instead.
192+
* Remove `HlsMasterPlaylist`, use `HlsMultivariantPlaylist` instead.
193+
* Remove `Player.stop(boolean)`. Use `Player.stop()` and
194+
`Player.clearMediaItems()` (if `reset` is `true`) instead.
195+
* Remove two deprecated `SimpleCache` constructors, use a non-deprecated
196+
constructor that takes a `DatabaseProvider` instead for better
197+
performance.
198+
* Remove `DefaultBandwidthMeter` constructor, use
199+
`DefaultBandwidthMeter.Builder` instead.
200+
* Remove `DefaultDrmSessionManager` constructors, use
201+
`DefaultDrmSessionManager.Builder` instead.
202+
* Remove two deprecated `HttpDataSource.InvalidResponseCodeException`
203+
constructors, use a non-deprecated constructor that accepts additional
204+
fields(`cause`, `responseBody`) to enhance error logging.
205+
* Remove `DownloadHelper.forProgressive`, `DownloadHelper.forHls`,
206+
`DownloadHelper.forDash`, and `DownloadHelper.forSmoothStreaming`, use
207+
`DownloadHelper.forMediaItem` instead.
208+
* Remove deprecated `DownloadService` constructor, use a non deprecated
209+
constructor that includes the option to provide a
210+
`channelDescriptionResourceId` parameter.
211+
* Remove deprecated String constants for Charsets (`ASCII_NAME`,
212+
`UTF8_NAME`, `ISO88591_NAME`, `UTF16_NAME` and `UTF16LE_NAME`), use
213+
Kotlin Charsets from the `kotlin.text` package, the
214+
`java.nio.charset.StandardCharsets` or the
215+
`com.google.common.base.Charsets` instead.
216+
* Remove deprecated `WorkManagerScheduler` constructor, use a non
217+
deprecated constructor that includes the option to provide a `Context`
218+
parameter instead.
219+
* Remove the deprecated methods `createVideoSampleFormat`,
220+
`createAudioSampleFormat`, `createContainerFormat`, and
221+
`createSampleFormat`, which were used to instantiate the `Format` class.
222+
Instead use `Format.Builder` for creating instances of `Format`.
223+
* Remove the deprecated methods `copyWithMaxInputSize`,
224+
`copyWithSubsampleOffsetUs`, `copyWithLabel`,
225+
`copyWithManifestFormatInfo`, `copyWithGaplessInfo`,
226+
`copyWithFrameRate`, `copyWithDrmInitData`, `copyWithMetadata`,
227+
`copyWithBitrate` and `copyWithVideoSize`, use `Format.buildUpon()` and
228+
setter methods instead.
229+
* Remove deprecated `ExoPlayer.retry()`, use `prepare()` instead.
230+
* Remove deprecated zero-arg `DefaultTrackSelector` constructor, use
231+
`DefaultTrackSelector(Context)` instead.
232+
* Remove deprecated `OfflineLicenseHelper` constructor, use
233+
`OfflineLicenseHelper(DefaultDrmSessionManager,
234+
DrmSessionEventListener.EventDispatcher)` instead.
235+
* Remove deprecated `DownloadManager` constructor, use the constructor
236+
that takes an `Executor` instead.
237+
* Remove deprecated `Cue` constructors, use `Cue.Builder` instead.
238+
* Remove deprecated `OfflineLicenseHelper` constructor, use
239+
`OfflineLicenseHelper(DefaultDrmSessionManager,
240+
DrmSessionEventListener.EventDispatcher)` instead.
241+
* Remove four deprecated `AnalyticsListener` methods:
242+
* `onDecoderEnabled`, use `onAudioEnabled` and/or `onVideoEnabled`
243+
instead.
244+
* `onDecoderInitialized`, use `onAudioDecoderInitialized` and/or
245+
`onVideoDecoderInitialized` instead.
246+
* `onDecoderInputFormatChanged`, use `onAudioInputFormatChanged`
247+
and/or `onVideoInputFormatChanged` instead.
248+
* `onDecoderDisabled`, use `onAudioDisabled` and/or `onVideoDisabled`
249+
instead.
250+
* Remove the deprecated `Player.Listener.onSeekProcessed` and
251+
`AnalyticsListener.onSeekProcessed`, use `onPositionDiscontinuity` with
252+
`DISCONTINUITY_REASON_SEEK` instead.
253+
* Remove `ExoPlayer.setHandleWakeLock(boolean)`, use `setWakeMode(int)`
254+
instead.
255+
* Remove deprecated
256+
`DefaultLoadControl.Builder.createDefaultLoadControl()`, use `build()`
257+
instead.
258+
* Remove deprecated `MediaItem.PlaybackProperties`, use
259+
`MediaItem.LocalConfiguration` instead. Deprecated field
260+
`MediaItem.playbackProperties` is now of type
261+
`MediaItem.LocalConfiguration`.
262+
3263
### 2.18.7 (2023-05-18)
4264

5265
This release corresponds to the

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ buildscript {
1717
mavenCentral()
1818
}
1919
dependencies {
20-
classpath 'com.android.tools.build:gradle:7.2.1'
21-
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.2'
20+
classpath 'com.android.tools.build:gradle:7.2.2'
21+
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
22+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20'
2223
}
2324
}
2425
allprojects {

common_library_config.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ android {
2525
aarMetadata {
2626
minCompileSdk = project.ext.compileSdkVersion
2727
}
28+
multiDexEnabled true
2829
}
2930

3031
compileOptions {
32+
coreLibraryDesugaringEnabled true
3133
sourceCompatibility JavaVersion.VERSION_1_8
3234
targetCompatibility JavaVersion.VERSION_1_8
3335
}
@@ -39,3 +41,8 @@ android {
3941
unitTests.includeAndroidResources true
4042
}
4143
}
44+
45+
dependencies {
46+
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
47+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
48+
}

0 commit comments

Comments
 (0)