4949 Commits

Author SHA1 Message Date
ibaker
db68aa9490 Rollback of 01f484cbe9
*** Original commit ***

Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)

This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

***

PiperOrigin-RevId: 272405287
2019-10-02 21:29:30 +01:00
samrobinson
f5873b8f00 WakeLock handling
Created the WakeLockManager for use in SimpleExoPlayer.
Added a setter in SimpleExoPlayer to adjust this functionality.

Issue:#5846
PiperOrigin-RevId: 272176998
2019-10-02 21:29:21 +01:00
aquilescanta
af9ce21e2f Log failures when instantiating Framework MediaDrms
PiperOrigin-RevId: 272166041
2019-10-02 21:29:06 +01:00
tonihei
7d8bee799b Add convenience Player.isCurrentWindowLive method.
PiperOrigin-RevId: 272005632
2019-10-02 21:28:51 +01:00
tonihei
dd4f9bcaae Add Timeline.Window.isLive
This flag is currently merged into Window.isDynamic, which isn't always true
because
1. A window can be dynamic for other reasons (e.g. when the duration is still
missing).
2. A live stream can be become non-dynamic when it ends.

Issue:#2668
Issue:#5973
PiperOrigin-RevId: 271999378
2019-10-02 21:28:43 +01:00
tonihei
26dd4aad68 Add missing methods to EventLogger.
PiperOrigin-RevId: 271998087
2019-10-02 21:28:36 +01:00
tonihei
6a2d04e3ce Reflect playback suppression in PlaybackStats states.
Also split existing SUSPENDED state into ABANDONED and INTERUPTED_BY_AD for
more clarity.

PiperOrigin-RevId: 271997824
2019-10-02 21:28:28 +01:00
ibaker
f0723a27b7 Move HLS mapped track picking into a separate method
This helps reduce the amount of nesting in HlsSampleStreamWrapper.track()

PiperOrigin-RevId: 271983779
2019-10-02 21:28:20 +01:00
tonihei
9cc927bc64 Don't block on a dead thread when waiting for messages.
PiperOrigin-RevId: 271983192
2019-10-02 21:28:13 +01:00
sofijajvc
7c199eb1ad Move vpx constant for setting output renderer to common constants file
This will be used by both av1 and vp9 extensions.

PiperOrigin-RevId: 271949754
2019-10-02 21:28:05 +01:00
ibaker
bab12af597 Tweak Id3Decoder error message to print hex instead of int
Before: "Unexpected first three bytes of ID3 tag header: 6845556"
After: "Unexpected first three bytes of ID3 tag header: 0x687474"
PiperOrigin-RevId: 271949486
2019-10-02 21:27:57 +01:00
andrewlewis
9f8002f16a Update LINT.IfChange for extension constants
PiperOrigin-RevId: 271617996
2019-10-02 21:27:42 +01:00
aquilescanta
b50da6d72e Add DefaultDrmSessionManager.Builder
Issue:#6334
Issue:#4721
Issue:#6334
Issue:#4867
PiperOrigin-RevId: 271577773
2019-10-02 21:27:35 +01:00
sofijajvc
22c3be75ea Extract vpx code used for GL rendering to common classes
This will be used by both vp9 and av1 Exoplayer extensions.

PiperOrigin-RevId: 271568429
2019-10-02 21:27:27 +01:00
aquilescanta
d632cb86c1 Make multisession work well with placeholder session
Issue:#4867
PiperOrigin-RevId: 271404942
2019-10-02 21:27:19 +01:00
ibaker
f0b9889ef6 Remove duplicated tracksEnded check in HlsSampleStreamWrapper
PiperOrigin-RevId: 271364512
2019-10-02 21:27:12 +01:00
ibaker
b57c356fbf Reshuffle {audio,video}SampleQueue{Index,MappingDone} into fields mapped by type
PiperOrigin-RevId: 271364200
2019-10-02 21:27:04 +01:00
aquilescanta
5a8c4b90f4 Add getFlags implementation to DefaultDrmSessionManager
Issue:#4867
PiperOrigin-RevId: 271348533
2019-10-02 21:26:56 +01:00
tonihei
d185cea73b Forward isPlaying/playbackSuppressionReason changes to analytics listeners.
PiperOrigin-RevId: 271347407
2019-10-02 21:26:49 +01:00
tonihei
004b9e8e8c Add EventListener.onPlaybackSuppressionReasonChanged
Adding this callback makes sense for completeness (we have similar callbacks
for all other playback state properties), and also to detect audio focus loss
while buffering which would currently trigger no callback because isPlaying
is still false.

Issue:#6203
PiperOrigin-RevId: 271347351
2019-10-02 21:26:41 +01:00
sofijajvc
60a9cf68c9 Add OpenGL support to av1 extension: jni library
Update native gav1GetFrame method.

