Skip to content

Commit

Permalink
Merge pull request #9648 from google/dev-v2-r2.16.0
Browse files Browse the repository at this point in the history
r2.16.0
  • Loading branch information
tonihei committed Nov 4, 2021
2 parents 95e6db9 + 7b89c43 commit 7fe9ecc
Show file tree
Hide file tree
Showing 1,616 changed files with 64,024 additions and 33,404 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -19,8 +19,6 @@ We will also consider high quality pull requests. These should normally merge
into the `dev-v2` branch. Before a pull request can be accepted you must submit
a Contributor License Agreement, as described below.

[dev]: https://github.com/google/ExoPlayer/tree/dev

## Contributor license agreement ##

Contributions to any Google project must be accompanied by a Contributor
Expand Down
20 changes: 10 additions & 10 deletions README.md
@@ -1,4 +1,4 @@
# ExoPlayer <img src="https://img.shields.io/github/v/release/google/ExoPlayer.svg?label=latest"/> #
# ExoPlayer <img src="https://img.shields.io/github/v/release/google/ExoPlayer.svg?label=latest"/>

ExoPlayer is an application level media player for Android. It provides an
alternative to Android’s MediaPlayer API for playing audio and video both
Expand All @@ -7,7 +7,7 @@ supported by Android’s MediaPlayer API, including DASH and SmoothStreaming
adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize
and extend, and can be updated through Play Store application updates.

## Documentation ##
## Documentation

* The [developer guide][] provides a wealth of information.
* The [class reference][] documents ExoPlayer classes.
Expand All @@ -20,7 +20,7 @@ and extend, and can be updated through Play Store application updates.
[release notes]: https://github.com/google/ExoPlayer/blob/release-v2/RELEASENOTES.md
[developer blog]: https://medium.com/google-exoplayer

## Using ExoPlayer ##
## Using ExoPlayer

ExoPlayer modules can be obtained from [the Google Maven repository][]. It's
also possible to clone the repository and depend on the modules locally.
Expand All @@ -29,7 +29,7 @@ also possible to clone the repository and depend on the modules locally.

### From the Google Maven repository

#### 1. Add ExoPlayer module dependencies ####
#### 1. Add ExoPlayer module dependencies

The easiest way to get started using ExoPlayer is to add it as a gradle
dependency in the `build.gradle` file of your app module. The following will add
Expand Down Expand Up @@ -77,7 +77,7 @@ found on the [Google Maven ExoPlayer page][].
[extensions directory]: https://github.com/google/ExoPlayer/tree/release-v2/extensions/
[Google Maven ExoPlayer page]: https://maven.google.com/web/index.html#com.google.android.exoplayer

#### 2. Turn on Java 8 support ####
#### 2. Turn on Java 8 support

If not enabled already, you also need to turn on Java 8 support in all
`build.gradle` files depending on ExoPlayer, by adding the following to the
Expand All @@ -89,13 +89,13 @@ compileOptions {
}
```

#### 3. Enable multidex ####
#### 3. Enable multidex

If your Gradle `minSdkVersion` is 20 or lower, you should
[enable multidex](https://developer.android.com/studio/build/multidex) in order
to prevent build errors.

### Locally ###
### Locally

Cloning the repository and depending on the modules locally is required when
using some ExoPlayer extension modules. It's also a suitable approach if you
Expand Down Expand Up @@ -128,15 +128,15 @@ implementation project(':exoplayer-library-dash')
implementation project(':exoplayer-library-ui')
```

## Developing ExoPlayer ##
## Developing ExoPlayer

#### Project branches ####
#### Project branches

* Development work happens on the `dev-v2` branch. Pull requests should
normally be made to this branch.
* The `release-v2` branch holds the most recent release.

#### Using Android Studio ####
#### Using Android Studio

To develop ExoPlayer using Android Studio, simply open the ExoPlayer project in
the root directory of the repository.
142 changes: 142 additions & 0 deletions RELEASENOTES.md
@@ -1,5 +1,147 @@
# Release notes

### 2.16.0 (2021-11-04)

