6927 Commits

Author SHA1 Message Date
bachinger
a60265b106 enable/disable media source correctly when added to playlist
PiperOrigin-RevId: 270007370
2019-09-20 17:21:00 +01:00
bachinger
826fe3ac27 adjust and extend the documentation around playlist API in the developer guide
PiperOrigin-RevId: 270002330
2019-09-20 17:20:44 +01:00
olly
78ef6c6496 Update release notes
- Fatal error handling fix is now in 2.10.5

PiperOrigin-RevId: 269904669
2019-09-20 16:52:54 +01:00
olly
f4f908408b Update release notes
- Remove HTTP/2 Fix note, since the issue is still present
- Add release note for fatal error handling fix

PiperOrigin-RevId: 269902736
2019-09-18 23:23:36 +01:00
olly
d22794111c Improve old release notes
PiperOrigin-RevId: 269781924
2019-09-18 23:23:29 +01:00
aquilescanta
9863cd33fa Avoid retrying fatal errors
Also clear fatal errors on seek operations

PiperOrigin-RevId: 269780886
2019-09-18 23:23:21 +01:00
bachinger
3b22db33ba add top-level playlist API to ExoPlayer
Public design doc:
https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g

Issue: #6161
PiperOrigin-RevId: 269584512
2019-09-18 23:23:13 +01:00
olly
75b9b11e20 Bump version to 2.10.5
PiperOrigin-RevId: 269582832
2019-09-18 23:23:04 +01:00
olly
656c97f122 Minor DefaultDrmSessionManager tweaks
PiperOrigin-RevId: 269574864
2019-09-17 16:56:54 +01:00
aquilescanta
5df2f142b4 Don't retry fatal errors in DefaultDrmSession
Issue:#6334
PiperOrigin-RevId: 269553308
2019-09-17 16:56:46 +01:00
olly
b34a10bc1d Update translations
PiperOrigin-RevId: 269521864
2019-09-17 16:56:38 +01:00
olly
67e8024d84 Make flags contiguous: There's no reason for the gap :)
PiperOrigin-RevId: 269514872
2019-09-17 16:56:30 +01:00
olly
d3d9e288c8 Improve ChunkSource.onChunkLoadError documentation
PiperOrigin-RevId: 269463652
2019-09-17 16:56:22 +01:00
aquilescanta
6ae3e0983a Add default implementations for ExoMediaDrm.Provider
Issue:#4721
PiperOrigin-RevId: 269378440
2019-09-16 23:32:09 +01:00
aquilescanta
5630273155 Add DummyExoMediaDrm
Allows streamlining the way we handle unsupported DRM. In general, either:

* The device does not support the CDM. For example, phones don't support
  PlayReady.
* The device does not support the protection scheme. For example, API < 25
  devices do not support AES-CBC.

Currently we handle both cases differently. A dummy ExoMediaDrm will allow
the existence of dummy DefaultDrmSessionManagers.

PiperOrigin-RevId: 269315687
2019-09-16 23:32:02 +01:00
aquilescanta
9face09361 Add ExoMediaDrm.Provider
Allows shared ownership of ExoMediaDrms. Shared ownership will
allow users to pre-create ExoMediaDrms in their apps, as opposed
to having the DrmSessionManager create the ExoMediaDrm.

Issue:#4721
PiperOrigin-RevId: 269305850
2019-09-16 23:31:48 +01:00
tonihei
c5ceefd609 Fix playback speed in MediaSessionConnector
The playback speed set in MediaSession's PlaybackStateCompat needs to be the
actual speed at which the playback position progresses and not the user-defined
target speed.

This fixed a bug where the position advances although the player lost audio
focus.

Issue:#6203
PiperOrigin-RevId: 269295249
2019-09-16 23:31:41 +01:00
olly
73654e27da Minor cleanup to Loader documentation
PiperOrigin-RevId: 269092322
2019-09-16 23:31:28 +01:00
tonihei
e784d2c507 Add Player.isPlaying and Player.getPlaybackSuppressionReason
The player may suppress playback when waiting for audio focus even if the
state==Player.READY. There is currently no getter or callback to obtain this
piece of information for UI updates or analytics.

Also, it's a important derived state to know whether the playback position is
advancing. Add isPlaying and the corresponding callback to allow retrieving
this information more easily.

Issue:#6203
PiperOrigin-RevId: 268921721
2019-09-16 23:31:20 +01:00
olly
d443be2a46 Clear supplementalData in DecoderInputBuffer.clear
PiperOrigin-RevId: 268894250
2019-09-16 23:31:12 +01:00
olly
1d3d92ee4b Upgrade to OkHttp 3.12.5
Issue: #4078
PiperOrigin-RevId: 268887744
2019-09-13 13:51:35 +01:00
olly
20c66e6a82 Use Util.toLowerInvariant instead of String.toLowerCase
PiperOrigin-RevId: 268880519
2019-09-13 13:51:27 +01:00
tonihei
65748fa8ee Mark dropped buffers while joining as skipped.
These buffers are intentionally dropped to catch up with the playing audio.
Mark them as skipped accordingly.

PiperOrigin-RevId: 268703410
2019-09-13 13:51:19 +01:00
tonihei
dc12982bd1 Don't force render first frame when joining.
We currently force render the first frame in all cases. However, when joining
video to an ongoing playback, there is no defined first frame and we should
rather drop frames if we are late until we caught up with the audio playback.

PiperOrigin-RevId: 268698093
2019-09-13 13:51:12 +01:00
bachinger
f08258e48d disable seekbar in media style notification for live stream
ISSUE: #6416
PiperOrigin-RevId: 268673895
2019-09-13 13:51:04 +01:00
tonihei
e68b96dc78 Keep newly assigned window sequence number if queue is still empty.
When the queue is empty, we may still get multiple requests for a window
sequence number using the same periodUid. We should keep the initially
assigned number because no window change happened.