PiperOrigin-RevId: 271160989
2019-10-02 21:26:34 +01:00
aquilescanta
c2bab7a745 Introduce ExoMediaDrm.Provider into DefaultDrmSessionManager
Issue:#4721
PiperOrigin-RevId: 271127127
2019-10-02 21:26:19 +01:00
olly
e4cabcac0f Try initializing ADAPTATION_WORKAROUND_BUFFER as a byte[]
PiperOrigin-RevId: 270999947
2019-10-02 21:26:11 +01:00
aquilescanta
fa803967f2 Remove mediaDrm methods from DefaultDrmSessionManager
DrmSessionManagers may now be in released state, in which case they
may release their MediaDrm. In that case, it would be invalid to
forward method calls to the underlying MediaDrms. Users should
instead call these methods directly on the MediaDrm.

Issue:#4721
PiperOrigin-RevId: 270963393
2019-10-02 21:26:04 +01:00
tonihei
4df2262bcf Use Player.isPlaying in appropriate places.
This method should be used where we previously checked for active playback
by state==READY and playWhenReady=true. Using the new method ensures we take
audio focus into account for these usages.

Also update some method naming to avoid confusion with the isPlaying method.

Issue:#6203
PiperOrigin-RevId: 270910982
2019-10-02 21:25:56 +01:00
bachinger
4ad4e3e4fc Rollback of 3b22db33ba
*** Original commit ***

add top-level playlist API to ExoPlayer

Public design doc:
https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g

Issue: #6161

***

PiperOrigin-RevId: 270728267
2019-10-02 21:25:39 +01:00
aquilescanta
cc8b774b41 Remove DefaultDrmSessionManager factory methods that enforce MediaDrm leaks
Inline invocations of these methods, which still leaks the MediaDrms.
However, it will be fixed once the DefaultDrmSessionManager API is finalized
and ExoMediaDrm.Providers are introduced.

Issue:#4721
PiperOrigin-RevId: 270681467
2019-10-02 21:25:31 +01:00
tonihei
c8ea831a1e Change default bandwidth fraction in AdaptiveTrackSelection.
A reduced fraction of 0.7 was shown to better balance the rebuffer/quality
trade-off.

PiperOrigin-RevId: 270670465
2019-10-02 21:25:15 +01:00
christosts
5695bae9d8 Remove DataSpec.FLAG_ALLOW_ICY_METADATA
Remove the flag DataSpec.FLAG_ALLOW_ICY_METADATA. Instead, set the
header IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_NAME in the DataSpec
httpRequestHeaders.

BUG:134034248
PiperOrigin-RevId: 270662676
2019-10-02 21:25:07 +01:00
aquilescanta
18b9304f25 Call prepare and release from MediaSources
Issue:#4721
PiperOrigin-RevId: 270342454
2019-09-22 00:16:07 +01:00
aquilescanta
7fc9c848c6 Add prepare and release to DrmSessionManager
The added methods will manage ExoMediaDrms instances.

Issue:#4721
PiperOrigin-RevId: 270335916
2019-09-22 00:15:59 +01:00
bachinger
216f74ecc7 avoid unexpected state changes with certain playlist states
With the internal playlist some new situation may happen that were not possible before:

- handlePlaylistInfoRefreshed in EPII called in IDLE state
- handlePlaylistInfoRefreshed in EPII called in ENDED state with an empty playlist
- seeks in ENDED state with an empty playlist

PiperOrigin-RevId: 270316681
2019-09-22 00:15:43 +01:00
olly
0a854d6b84 Rollback of dd7223df10
*** Original commit ***

Refactor HlsSampleStreamWrapper#track() to clarify the return paths

I found the original implementation quite hard to follow, and I believe this is functionally identical.

***

PiperOrigin-RevId: 270263186
2019-09-20 17:21:01 +01:00
aquilescanta
e5f9a858d3 When the HLS container format is not packed audio, reset timestmap offset
Issue:#6444
PiperOrigin-RevId: 270252126
2019-09-20 17:21:01 +01:00
tonihei
0cc0444af8 Restructure setup of default values in track selection parameter builders.
PiperOrigin-RevId: 270250456
2019-09-20 17:21:01 +01:00
ibaker
6cd530520d Refactor HlsSampleStreamWrapper#track() to clarify the return paths
I found the original implementation quite hard to follow, and I believe this is functionally identical.

PiperOrigin-RevId: 270237641
2019-09-20 17:21:01 +01:00
tonihei
31b9280e0e Add track selection option to use accessiblity captioning manager settings
This option allows to set the preferred text language and role flags based
on the user's accessiblity captioning settings.

Issue:#5749
PiperOrigin-RevId: 270233205
2019-09-20 17:21:01 +01:00
tonihei
531c5638a2 Rename DEFAULT_WITHOUT_VIEWPORT to DEFAULT_WITHOUT_CONTEXT.
PiperOrigin-RevId: 270227069
2019-09-20 17:21:01 +01:00
bachinger
852c3a53e7 copy masked timeline before notifying listeners
PiperOrigin-RevId: 270221478
2019-09-20 17:21:01 +01:00
bachinger
a60265b106 enable/disable media source correctly when added to playlist
PiperOrigin-RevId: 270007370
2019-09-20 17:21:00 +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