5372 Commits

Author SHA1 Message Date
Oliver Woodman
7e02066f6e Merge pull request #7422 from noamtamim:bandwidthmeter-5g
PiperOrigin-RevId: 313372995
2020-05-29 21:15:17 +01:00
tonihei
b05e9944ea Update TrackSelectionDialogBuilder to use androidx compat Dialog.
This ensure style themes are correctly applied.

issue:#7357
PiperOrigin-RevId: 313145345
2020-05-29 21:15:17 +01:00
olly
1d8dd763f0 Fix SimpleCache.getCachedLength rollover bug & improve test coverage
PiperOrigin-RevId: 312266156
2020-05-29 21:15:17 +01:00
samrobinson
09025d3912 Allow MP3 files to play with size greater than 2GB.
Issue:#7337
PiperOrigin-RevId: 312042768
2020-05-29 21:15:17 +01:00
olly
4736a102f8 Attach ExoMediaCryptoType for progressive streams
PiperOrigin-RevId: 311628160
2020-05-29 21:15:17 +01:00
olly
f116f29812 Prevent leaking of the Thread.interrupt flag to other LoadTasks
PiperOrigin-RevId: 311290214
2020-05-29 21:15:17 +01:00
samrobinson
ad1dffcae8 Make the base values of SilenceSkippingAudioProcessor configurable.
Issue:#6705
PiperOrigin-RevId: 310907118
2020-05-29 21:15:17 +01:00
samrobinson
8304cf3480 Change SilenceSkippingAudioProcessor to not rely on the frame MSB.
PiperOrigin-RevId: 309925306
2020-05-29 21:15:17 +01:00
tonihei
d159f622c2 Update initial bitrate estimates.
PiperOrigin-RevId: 309720018
2020-05-29 21:15:17 +01:00
Oliver Woodman
01ff17f3e7 Merge pull request #7304 from AChep:patch-1
PiperOrigin-RevId: 309395364
2020-05-29 21:15:17 +01:00
olly
2fa2fb73b7 Catch correct exception from Context.startService
Issue: #7306
PiperOrigin-RevId: 309392633
2020-05-29 21:15:17 +01:00
Oliver Woodman
7414a86fe0 Let MediaSourceFactory setDrmSessionManager accept null
Issue: #7168
2020-05-29 21:15:17 +01:00
Oliver Woodman
dfc3c507a0 Don't allow bad MediaSource release implementation to crash player.
This also allows subsequent MediaSource instance in the list to still
be released successfully.

Issue: #7168
2020-05-29 21:15:17 +01:00
olly
1772b0d917 ConditionVariable: Fix block(long) to correctly handle large timeouts
PiperOrigin-RevId: 308815613
2020-05-27 20:35:00 +01:00
olly
9213ffafa8 ConditionVariable: Improve documentation and allow clock injection
- Improve documentation explaining the benefits of ExoPlayer's ConditionVariable
  over the one that the platform provides
- Allow Clock injection
- Create TestUtil method for obtaining a ConditionVariable whose block(long)
  method times out correctly when used in a Robolectric test
- Add basic unit tests for ConditionVariable

PiperOrigin-RevId: 308812698
2020-05-27 20:33:54 +01:00
christosts
3ac4c1a6e5 Add Clock#currentTimeMillis()
PiperOrigin-RevId: 306602043
2020-05-27 20:31:38 +01:00
aquilescanta
49e5e66033 Fix NPE when reading from a SampleQueue from a loading thread
Issue: #7273
PiperOrigin-RevId: 308238035
2020-05-27 20:22:32 +01:00
aquilescanta
7ee08f09d2 Fix AdsMediaSource parameter when reporting load error
PiperOrigin-RevId: 308041841
2020-05-27 20:10:24 +01:00
tonihei
b954a5aa5f Fix timestamp rounding error in fMP4 extractor.
The sample timestamps are currently rounded to milliseconds, only to
be multiplied by 1000 later. This causes rounding errors where the sample
timestamps don't match the timestamps in the seek table (which are already
in microseconds).

issue:#7086
PiperOrigin-RevId: 307630559
2020-05-27 20:07:46 +01:00
ibaker
d9703358ac Use anti-aliasing and bitmap filtering for bitmap subtitles
issue:#6950
PiperOrigin-RevId: 307411067
2020-05-27 20:07:46 +01:00
olly
a697905cfb Fix H265Reader to correctly output SEI and AUD NAL units
Issue: #7113
PiperOrigin-RevId: 307380133
2020-05-27 20:07:46 +01:00
olly
190d81f0f6 Noop naming generalization for H265Reader
This change generalizes the concept of "reading parameter sets" to
"reading prefix NAL units", ahead of a change that will treat AUD
and suffix SEI NAL units in the same way.

The change also introduces some static isXxxNalUnit methods for
clarity.

Issue: #7113
PiperOrigin-RevId: 307376967
2020-05-27 20:07:46 +01:00
andrewlewis
e7e74afbff Fix AdsMediaSource child sources not being released
Also add unit tests for AdsMediaSource.

PiperOrigin-RevId: 307365492
2020-05-27 20:07:42 +01:00
andrewlewis
cf52742ad9 Fix gapless playback
Audio processors are now flushed twice after reconfiguration.
The second flush call cleared the pending trim start bytes so
transitions between tracks were no longer gapless.

Fix this by removing logic to clear pending trim bytes on flush.
As a result we may trim data incorrectly if there is a flush
before any data has been handled for seeking to a non-zero
position, but this edge case will happen rarely and the effect
shouldn't be noticeable.