* Core Library:
* Deprecate `SimpleExoPlayer`. All functionality has been moved to
`ExoPlayer` instead. `ExoPlayer.Builder` can be used instead of
`SimpleExoPlayer.Builder`.
* Add track selection methods to the `Player` interface, for example,
`Player.getCurrentTracksInfo` and `Player.setTrackSelectionParameters`.
These methods can be used instead of directly accessing the track
selector.
* Enable MediaCodec asynchronous queueing by default on devices with API
level >= 31. Add methods in `DefaultMediaCodecRendererFactory` and
`DefaultRenderersFactory` to force enable or force disable asynchronous
queueing ([6348](https://github.com/google/ExoPlayer/issues/6348)).
* Remove final dependency on `jcenter()`.
* Fix `mediaMetadata` being reset when media is repeated
([#9458](https://github.com/google/ExoPlayer/issues/9458)).
* Adjust `ExoPlayer` `MediaMetadata` update priority, such that values
input through the `MediaItem.MediaMetadata` are used above media derived
values.
* Move `com.google.android.exoplayer2.device.DeviceInfo` to
`com.google.android.exoplayer2.DeviceInfo`.
* Move `com.google.android.exoplayer2.drm.DecryptionException` to
`com.google.android.exoplayer2.decoder.CryptoException`.
* Move `com.google.android.exoplayer2.upstream.cache.CachedRegionTracker`
to `com.google.android.exoplayer2.upstream.CachedRegionTracker`.
* Move `Player.addListener(EventListener)` and
`Player.removeListener(EventListener)` out of `Player` into subclasses.
* Android 12 compatibility:
* Keep `DownloadService` started and in the foreground whilst waiting for
requirements to be met on Android 12. This is necessary due to new
[foreground service launch restrictions](https://developer.android.com/about/versions/12/foreground-services).
`DownloadService.getScheduler` will not be called on Android 12 devices.
* Disable platform transcoding when playing content URIs on Android 12.
* Add `ExoPlayer.setVideoChangeFrameRateStrategy` to allow disabling of
calls from the player to `Surface.setFrameRate`. This is useful for
applications wanting to call `Surface.setFrameRate` directly from
application code with Android 12's `Surface.CHANGE_FRAME_RATE_ALWAYS`.
* Upgrade the WorkManager extension to depend on
`androidx.work:work-runtime:2.7.0`. Earlier versions of `work-runtime`
are not compatible with apps targeting Android 12, and will crash with
an `IllegalArgumentException` when creating `PendingIntent`s
([#9181](https://github.com/google/ExoPlayer/issues/9181)).
* Video:
* Fix bug in `MediaCodecVideoRenderer` that resulted in re-using a
released `Surface` when playing without an app-provided `Surface`
([#9476](https://github.com/google/ExoPlayer/issues/9476)).
* DRM:
* Log an error (instead of throwing `IllegalStateException`) when calling
`DefaultDrmSession#release()` on a fully released session
([#9392](https://github.com/google/ExoPlayer/issues/9392)).
* UI:
* `SubtitleView` no longer implements `TextOutput`. `SubtitleView`
implements `Player.Listener`, so can be registered to a player with
`Player.addListener`.
* Fix initial timestamp display in `PlayerControlView`
([#9524](https://github.com/google/ExoPlayer/issues/9254)).
* Fix capitalization of languages in the track selector
([#9452](https://github.com/google/ExoPlayer/issues/9452)).
* Extractors:
* MP4: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
* MP4: Add support for Dolby TrueHD (only for unfragmented streams)
([#9496](https://github.com/google/ExoPlayer/issues/9496)).
* MP4: Avoid throwing `ArrayIndexOutOfBoundsException` when parsing
invalid `colr` boxes produced by some device cameras
([#9332](https://github.com/google/ExoPlayer/issues/9332)).
* MP4: Parse HDR static metadata from the `clli` and `mdcv` boxes.
* TS: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
* TS: Map stream type 0x80 to H262
([#9472](https://github.com/google/ExoPlayer/issues/9472)).
* Downloads and caching:
* Modify `DownloadService` behavior when `DownloadService.getScheduler`
returns `null`, or returns a `Scheduler` that does not support the
requirements for downloads to continue. In both cases, `DownloadService`
will now remain started and in the foreground whilst waiting for
requirements to be met.
* Modify `DownloadService` behavior when running on Android 12 and above.
See the "Android 12 compatibility" section above.
* RTSP:
* Support RFC4566 SDP attribute field grammar
([#9430](https://github.com/google/ExoPlayer/issues/9430)).
* DASH:
* Populate `Format.sampleMimeType`, `width` and `height` for image
`AdaptationSet` elements
([#9500](https://github.com/google/ExoPlayer/issues/9500)).
* HLS:
* Fix rounding error in HLS playlists
([#9575](https://github.com/google/ExoPlayer/issues/9575)).
* Fix `NoSuchElementException` thrown when an HLS manifest declares
`#EXT-X-RENDITION-REPORT` at the beginning of the playlist
([#9592](https://github.com/google/ExoPlayer/issues/9592)).
* RTMP extension:
* Upgrade to `io.antmedia:rtmp_client`, which does not rely on `jcenter()`
([#9591](https://github.com/google/ExoPlayer/issues/9591)).
* MediaSession extension:
* Rename
`MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged` to
`onCurrentMediaItemIndexChanged`.
* Transformer:
* Avoid sending a duplicate timestamp to the encoder with the end of
stream buffer.
* Remove deprecated symbols:
* Remove `Renderer.VIDEO_SCALING_MODE_*` constants. Use identically named
constants in `C` instead.
* Remove `C.MSG_*` constants. Use identically named constants in
`Renderer` instead, except for `C.MSG_SET_SURFACE`, which is replaced
with `Renderer.MSG_SET_VIDEO_OUTPUT`.
* Remove `DeviceListener`. Use `Player.Listener` instead.
* Remove `CacheDataSourceFactory`. Use `CacheDataSource.Factory` instead.
* Remove `CacheDataSinkFactory`. Use `CacheDataSink.Factory` instead.
* Remove `FileDataSourceFactory`. Use `FileDataSource.Factory` instead.
* Remove `SimpleExoPlayer.addMetadataOutput` and `removeMetadataOutput`.
Use `Player.addListener` and `Player.Listener` instead.
* Remove `SimpleExoPlayer.addAudioListener`, `removeAudioListener` and
`AudioListener`. Use `Player.addListener` and `Player.Listener` instead.
* Remove `SimpleExoPlayer.addVideoListener`, `removeVideoListener` and
`VideoListener`. Use `Player.addListener` and `Player.Listener` instead.
* Remove `DefaultHttpDataSourceFactory`. Use
`DefaultHttpDataSource.Factory` instead.
* Remove `SingleSampleMediaSource.createMediaSource(Uri, Format, long)`.
Use `SingleSampleMediaSource.createMediaSource(MediaItem.Subtitle,
long)` instead.
* Remove `HttpDataSource.Factory.getDefaultRequestProperties`. Use
`HttpDataSource.Factory.setDefaultRequestProperties` instead.
* Remove `GvrAudioProcessor` and the GVR extension, which has been
deprecated since 2.11.0.
* Remove `DownloadService.onDownloadChanged` and
`DownloadService.onDownloadRemoved`. Instead, use
`DownloadManager.addListener` to register a listener directly to the
`DownloadManager` returned through `DownloadService.getDownloadManager`.
* Remove `Player.getCurrentStaticMetadata`,
`Player.Listener.onStaticMetadataChanged` and
`Player.EVENT_STATIC_METADATA_CHANGED`. Use `Player.getMediaMetadata`,
`Player.Listener.onMediaMetadataChanged` and
`Player.EVENT_MEDIA_METADATA_CHANGED` for convenient access to
structured metadata, or access the raw static metadata directly from the
`TrackSelection#getFormat()`.
* Remove `ControlDispatcher` and `DefaultControlDispatcher`. Operations
can be customized by using a `ForwardingPlayer`, or when configuring the
player (for example by using
`ExoPlayer.Builder.setSeekBackIncrementMs`).

### 2.15.1 (2021-09-20)

* Core Library:
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Expand Up @@ -17,15 +17,14 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.2'
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
if (it.hasProperty('externalBuildDir')) {
if (!new File(externalBuildDir).isAbsolute()) {
Expand Down
1 change: 0 additions & 1 deletion common_library_config.gradle
Expand Up @@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

apply from: "$gradle.ext.exoplayerSettingsDir/constants.gradle"
apply plugin: 'com.android.library'

Expand Down
13 changes: 8 additions & 5 deletions constants.gradle
Expand Up @@ -13,12 +13,14 @@
// limitations under the License.
project.ext {
// ExoPlayer version and version code.
releaseVersion = '2.15.1'
releaseVersionCode = 2015001
releaseVersion = '2.16.0'
releaseVersionCode = 2016000
minSdkVersion = 16
appTargetSdkVersion = 29
// Upgrading this requires [Internal ref: b/193254928] to be fixed, or some
// additional robolectric config.
targetSdkVersion = 30
compileSdkVersion = 30
compileSdkVersion = 31
dexmakerVersion = '2.28.1'
junitVersion = '4.13.2'
// Use the same Guava version as the Android repo:
Expand All @@ -30,14 +32,15 @@ project.ext {
// Keep this in sync with Google's internal Checker Framework version.
checkerframeworkVersion = '3.5.0'
checkerframeworkCompatVersion = '2.5.0'
errorProneVersion = '2.9.0'
jsr305Version = '3.0.2'
kotlinAnnotationsVersion = '1.5.20'
androidxAnnotationVersion = '1.2.0'
androidxAppCompatVersion = '1.3.0'
androidxCollectionVersion = '1.1.0'
androidxCoreVersion = '1.3.2'
androidxCoreVersion = '1.6.0'
androidxFuturesVersion = '1.1.0'
androidxMediaVersion = '1.3.1'
androidxMediaVersion = '1.4.3'
androidxMedia2Version = '1.1.3'
androidxMultidexVersion = '2.0.1'
androidxRecyclerViewVersion = '1.2.1'
Expand Down
64 changes: 38 additions & 26 deletions core_settings.gradle
Expand Up @@ -21,57 +21,69 @@ if (gradle.ext.has('exoplayerModulePrefix')) {
modulePrefix += gradle.ext.exoplayerModulePrefix
}

include modulePrefix + 'library'
project(modulePrefix + 'library').projectDir = new File(rootDir, 'library/all')
include modulePrefix + 'library-common'
project(modulePrefix + 'library-common').projectDir = new File(rootDir, 'library/common')

include modulePrefix + 'extension-mediasession'
project(modulePrefix + 'extension-mediasession').projectDir = new File(rootDir, 'extensions/mediasession')
include modulePrefix + 'extension-media2'
project(modulePrefix + 'extension-media2').projectDir = new File(rootDir, 'extensions/media2')

include modulePrefix + 'library-core'
project(modulePrefix + 'library-core').projectDir = new File(rootDir, 'library/core')
include modulePrefix + 'library'
project(modulePrefix + 'library').projectDir = new File(rootDir, 'library/all')
include modulePrefix + 'library-dash'
project(modulePrefix + 'library-dash').projectDir = new File(rootDir, 'library/dash')
include modulePrefix + 'library-extractor'
project(modulePrefix + 'library-extractor').projectDir = new File(rootDir, 'library/extractor')
include modulePrefix + 'library-hls'
project(modulePrefix + 'library-hls').projectDir = new File(rootDir, 'library/hls')
include modulePrefix + 'library-rtsp'
project(modulePrefix + 'library-rtsp').projectDir = new File(rootDir, 'library/rtsp')
include modulePrefix + 'library-smoothstreaming'
project(modulePrefix + 'library-smoothstreaming').projectDir = new File(rootDir, 'library/smoothstreaming')
include modulePrefix + 'library-transformer'
project(modulePrefix + 'library-transformer').projectDir = new File(rootDir, 'library/transformer')
include modulePrefix + 'extension-ima'
project(modulePrefix + 'extension-ima').projectDir = new File(rootDir, 'extensions/ima')
include modulePrefix + 'extension-workmanager'
project(modulePrefix + 'extension-workmanager').projectDir = new File(rootDir, 'extensions/workmanager')

include modulePrefix + 'library-ui'
project(modulePrefix + 'library-ui').projectDir = new File(rootDir, 'library/ui')
include modulePrefix + 'extension-leanback'
project(modulePrefix + 'extension-leanback').projectDir = new File(rootDir, 'extensions/leanback')

include modulePrefix + 'library-database'
project(modulePrefix + 'library-database').projectDir = new File(rootDir, 'library/database')

include modulePrefix + 'library-datasource'
project(modulePrefix + 'library-datasource').projectDir = new File(rootDir, 'library/datasource')
include modulePrefix + 'extension-cronet'
project(modulePrefix + 'extension-cronet').projectDir = new File(rootDir, 'extensions/cronet')
include modulePrefix + 'extension-rtmp'
project(modulePrefix + 'extension-rtmp').projectDir = new File(rootDir, 'extensions/rtmp')
include modulePrefix + 'extension-okhttp'
project(modulePrefix + 'extension-okhttp').projectDir = new File(rootDir, 'extensions/okhttp')

include modulePrefix + 'library-decoder'
project(modulePrefix + 'library-decoder').projectDir = new File(rootDir, 'library/decoder')
include modulePrefix + 'extension-av1'
project(modulePrefix + 'extension-av1').projectDir = new File(rootDir, 'extensions/av1')
include modulePrefix + 'extension-ffmpeg'
project(modulePrefix + 'extension-ffmpeg').projectDir = new File(rootDir, 'extensions/ffmpeg')
include modulePrefix + 'extension-flac'
project(modulePrefix + 'extension-flac').projectDir = new File(rootDir, 'extensions/flac')
include modulePrefix + 'extension-gvr'
project(modulePrefix + 'extension-gvr').projectDir = new File(rootDir, 'extensions/gvr')
include modulePrefix + 'extension-ima'
project(modulePrefix + 'extension-ima').projectDir = new File(rootDir, 'extensions/ima')
include modulePrefix + 'extension-cast'
project(modulePrefix + 'extension-cast').projectDir = new File(rootDir, 'extensions/cast')
include modulePrefix + 'extension-cronet'
project(modulePrefix + 'extension-cronet').projectDir = new File(rootDir, 'extensions/cronet')
include modulePrefix + 'extension-mediasession'
project(modulePrefix + 'extension-mediasession').projectDir = new File(rootDir, 'extensions/mediasession')
include modulePrefix + 'extension-media2'
project(modulePrefix + 'extension-media2').projectDir = new File(rootDir, 'extensions/media2')
include modulePrefix + 'extension-okhttp'
project(modulePrefix + 'extension-okhttp').projectDir = new File(rootDir, 'extensions/okhttp')
include modulePrefix + 'extension-opus'
project(modulePrefix + 'extension-opus').projectDir = new File(rootDir, 'extensions/opus')
include modulePrefix + 'extension-vp9'
project(modulePrefix + 'extension-vp9').projectDir = new File(rootDir, 'extensions/vp9')
include modulePrefix + 'extension-rtmp'
project(modulePrefix + 'extension-rtmp').projectDir = new File(rootDir, 'extensions/rtmp')
include modulePrefix + 'extension-leanback'
project(modulePrefix + 'extension-leanback').projectDir = new File(rootDir, 'extensions/leanback')
include modulePrefix + 'extension-workmanager'
project(modulePrefix + 'extension-workmanager').projectDir = new File(rootDir, 'extensions/workmanager')

include modulePrefix + 'library-extractor'
project(modulePrefix + 'library-extractor').projectDir = new File(rootDir, 'library/extractor')

include modulePrefix + 'extension-cast'
project(modulePrefix + 'extension-cast').projectDir = new File(rootDir, 'extensions/cast')

include modulePrefix + 'library-transformer'
project(modulePrefix + 'library-transformer').projectDir = new File(rootDir, 'library/transformer')

include modulePrefix + 'robolectricutils'
project(modulePrefix + 'robolectricutils').projectDir = new File(rootDir, 'robolectricutils')
Expand Down

0 comments on commit 7fe9ecc

Please sign in to comment.