PiperOrigin-RevId: 268649009
2019-09-13 13:50:56 +01:00
aquilescanta
62eb845763 Attempt acquisition of a placeholder session if format.drmInitData is null
Issue:#4867
PiperOrigin-RevId: 268505056
2019-09-13 13:50:48 +01:00
aquilescanta
143d7d6cca Implement acquirePlaceholderSession in DefaultDrmSessionManager
Issue:#4867
PiperOrigin-RevId: 268497377
2019-09-13 13:50:41 +01:00
bachinger
f7e9e185f7 allowing 36 characters for shuffle mode off
PiperOrigin-RevId: 268478545
2019-09-13 13:50:33 +01:00
aquilescanta
82a31eed2f Add a placeholder mode for DefaultDrmSessions
Issue:#4867
PiperOrigin-RevId: 268473094
2019-09-13 13:50:25 +01:00
aquilescanta
0cc1e5143b Add acquirePlaceholderSession to DrmSessionManager
Issue:#4867
PiperOrigin-RevId: 268472704
2019-09-13 13:50:17 +01:00
aquilescanta
890700fa0f Push formatHolder up to the BaseRenderer class
PiperOrigin-RevId: 268431514
2019-09-13 13:50:09 +01:00
aquilescanta
bbe8c25832 Make minor simplifications in DefaultDrmSession
PiperOrigin-RevId: 268422418
2019-09-13 13:50:00 +01:00
olly
0706625089 Add fLaC prefix to FLAC initialization data
The fLaC prefix is included in the initialization data output
from the MKV extractor, so this is highly likely ot be the
right thing to do.

Issue: #6397
PiperOrigin-RevId: 268244365
2019-09-10 17:43:31 +01:00
Oliver Woodman
755b4a25e4 Merge pull request #6158 from xirac:dev-v2
PiperOrigin-RevId: 268240722
2019-09-10 17:43:21 +01:00
bachinger
e567f8edd0 allow 33 characters for strings of shuffle on/off
PiperOrigin-RevId: 268238764
2019-09-10 17:43:11 +01:00
kimvde
73b922ee59 Add capture policy option to AudioAttributes
PiperOrigin-RevId: 268035329
2019-09-10 10:28:01 +01:00
andrewlewis
e21467f653 Fix Dolby Vision fallback to AVC and HEVC
PiperOrigin-RevId: 267979637
2019-09-10 10:27:53 +01:00
aquilescanta
0aba89b60e Make live HLS default start position at least 2*target duration from live edge
Issue:#6360
PiperOrigin-RevId: 267615050
2019-09-10 10:27:38 +01:00
aquilescanta
5e8f611f06 Replace pendingFormat with waitingForFirstSampleInFormat in SimpleDecoderVideoRenderer
PiperOrigin-RevId: 267612438
2019-09-10 10:27:31 +01:00
aquilescanta
2866b2b3e4 Make renderers ignore drmInitData if the MediaSource provides a DrmSession
Will allows to use a DrmSession for clear periods.

Issue:#4867
PiperOrigin-RevId: 267576982
2019-09-10 10:27:23 +01:00
andrewlewis
f1ccb47c3b Fix decoder selection for E-AC3 JOC streams
Issue: #6398
PiperOrigin-RevId: 267563795
2019-09-10 10:27:15 +01:00
tonihei
77ed930251 Add Timeline.Window.uid.
This allows to uniquely identify a window within a Timeline. The value is set
correctly for all Window instances, but is not used anywhere yet.

PiperOrigin-RevId: 267556516
2019-09-10 10:27:07 +01:00
tonihei
de915bd6a1 Handle potential timeline updates that switch from content to ad.
We currently don't test if an ad needs to be played in case we are already
playing content.

This is to prevent recreating the current content period when
an ad is marked as skipped. We prefer playing until the designated ad group
position and appending another piece of content. This is less likely to cause
visible discontinuities in case the ad group position is at a key frame
boundary.

However, this means we currently miss updates that require us to play an ad
after a timeline update.

PiperOrigin-RevId: 267553459
2019-09-10 10:26:59 +01:00
andrewlewis
b77688533b Fix init data handling for FLAC in MP4
Issue: #6396
PiperOrigin-RevId: 267536336
2019-09-10 10:26:51 +01:00
Yannick RUI
5f48871731 Count the number of matches for role flags.
Select a track with matching role flags even if someone specifies a preferred role flgs without providing a preferred language
Prefer track without captions or describing music and sound flag when no role flag preference is provided.
2019-09-05 17:31:24 +02:00
Toni
75435b4210 Merge pull request #6286 from sr1990:dev-v2
PiperOrigin-RevId: 267323559
2019-09-05 10:56:35 +01:00
sr1990
33eb49ca0d Support negative value of the @r attrbute of S in SegmentTimeline element 2019-09-05 10:48:46 +01:00
sr1990
b4a1d55fe4 Support negative value of the @r attrbute of S in SegmentTimeline element 2019-09-05 10:48:46 +01:00
tonihei
b57c556194 Remove deprecated Timeline.getWindow method.
Removing this method requires custom MediaSource implementations to switch
to the new version. While this breaks the implmentation, it also avoids problems
with accidentely forwarding to the wrong method or with accidental stack
overflows when none of the two methods gets implemented.

It's unlikely any callers are affected because this is only the extended version
with the defaultProjectionPositionUs parameter that no caller except the
internal player will use.

PiperOrigin-RevId: 267323042
2019-09-05 10:48:46 +01:00