PiperOrigin-RevId: 307344357
2020-05-27 19:36:49 +01:00
olly
e6b5e6eb6e Merge trick play tracks into main track groups
Issue: #6054
PiperOrigin-RevId: 307285068
2020-05-27 19:36:27 +01:00
Oliver Woodman
ad36f64965 Merge pull request #7210 from nebyan:CacheKeyFactoryNotUsed
PiperOrigin-RevId: 307045655
2020-05-27 19:29:20 +01:00
bachinger
aea9f8e550 Merge pull request #7245 from Clement-Jean:silence-media-source-factory
PiperOrigin-RevId: 307010600
2020-05-27 19:28:30 +01:00
andrewlewis
4dc1d317c3 Fix TeeAudioProcessor sink configuration
TeeAudioProcessor needs to configure its sink when it is initially set up.

PiperOrigin-RevId: 306808871
2020-05-27 19:27:16 +01:00
kimvde
f2d2d56109 Fix H265Reader
Update H265Reader to output the same samples after a seek to 0.

PiperOrigin-RevId: 306675050
2020-05-27 19:25:51 +01:00
olly
48081dd073 Parse trick-play role flags from DASH manifests
Issue: #6054
PiperOrigin-RevId: 306641689
2020-05-27 19:22:23 +01:00
aquilescanta
2df9491383 Avoid throwing an exception for sample default values
Allows playback of content when the default value is
not valid, but not used for any samples.

Issue: #7207
PiperOrigin-RevId: 306631376
2020-05-27 19:12:37 +01:00
olly
bdc0db30fd Don't select trick-play tracks by default
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306504362
2020-05-27 19:10:42 +01:00
olly
d538d6ae37 Fix capabilities check for low frame-rate content
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306437452
2020-05-27 19:09:58 +01:00
Oliver Woodman
76374d7822 Clean up playWhenReady 2020-04-08 22:11:33 +01:00
Oliver Woodman
55e33e3699 Fix missing subtitle addition 2020-04-07 21:43:09 +01:00
olly
f696a56b56 Audio focus: Restore full volume if focus is abandoned when ducked
If we're in the ducked state and updateAudioFocus is called with a
new state for which focus is no longer required, we should restore
the player back to full volume.

Issue: #7182
PiperOrigin-RevId: 305232155
2020-04-07 14:12:30 +01:00
Oliver Woodman
49858b82f2 Merge pull request #7184 from TiVo:p-subtitle-format-from-codecs
PiperOrigin-RevId: 305137114
2020-04-07 14:12:06 +01:00
olly
cc29798d9b Audio focus: Re-request audio focus if in a transient loss state
This avoids cases where audio focus is never successfully acquired
because another app is holding on to transient audio focus indefinitely.

Issue: #7182
PiperOrigin-RevId: 305108528
2020-04-07 14:02:46 +01:00
tonihei
3c0e617837 Merge AudioFocusManager methods to simplify control flow.
handlePrepare/Stop/SetPlayReady can be merged together as they all
handle changes to the desires state of the player.

Also, simplify parts of the control flow by not mixing code that
determines if audio focus needs to be handled with code that actually
acquires or abandons the focus.

PiperOrigin-RevId: 299824857
2020-04-07 14:01:54 +01:00
andrewlewis
07cbfb65e5 Fix stuck ad playbacks with DRM-protected content
When ClippingMediaPeriod first tried to read a buffer, if its end
position was before the end of the stream and it was buffered to its end
position, it would sometimes erroneously signal end-of-stream for
protected content because the sample queue might be waiting for DRM keys
at this point.

Work around the issue temporarily by signaling this specific case back
to ClippingMediaPeriod via the DecoderInputBuffer.

There will likely be a cleaner fix as a result of adding support for
dynamic clip end points in the future, at which point this can be
reverted.

issue:#7188
PiperOrigin-RevId: 305081757
2020-04-07 13:49:54 +01:00
Oliver Woodman
d4d7907193 Revert "Remove duplicate SCTE-35 format and add sample to TsExtractorTest"
This reverts commit 8591e69b6a40162ffc801a1569549ca826606cc5.
2020-04-07 13:43:28 +01:00
Oliver Woodman
f14c028078 Fix dump files for release 2020-04-03 22:57:06 +01:00
samrobinson
b8e6e98430 Simplify WakeLockManager and WifiLockManager logic.
Disabling reference counting allows some checks to be removed.

This is a no-op.

PiperOrigin-RevId: 299829600
2020-04-03 22:52:40 +01:00
samrobinson
83c2ca5902 Add WifiLock management to SimpleExoPlayer.
Issue:#6914
PiperOrigin-RevId: 297598910
2020-04-03 22:52:35 +01:00
samrobinson
e4e56fac09 Clean WakeLockManager.updateWakeLock logic.
PiperOrigin-RevId: 284552723
2020-04-03 22:49:03 +01:00
kimvde
d921491e7d Remove thread checks in player constructor
SimpleExoPlayer instances don't have to be created from the application
thread.

PiperOrigin-RevId: 304190901
2020-04-01 23:04:51 +01:00
olly
38f282800c Fix ADTS extraction with mid-stream ID3
PiperOrigin-RevId: 304184650
2020-04-01 23:04:36 +01:00
Oliver Woodman
c75f3f77ff Merge pull request #7099 from matamegger:feature/fix_pssh_v1_on_firetv
PiperOrigin-RevId: 303937576
2020-04-01 22:58:03 +01:00
olly
1f44a4db4b Bump version to 2.11.4
PiperOrigin-RevId: 303776645
2020-03-30 19:27:23 +01:00
andrewlewis
fea0acd41a Fix PlaybackStatsListener behavior when not keeping history
issue:#7160
PiperOrigin-RevId: 303747338
2020-03-30 18:36:10 +01:00