6658 Commits

Author SHA1 Message Date
tonihei
1701a5f329 PUBLIC: Update ExoPlayer dependency and remove legacy method.
PiperOrigin-RevId: 254172906
2019-06-21 18:22:20 +01:00
olly
0b7227ece5 Release notes language tweaks
PiperOrigin-RevId: 254156143
2019-06-21 18:22:00 +01:00
aquilescanta
6838b0b29c Relax DrmSessionManager-in-Renderer requirement for MediaSource-provided DRM
PiperOrigin-RevId: 254048233
2019-06-21 18:21:41 +01:00
olly
2f8bd42b0e Remove Utils.equals() check for object equality that is fragile.
PiperOrigin-RevId: 254046126
2019-06-21 18:21:22 +01:00
tonihei
ba5e2a4a77 Fix test build.
Builds now fail when raw generics are used.

PiperOrigin-RevId: 253969682
2019-06-19 16:37:54 +01:00
bachinger
aaf57c76cf allow multiple style rules in a STYLE block of a webvtt file
PiperOrigin-RevId: 253959976
2019-06-19 16:37:35 +01:00
bachinger
1952988f84 keep notification when stop(false) is called
ISSUE: #6041
PiperOrigin-RevId: 253958225
2019-06-19 16:37:15 +01:00
olly
b9859c4787 [Checker Framework Upgrade] Suppress warnings emitted by Checker Framework version 2.8.2
More information (LSC)
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    tap_presubmit: http://test/OCL:253818309:BASE:253788332:1560879553629:9dc07a48
    Some tests failed; test failures are believed to be unrelated to this CL
PiperOrigin-RevId: 253858263
2019-06-19 16:36:56 +01:00
olly
9308ff26bc Update release notes for 2.10.2 cherrypicks
PiperOrigin-RevId: 253808562
2019-06-18 17:55:03 +01:00
tonihei
9ed7b42af6 Prevent negative renderer timestamps when seeking back.
We are currently queuing periods in a way such that the new start position
lines up with the end of the previous period (to ensure continuous playback).
However, if the start position of the new period is larger than the total of
all previously played period durations, we may end up with negative renderer
timestamps when seeking back to the beginning of this new period. Negative
timestamps should be avoided as most decoders have problems handling them
correctly.

This change forces a renderer reset if we detect such a seek to a negative
renderer time and also resets the renderer offset to 0 every time all
renderers are disabled, as this is the only time where we can savely change
the offset of an existing media period.

Also, if playback starts with an ad, we choose the content position as
renderer offset to prevent the whole issue from occurring for the seek-behind-
midroll case.

Issue:#6009
Issue:#5323
PiperOrigin-RevId: 253790054
2019-06-18 17:49:29 +01:00
olly
38000b8786 Let AudioTrack write headers on SDK_INT >= 26
Issue: #6031
PiperOrigin-RevId: 253784986
2019-06-18 17:49:10 +01:00
aquilescanta
5aeaa6e8bf Fix application of maxAudioBitrate for adaptive audio track groups
Issue:#6006
PiperOrigin-RevId: 253781533
2019-06-18 17:48:51 +01:00
tonihei
b89dc8fbfd Prevent negative total buffered duration at the point where it is calculated.
In some edge cases the renderer position may be slightly ahead of the
buffered position and the total buffered duration is thus negative. We already
filter that in ExoPlayerImpl for the publicly accessible value. However, we
forward the unfiltered value to other components like the LoadControl, which
may be confusing.

Issue:#6015
PiperOrigin-RevId: 253780460
2019-06-18 17:48:32 +01:00
aquilescanta
e174d8a989 Remove unused variable
PiperOrigin-RevId: 253762488
2019-06-18 17:48:14 +01:00
tonihei
0a74e36f7b Gracefully handle revoked ACCESS_NETWORK_STATE permission.
This permission has normal access right and can't be revoked by the user.
However, an app can choose to revoke it when using ExoPlayer, e.g. if
no network is required and the app doesn't want to list this permission.

Support this use case by gracefully catching the exception in the relevant
places.

Issue:#6019
PiperOrigin-RevId: 253759332
2019-06-18 17:47:56 +01:00
aquilescanta
af5eb5e552 Add DummyDrmSessionManager
Avoids nullable DrmSessionManagers and simplifies sample reading.
To be used as default value for MediaSources.

PiperOrigin-RevId: 253624465
2019-06-18 17:47:37 +01:00
aquilescanta
3204cf8ffa Make DrmSessionException extend IOException
Makes it throwable from SampleStream.maybeThrowError

PiperOrigin-RevId: 253600396
2019-06-18 17:47:19 +01:00
bachinger
c05cb3f6f4 Add bug report section to question and content_not_playing issue templates.
PiperOrigin-RevId: 253593267
2019-06-18 17:47:01 +01:00
olly
f90cbcdffd Add MRC continuous play API to IMA android sdk.
Details in
go/ima-mrc-continuous-play

Corresponding js webcore changes is in <unknown commit>.

NoExternal

PiperOrigin-RevId: 253585186
2019-06-18 17:46:42 +01:00
andrewlewis
b449269552 Remove Objects.equals use from CronetDataSource
Objects was added in API 19.

PiperOrigin-RevId: 253567490
2019-06-18 17:46:18 +01:00
tonihei
1266d5967b Fix all FIXME comments.
These are mostly nullability issues.

