7917 Commits

Author SHA1 Message Date
Andrew Lewis
03be1551a7 Clean up player event handling
This change is similar to e8293b92d877bd6e5a00606358db610d6fb7a4d6
but without relying on new player events that haven't been released
yet, to make it easier to merge changes related to ImaAdsLoader on
top.
2020-05-29 21:15:17 +01:00
andrewlewis
b3de2b08d4 Inline ENABLE_PRELOADING
ImaAdsLoader relies on preloading being enabled (it doesn't
work without it) so we may as well remove the constant to
avoid potential confusion.

PiperOrigin-RevId: 284951356
2020-05-29 21:15:17 +01:00
Oliver Woodman
cb85cdd3eb Fix typo in release notes 2020-05-29 21:15:17 +01:00
Oliver Woodman
4e6fe31ee1 Merge pull request #6724 from nnoury:fix/subtitles-outline-color
PiperOrigin-RevId: 292316767
2020-05-29 21:15:17 +01:00
olly
d162c07ecf Add show/hideScrubber to DefaultTimeBar
PiperOrigin-RevId: 300249371
2020-05-29 21:15:17 +01:00
olly
2640538228 Apply minimal layout change according to view size
- Add method to scale scrubber handle of DefaultTimeBar

PiperOrigin-RevId: 294366734
2020-05-29 21:15:17 +01:00
andrewlewis
10b8eff727 Don't overwrite MP4 container fps using capture fps
The capture frame rate is currently available both via Format.metadata
and decoded in Format.frameRate. As the container Format.frameRate may
be useful to apps, only store the capture frame rate in metadata (apps
will need to decode it but can now access the container frame rate too).

PiperOrigin-RevId: 284165711
2020-05-29 21:15:17 +01:00
tonihei
d14f559e94 Fix message indexing bug.
We keep an index hint for the next pending player message. This hint
wasn't updated correctly when messages are removed due to a timeline
update.

This change makes sure to only use the hint locally in one method so
that it doesn't need to be updated anywhere else and also adds the "hint"
suffix to the variable name to make it clearer that it's just a hint and
there are no guarantees this index actually exists anymore.

issue:#7278
PiperOrigin-RevId: 309217614
2020-05-29 21:15:17 +01:00
bachinger
68059070f4 Add missing nullable annotations
The MediaSessionConnector gets a Bundle passed to the MediaSession.Callback
from the framework which can be null. This needs to be properly annotated
with @Nullable.

Issue: #7234
PiperOrigin-RevId: 307822764
2020-05-29 21:15:17 +01:00
Oliver Woodman
9d6a46bccd Clean up release notes 2020-05-29 21:15:17 +01:00
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
5927d0302b Adding instructions on how to build and run ExoPlayer demo apps
Issue:#7338
PiperOrigin-RevId: 312470913
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
8736324d0e Clean up samples list
- Add Widevine AV1 streams
- Remove SD and HD only Widevine streams (we don't need so many!)
- Simplify naming

PiperOrigin-RevId: 311697741
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
Oliver Woodman
bc96d3a93c Merge pull request #7367 from inv3rse:keep-paused-state-during-buffering
PiperOrigin-RevId: 311623784
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
Oliver Woodman
5f6a489bd1 Merge pull request #7324 from tpiDev:cronet/migrate-to-play-services-17-0-0
PiperOrigin-RevId: 310115628
2020-05-29 21:15:17 +01:00
olly
4862c7e6a8 Upgrade OkHttp to 3.12.11.
PiperOrigin-RevId: 310114401
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
andrewlewis
2112b722b5 Add missing @Player.State in action schedule
PiperOrigin-RevId: 309735092
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
olly
d1ff984670 CronetDataSource: Use standard InterruptedIOException
PiperOrigin-RevId: 309710359
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
tonihei
c20b85ac60 Update Gradle plugins.
PiperOrigin-RevId: 309231983
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
vigneshv
8760424d76 av1_extension: Add a heuristic to determine default thread count
Android scheduler has performance issues when a device has a
combiation of big/medium/little cores. Add a heuristic to set the
default number of threads used for deocding to the number of
"performance" (i.e. big) cores.

PiperOrigin-RevId: 308683989
2020-05-27 20:28:37 +01:00
andrewlewis
f052e89a8f Pass app context to the IMA SDK
Notes: this doesn't fix the current issue where the component containing the
ad overlay view leaks, but is good practice anyway.
PiperOrigin-RevId: 308582036
2020-05-27 20:23:57 +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