Commit graph

1333 commits

Author SHA1 Message Date
christosts
dee0c2cc71 Bump version to 2.15.1 and tidy release notes
PiperOrigin-RevId: 397758146
2021-09-21 09:54:16 +01:00
claincly
212e37f82a Fix RTSP WWW-Authenticate header parsing.
Issue: #9428

PiperOrigin-RevId: 397064086
2021-09-16 17:50:19 +01:00
christosts
dfc29fc315 Fix HLS endless retrying on load errors
This was originally reported on #9390. There was a bug that when HLS
loads failed, the player would endlessly retry and never fail with a
player error.

This change fixes a bug in HlsSampleStreamWrapper.onPlaylistError()
which would return true for a playlist whose load encountered an error
but could not be excluded, whereas the method should return false.

Issue: #9390

PiperOrigin-RevId: 397045802
2021-09-16 16:44:22 +01:00
ibaker
b4aa8688df Fix how preacquired DRM sessions are released under resource contention
Previously the released preacquired sessions would start their keepalive
timeout, and so no additional resources would be freed in time for the
manager to retry the session acquisition.

This change adds an additional purge of keepalive sessions *after* the
preacquired sessions are released, which fixes the problem.

PiperOrigin-RevId: 396613352
2021-09-16 16:41:35 +01:00
olly
3147a53c47 Constrain resolved period positions to be within the period
This is a candidate fix for #8906. As mentioned in that issue,
negative positions within windows might be (kind of) valid in
live streaming scenarios, where the window starts at some
non-zero position within the period. However, negative positions
within periods are definitely not valid. Neither are positions
that exceed the period duration.

There was already logic in ExoPlayerImplInternal to prevent a
resolved seek position from exceeding the period duration. This
fix adds the equivalent constraint for the start of the period.
It also moves the application of the constraints into Timeline.
This has the advantage that the constraints are applied as part
of state masking in ExoPlayerImpl.seekTo, removing any UI flicker
where the invalid seek position is temporarily visible.

Issue: #8906
PiperOrigin-RevId: 395917413
2021-09-16 16:14:20 +01:00
claincly
927d507397 Fix RTSP session header parsing regex error.
Issue: #9416

The dash "-" in the brackets must be escaped, or it acts like a range
operator.

PiperOrigin-RevId: 395909845
2021-09-16 16:11:51 +01:00
bachinger
25a6ff5753 Select base URL on demand when a new chunk is created
Instead of selecting the base URL initially or when a load error occurs,
it is now selected when a chunk or initialization chunk is created. The
selected base URL is then assigned to
`RepresentationHolder.lastUsedBaseUrl` that is excluded in case of a
load error. For a next chunk another base URL will be selected by using
the `BaseUrlExclusionList`.

PiperOrigin-RevId: 395721221
2021-09-16 16:08:05 +01:00
ibaker
9046124f97 Fix a bug in core_settings.gradle with relative paths
I think this has been broken since 617267bfcf (which was trying to fix
the same problem).