PiperOrigin-RevId: 253537068
2019-06-18 17:45:59 +01:00
Yannick RUI
b29731d501 Parse text track subtype into Format.roleflags. 2019-06-18 11:27:37 +02:00
Toni
da1f3f01fa Merge pull request #6036 from angelrc96:dev-v2
PiperOrigin-RevId: 253228214
2019-06-14 16:50:13 +01:00
Toni
30ac71d413 Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2 2019-06-14 16:41:10 +01:00
arodriguez
2ce28a1620 Support for UDP data source 2019-06-14 16:34:53 +01:00
aquilescanta
3fcae68432 Add flags to DrmSessionManager
PiperOrigin-RevId: 253006112
2019-06-14 16:34:53 +01:00
olly
cc337a3e2d Update nullness annotations.
PiperOrigin-RevId: 252127811
2019-06-14 16:33:47 +01:00
tonihei
3bff79f56f Wrap MediaCodec exceptions in DecoderException and report as renderer error.
We currently report MediaCodec exceptions as unexpected exceptions instead of
as renderer error. All such exceptions are now wrapped in a new DecoderException
to allow adding more details to the exception.

PiperOrigin-RevId: 252054486
2019-06-14 16:33:47 +01:00
olly
8a2871ed51 Allow protected access to surface in MediaCodecVideoRenderer
PiperOrigin-RevId: 251961318
2019-06-14 16:33:10 +01:00
olly
e525c1c59e Add CronetDataSource.read(ByteBuffer) method that writes directly into caller's buffer.
PiperOrigin-RevId: 251915459
2019-06-14 16:32:59 +01:00
olly
1fb105bbb2 Attach timestamp to ExoPlaybackException
PiperOrigin-RevId: 251748542
2019-06-14 16:32:51 +01:00
arodriguez
28ee05f657 Support for UDP data source 2019-06-14 08:24:31 +02:00
sr1990
5b02f92dad [Patch V2] Support signalling of last segment number via supplemental descriptor in mpd 2019-06-10 22:22:15 -07:00
olly
624bb6b8d1 Attach timestamp to ExoPlaybackException
PiperOrigin-RevId: 251748542
2019-06-06 17:36:22 +01:00
olly
cfa837df5c Don't throw DecoderQueryException from getCodecMaxSize
It's only thrown in an edge case on API level 20 and below. If it
is thrown it causes playback failure when playback could succeed,
by throwing up through configureCodec.

It seems better just to catch the exception and have the codec be
configured using the format's own width and height.

PiperOrigin-RevId: 251745539
2019-06-06 17:36:03 +01:00
aquilescanta
3490bea339 Simplify re-creation of the CastPlayer queue in the Cast demo app
PiperOrigin-RevId: 251617354
2019-06-06 17:35:44 +01:00
aquilescanta
8bd2b5b3d7 Fix detection of current window index in CastPlayer
Issue:#5955
PiperOrigin-RevId: 251616118
2019-06-06 17:35:25 +01:00
eguven
e4feaa68f2 Add VR player demo
PiperOrigin-RevId: 251460113
2019-06-06 17:35:06 +01:00
tonihei
be88499615 Display last frame when seeking to end of stream.
We currently don't display the last frame because the seek time is behind the
last frame's timestamps and it's thus marked as decodeOnly.

This case can be detected by checking whether all data sent to the codec is
marked as decodeOnly at the time we read the end of stream signal. If so, we
can re-enable the last frame. This should work for almost all cases because the
end-of-stream signal is read in the same feedInputBuffer loop as the last
frame and we therefore haven't released the last frame buffer yet.

Issue:#2568
PiperOrigin-RevId: 251425870
2019-06-06 17:34:47 +01:00
aquilescanta
44aa731476 Use listener notification batching in CastPlayer
PiperOrigin-RevId: 251399230
2019-06-06 17:34:27 +01:00
olly
9ca6f60c3a Preserve postBody in CacheDataSource when reading from upstream.
Set appropriate Content-Type when posting clientAbrState proto in post body.

PiperOrigin-RevId: 251322860
2019-06-06 17:34:08 +01:00
olly
871a88a921 Clean up release notes
PiperOrigin-RevId: 251269746
2019-06-03 19:16:42 +01:00
olly
a9de1477ee Bump to 2.10.2
PiperOrigin-RevId: 251216822
2019-06-03 19:15:42 +01:00
olly
b47f37fbcd Add HlsTrackMetadataEntry.toString
It's printed out by EventLogger, and currently looks pretty ugly

PiperOrigin-RevId: 250772010
2019-06-03 19:15:23 +01:00
aquilescanta
7e187283cd Add MediaSource-provided-DRM support to Renderer implementations
PiperOrigin-RevId: 250719155
2019-06-03 19:15:04 +01:00
tonihei
090f359895 Make parallel adaptive track selection more robust.
Using parallel adaptation for Formats without bitrate information currently
causes an exception. Handle this gracefully and also cases where all formats
have the same bitrate.

Issue:#5971
PiperOrigin-RevId: 250682127
2019-05-30 15:28:23 +01:00
eguven
f9d6f314e2 Fix misreporting cached bytes when caching is paused
When caching is resumed, it starts from the initial position. This makes
more data to be reported as cached.

Issue:#5573
PiperOrigin-RevId: 250678841
2019-05-30 15:28:23 +01:00
tonihei
126aad5882 Rename host_activity.xml to avoid manifest merge conflicts.
PiperOrigin-RevId: 250672752
2019-05-30 15:28:23 +01:00
tonihei
fd1179aaa1 Add remaining PlaybackStatsListener metrics.
This adds all the non-playback-state metrics, like format, error, bandwidth and
renderer performance metrics.

PiperOrigin-RevId: 250668854
2019-05-30 15:28:23 +01:00
tonihei
77595da159 Add initial PlaybackStats listener version.
This version includes all playback state related metrics and the general
listener set-up.

PiperOrigin-RevId: 250668729
2019-05-30 15:28:23 +01:00