6645 Commits

Author SHA1 Message Date
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
olly
c09a6eb8ee Update cast extension build
PiperOrigin-RevId: 250664791
2019-05-30 15:28:16 +01:00
olly
6e7012413b Keep controller visible on d-pad key events
PiperOrigin-RevId: 250661977
2019-05-30 15:26:32 +01:00
tonihei
b8ec05aea1 Handle gzip in DefaultHttpDataSource.
Setting the requested encoding in all cases ensures we receive the relevant
response headers indicating whether gzip was used. Doing that allows to
detect the content length in cases where gzip was requested, but the server
replied with uncompressed content.

PiperOrigin-RevId: 250660890
2019-05-30 15:26:32 +01:00
eguven
00b26a51df Modify DashDownloaderTest to test if content length is stored
PiperOrigin-RevId: 250655481
2019-05-30 15:26:32 +01:00
eguven
e2452f8103 Simplify CacheUtil
PiperOrigin-RevId: 250654697
2019-05-30 15:26:32 +01:00
eguven
42ba6abf5a Fix CacheUtil.cache() use too much data
cache() opens all connections with unset length to avoid position errors.
This makes more data then needed to be downloading by the underlying
network stack.

This fix makes makes it open connections for only required length.

Issue:#5927
PiperOrigin-RevId: 250546175
2019-05-30 15:26:32 +01:00
olly
ed5ce2396d SimpleCache: Tweak comments related to blocking
"Write case, lock not available" was a bit confusing. When the
content is not cached and the lock is held, it's neither a read
or a write case. It's a "can't do anything" case. When blocking,
it may subsequently turn into either a read or a write.

PiperOrigin-RevId: 250530722
2019-05-30 15:26:32 +01:00
aquilescanta
71418f9411 Fix TTML bitmap subtitles
+ Use start for anchoring, instead of center.
+ Add the height to the TTML bitmap cue rendering layout.

Issue:#5633
PiperOrigin-RevId: 250519710
2019-05-30 15:26:32 +01:00
olly
1151848f59 No-op move of span touching into helper method
PiperOrigin-RevId: 250519114
2019-05-30 15:26:32 +01:00
andrewlewis
09b00c7fb0 Allow passthrough of E-AC3-JOC streams
PiperOrigin-RevId: 250517338
2019-05-30 15:26:32 +01:00
olly
94d668567c Migrate org.mockito.Matchers#any* to org.mockito.ArgumentMatchers
The former is deprecated and replaced by the latter in Mockito 2. However, there is a
functional difference: ArgumentMatchers will reject `null` and check the type
if the matcher specified a type (e.g. `any(Class)` or `anyInt()`). `any()` will
remain to accept anything.

PiperOrigin-RevId: 250458607
2019-05-30 15:25:28 +01:00
aquilescanta
8912db5ed9 Remove DecryptionResource
Reference count was built into DrmSession

PiperOrigin-RevId: 250449988
2019-05-30 15:25:28 +01:00