This change initializes `rootDir` to always be the current project (i.e. ExoPlayer)
directory. From the [Gradle docs](https://docs.gradle.org/current/userguide/working_with_files.html#sec:single_file_paths):
> What happens in the case of multi-project builds? The file() method
> will always turn relative paths into paths that are relative to the
> current project directory, which may be a child project.

We can also then remove exoplayerRoot completely and simplify the local
dependency instructions.

* #minor-release
* #exofixit
* Issue: #9403

PiperOrigin-RevId: 395478121
2021-09-16 15:13:51 +01:00
claincly
036039fb64 Handle malformed URL in RTP-Info header.
Some server will send partial URIs in the RTP-Info header, while the RTSP spec
requires absolute URLs.

Issue: #9346

PiperOrigin-RevId: 395452741
2021-09-16 15:11:42 +01:00
bachinger
69c75fb5b0 Use identical cache keys for downloading and playing DASH segments
Issue: #9370
PiperOrigin-RevId: 395429794
2021-09-16 14:51:20 +01:00
klhyun
6452364c1c Update PlayerView's UI when available commands change
PiperOrigin-RevId: 395395015
2021-09-16 14:48:55 +01:00
olly
dd33afb335 Fix some PlayerControlView accessibility issues
- Fix focus when pausing and resuming
- Prevent repeated readout of the playback position when paused

Issue #9111

PiperOrigin-RevId: 395301765
2021-09-16 14:46:44 +01:00
olly
1bd96fbaf7 ID3: Fix end-of-string detection for UTF-16
The current detection logic checks that the two byte terminator starts
at an even position in the ID3 data, where-as it should check that it
starts at an even position relative to the start of the string.

Issue: #9087
PiperOrigin-RevId: 395274934
2021-09-16 14:40:45 +01:00
olly
a1d376fae1 Fix incorrect assertion in CacheDataSource
#minor-release
#exofixit

PiperOrigin-RevId: 395233639
2021-09-16 14:37:21 +01:00
claincly
624d212df2 Handle when additional spaces are in SDP's RTPMAP atrribute
Issue: #9379
PiperOrigin-RevId: 395226701
2021-09-16 14:36:40 +01:00
olly
28d5b35723 Use defStyleAttr when obtaining styled attributes in player views
Issue #9024

PiperOrigin-RevId: 395224661
2021-09-16 14:33:32 +01:00
olly
140e110e44 Workaround ConnectivityManager SecurityException on Android 11
Issue: #9002
PiperOrigin-RevId: 395221648
2021-09-16 14:29:54 +01:00
gyumin
b40a6b86d6 Fix FlagSet.equals on API levels below 24
PiperOrigin-RevId: 395004645
2021-09-16 14:00:50 +01:00
bachinger
d930e07a0e Implement setPlaybackParameters for CastPlayer
Issue: #6784
PiperOrigin-RevId: 393374139
2021-09-16 13:57:44 +01:00
kimvde
152d1c7dc9 TsExtractor: handle packets without PTS
Issue: #9294
PiperOrigin-RevId: 392844983
2021-09-16 13:55:36 +01:00
olly
54418eb644 Size dolby vision buffers for H265 by default
PiperOrigin-RevId: 391965200
2021-09-16 13:53:00 +01:00
kimvde
4fd7d777b6 Fix issue caused by using ForwardingPlayer and StyledPlayerControlView
StyledPlayerControlView was checking whether the player is an ExoPlayer
instance to set the track selector. This means that, if apps were
wrapping an ExoPlayer in a ForwardingPlayer (to replace a
ControlDispatcher for example), the track selector wasn't set anymore.

PiperOrigin-RevId: 391776305
2021-09-16 13:50:04 +01:00
christosts
d56b6a5244 Move DASH multiple base URL release note
The release note was put under 2.14.2 but the feature is
released in 2.15.0.

#minor-release

PiperOrigin-RevId: 390093836
2021-08-11 12:36:56 +01:00
christosts
f34446123d Bump version to 2.15.0 and tidy release notes
PiperOrigin-RevId: 389871495
2021-08-10 15:41:20 +01:00
andrewlewis
8fb1e5ce51 Set StreamIndex Name as format.label in SS
Issue: #9252

#minor-release

PiperOrigin-RevId: 388889406
2021-08-05 12:44:20 +01:00
claincly
6ca0b30755 Handle RTSP session id properly.
Issue: #9254

#minor-release

We used to allow only alphanumerical characters in session id. The spec also
allows "$", "-", "_", ".", "+" (RFC2326 Sections 3.4 and 15.1).

PiperOrigin-RevId: 388873742
2021-08-05 12:43:57 +01:00
Christos Tsilopoulos
f23ab8e2c1 Merge pull request #9247 from colinbarr:dev-v2-rtsp-fmtp-trailing-semicolon
PiperOrigin-RevId: 388713101
2021-08-04 19:04:04 +01:00
christosts
5689e093da Set HlsSampleStreamWrapper.trackType for audio-only playlists
For audio-only playlists, when formats are communicated to the app with
AnalyticsListener.onDownstreamFormatChanged(), the passed MediaLoadData
do not indicate this is an audio track and therefore the
PlaybackStatsListener cannot derive audio format-related information.

This change sets the main SampleStreamWrappers track type to AUDIO, if
the master playlist contains only audio variants.

Issue: #9175

#minor-release

PiperOrigin-RevId: 388676060
2021-08-04 19:02:50 +01:00
andrewlewis
5932406926 Use AudioTrack.isDirectPlaybackSupported on TVs only
Issue: #9239

PiperOrigin-RevId: 388437614
2021-08-04 19:01:19 +01:00
apodob
95dcd89651 Add font-size support to WebVTT CssParser.
This CL addresses the github issue [#8946](https://github.com/google/ExoPlayer/issues/8964). That issue requests support for `font-size` CSS property in WebVTT subtitle format. This CL:
* Adds support for `font-size` property by extending capabilities of WebVTT `CssParser`. Implementation of `font-size` property value parsing is based on the one in `TtmlDecoder`.
* Adds unit test along with test file containing WebVTT subtitles with all currently supported `font-size` units.

#minor-release

PiperOrigin-RevId: 388423859
2021-08-04 18:57:58 +01:00
olly
8732f2f030 HLS: Avoid stuck-buffering issues
Issue: #8850
Issue: #9153
#minor-release
PiperOrigin-RevId: 388257563
2021-08-04 18:57:08 +01:00
bachinger
3f9093cc02 Add BaseUrlExlusionList and use it to select base URLs
Issues: #771 and #7654
PiperOrigin-RevId: 386850707
2021-07-27 12:23:34 +01:00
bachinger
f9162c07c2 Merge pull request #9207 from dlafayet:ruby-position
PiperOrigin-RevId: 386836747
2021-07-27 12:19:29 +01:00
kim-vde
8e29e76b51 Merge pull request #9163 from ProtoScott:feature/dtsx_codec_updates
PiperOrigin-RevId: 386428758
2021-07-23 14:12:29 +01:00
kimvde
72cf9c3815 Deprecate ControlDispatcher and DefaultControlDispatcher
PiperOrigin-RevId: 386401066
2021-07-23 14:11:00 +01:00
kimvde
b33496aeae Deprecate ControlDispatcher in MediaSessionConnector
PiperOrigin-RevId: 386227630
2021-07-23 14:07:55 +01:00
claincly
13ff72d869 Use RTSP header names as defined in the spec.
Using all lower case RTSP headers is perfectly valid, as the spec mandates case
insensitively. However, some RTSP servers do not implement the RTSP spec
closely and does not recognize the lower case headers. This change aims
at using the header names as defined in the RTSP spec to maximize compatibility.

Issue: #9182
PiperOrigin-RevId: 386224566
2021-07-23 14:05:50 +01:00
olly
fe5a7fcc13 Remove trailing whitespace
PiperOrigin-RevId: 386194874
2021-07-22 12:07:38 +01:00
olly
d9ad91d5f8 Adding detail in release notes about PendingIntent
PiperOrigin-RevId: 386194496
2021-07-22 12:06:23 +01:00
kimvde
90113ce013 Deprecate ControlDispatcher in media2
PiperOrigin-RevId: 386185285
2021-07-22 12:05:09 +01:00
ibaker
1466c75d4d Bump version to 2.14.2 and tidy release notes
#minor-release

PiperOrigin-RevId: 385996618
2021-07-21 14:50:26 +01:00
samrobinson
d47d1ebf19 Deprecate static metadata getter and listener method.
PiperOrigin-RevId: 385781004
2021-07-21 14:44:00 +01:00
aquilescanta
0fe504d4b1 Add a reference to issue 1611 in error codes' release notes
#minor-release
Issue: #1611
PiperOrigin-RevId: 385741535
2021-07-21 14:37:05 +01:00
bachinger
3f5dbf2ef3 Add flag to SinglePeriodTimeline to suppress projection
Issue: #9037
#minor-release
PiperOrigin-RevId: 385630065
2021-07-20 08:58:01 +01:00
ibaker
42da46ceb3 Fix release notes duplication introduced by 22ab14844b
PiperOrigin-RevId: 385582191
2021-07-20 08:55:22 +01:00
ibaker
22ab14844b Avoid DefaultDrmSessionManager releasing too many session references
Before this fix, if DefaultDrmSessionManager.release() was called while
there was at least one 'external' session reference still active (i.e.
session.referenceCount > 1) then the manager will release it's reference
immediately but when the session's reference count subsequently drops to
1 (due to external references being released) the manager will schedule
a task to release its internal reference *again*.

This change fixes the problem by only scheduling the timed release if
the manager is unreleased. This ensures that the internal references
are only released once.

Issue: #9193

#minor-release

PiperOrigin-RevId: 385580741
2021-07-20 08:54:04 +01:00
kimvde
fa1bb32deb Remove deprecated PlaybackPreparer
Also update release note to account for upcoming ControlDispatcher removal.

PiperOrigin-RevId: 385520701
2021-07-20 08:47:26 +01:00
kimvde
30e65acf63 Deprecate ControlDispatcher in Leanback library
PiperOrigin-RevId: 385503851
2021-07-20 08:44:47 +01:00
ibaker
d4cb62eb7b Fix RTSP docs and add a missing release note
* Add release note for `RtspMediaSource.Factory.setTimeoutMs()`
* Remove mention of what we don't support (any such list is necessarily non-exhaustive)
* Remove markdown quote character ('>')

PiperOrigin-RevId: 385143574
2021-07-20 08:40:55 +01:00
ibaker
a2929d0920 Merge duplicate RTSP sections in dev-v2 release notes
PiperOrigin-RevId: 385139398
2021-07-20 08:39:34 +01:00