Skip to content

Commit

Permalink
Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Aug 7, 2021
2 parents 51acb36 + d698e96 commit 5f0bdde
Show file tree
Hide file tree
Showing 73 changed files with 761 additions and 723 deletions.
28 changes: 27 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
behavior of track and location fallback. Location fallback is currently
only supported for DASH manifests with multiple base URLs.
* Disable platform transcoding when playing content URIs on Android 12.
* Restrict use of `AudioTrack.isDirectPlaybackSupported` to TVs, to avoid
listing audio offload encodings as supported for passthrough mode on
mobile devices
([#9239](https://github.com/google/ExoPlayer/issues/9239)).
* Remove deprecated symbols:
* Remove `Player.getPlaybackError`. Use `Player.getPlayerError` instead.
* Remove `Player.getCurrentTag`. Use `Player.getCurrentMediaItem` and
Expand Down Expand Up @@ -88,6 +92,11 @@
* Remove `CastPlayer` specific playlist manipulation methods. Use
`setMediaItems`, `addMediaItems`, `removeMediaItem` and `moveMediaItem`
instead.
* 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`.
* UI:
* Add `setUseRewindAction` and `setUseFastForwardAction` to
`PlayerNotificationManager`, and `setUseFastForwardActionInCompactView`
Expand Down Expand Up @@ -117,6 +126,8 @@
* Text:
* TTML: Inherit the `rubyPosition` value from a containing `<span
ruby="container">` element.
* WebVTT: Add support for CSS `font-size` property
([#8964](https://github.com/google/ExoPlayer/issues/8964)).
* Ad playback:
* Support changing ad break positions in the player logic
([#5067](https://github.com/google/ExoPlayer/issues/5067).
Expand All @@ -131,13 +142,28 @@
* Deprecate `setControlDispatcher` in `LeanbackPlayerAdapter`.
* Media2 extension:
* Deprecate `setControlDispatcher` in `SessionPlayerConnector`.
* GVR extension:
* Remove `GvrAudioProcessor`, which has been deprecated since 2.11.0.
* RTSP:
* Use standard RTSP header names.
* Use standard RTSP header names
([#9182](https://github.com/google/ExoPlayer/issues/9182)).
* Handle an extra semicolon in SDP fmtp attribute
([#9247](https://github.com/google/ExoPlayer/pull/9247)).
* Fix handling of special characters in the RTSP session ID
([#9254](https://github.com/google/ExoPlayer/issues/9254)).
* MediaSession extension:
* Deprecate `setControlDispatcher` in `MediaSessionConnector`. The
`ControlDispatcher` parameter has also been deprecated in all
`MediaSessionConnector` listener methods.
* HLS:
* Report audio track type in
`AnalyticsListener.onDownstreamFormatChanged()` for audio-only
playlists, so that the `PlaybackStatsListener` can derive audio
format-related information.
([#9175](https://github.com/google/ExoPlayer/issues/9175)).
* SS:
* Propagate `StreamIndex` element `Name` attribute value as `Format`
label ([#9252](https://github.com/google/ExoPlayer/issues/9252)).

### 2.14.2 (2021-07-20)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.2'
}
}
Expand Down
6 changes: 4 additions & 2 deletions constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ project.ext {
releaseVersionCode = 2014002
minSdkVersion = 16
appTargetSdkVersion = 29
targetSdkVersion = 31
// Upgrading this requires [Internal ref: b/162763326] to be fixed, or some
// additional robolectric config.
targetSdkVersion = 30
compileSdkVersion = 31
dexmakerVersion = '2.28.1'
junitVersion = '4.13.2'
Expand All @@ -37,7 +39,7 @@ project.ext {
androidxCollectionVersion = '1.1.0'
androidxCoreVersion = '1.3.2'
androidxFuturesVersion = '1.1.0'
androidxMediaVersion = '1.3.1'
androidxMediaVersion = '1.4.1'
androidxMedia2Version = '1.1.3'
androidxMultidexVersion = '2.0.1'
androidxRecyclerViewVersion = '1.2.1'
Expand Down
2 changes: 0 additions & 2 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ 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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,12 +669,11 @@ public long open(DataSpec dataSpec) throws HttpDataSourceException {
if (message != null && Ascii.toLowerCase(message).contains("err_cleartext_not_permitted")) {
throw new CleartextNotPermittedException(connectionOpenException, dataSpec);
}
@PlaybackException.ErrorCode
int errorCode =
getErrorCodeForException(
connectionOpenException, /* occurredWhileOpeningConnection*/ true);
throw new OpenException(
connectionOpenException, dataSpec, errorCode, getStatus(urlRequest));
connectionOpenException,
dataSpec,
PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED,
getStatus(urlRequest));
} else if (!connectionOpened) {
// The timeout was reached before the connection was opened.
throw new OpenException(
Expand All @@ -685,10 +684,13 @@ public long open(DataSpec dataSpec) throws HttpDataSourceException {
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// An interruption means the operation is being cancelled, in which case this exception should
// not cause the player to fail. If it does, it likely means that the owner of the operation
// is failing to swallow the interruption, which makes us enter an invalid state.
throw new OpenException(
new InterruptedIOException(),
dataSpec,
PlaybackException.ERROR_CODE_IO_UNSPECIFIED,
PlaybackException.ERROR_CODE_FAILED_RUNTIME_CHECK,
Status.INVALID);
}

Expand Down Expand Up @@ -1029,7 +1031,9 @@ private void skipFully(long bytesToSkip, DataSpec dataSpec) throws HttpDataSourc
throw new OpenException(
e,
dataSpec,
getErrorCodeForException(e, /* occurredWhileOpeningConnection= */ false),
e instanceof SocketTimeoutException
? PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT
: PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED,
Status.READING_RESPONSE);
}
}
Expand Down Expand Up @@ -1099,11 +1103,8 @@ private void readInternal(ByteBuffer buffer, DataSpec dataSpec) throws HttpDataS
if (exception instanceof HttpDataSourceException) {
throw (HttpDataSourceException) exception;
} else {
throw new HttpDataSourceException(
exception,
dataSpec,
getErrorCodeForException(exception, /* occurredWhileOpeningConnection= */ false),
HttpDataSourceException.TYPE_READ);
throw HttpDataSourceException.createForIOException(
exception, dataSpec, HttpDataSourceException.TYPE_READ);
}
}
}
Expand All @@ -1116,27 +1117,6 @@ private ByteBuffer getOrCreateReadBuffer() {
return readBuffer;
}

@PlaybackException.ErrorCode
private static int getErrorCodeForException(
IOException exception, boolean occurredWhileOpeningConnection) {
if (exception instanceof UnknownHostException) {
return PlaybackException.ERROR_CODE_IO_DNS_FAILED;
}
@Nullable String message = exception.getMessage();
if (message != null) {
if (message.contains("net::ERR_INTERNET_DISCONNECTED")) {
return PlaybackException.ERROR_CODE_IO_NETWORK_UNAVAILABLE;
} else if (message.contains("net::ERR_CONTENT_LENGTH_MISMATCH")
|| message.contains("net::ERR_SOCKET_NOT_CONNECTED")) {
return PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_CLOSED;
}
}
if (occurredWhileOpeningConnection) {
return PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED;
}
return PlaybackException.ERROR_CODE_IO_UNSPECIFIED;
}

private static boolean isCompressed(UrlResponseInfo info) {
for (Map.Entry<String, String> entry : info.getAllHeadersAsList()) {
if (entry.getKey().equalsIgnoreCase("Content-Encoding")) {
Expand Down
44 changes: 0 additions & 44 deletions extensions/gvr/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions extensions/gvr/build.gradle

This file was deleted.

16 changes: 0 additions & 16 deletions extensions/gvr/src/main/AndroidManifest.xml

This file was deleted.

Loading

0 comments on commit 5f0bdde

Please sign in to comment.