7900 Commits

Author SHA1 Message Date
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
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
7d3f54a375
Merge pull request #7162 from google/dev-v2-r2.11.4
r2.11.4
2020-04-08 22:48:19 +01:00
Oliver Woodman
76374d7822 Clean up playWhenReady 2020-04-08 22:11:33 +01:00
Oliver Woodman
54f3e6a203 Revert release note indentation change 2020-04-08 22:03:06 +01:00
olly
f95a0caec3 Update misc dependencies
PiperOrigin-RevId: 305503804
2020-04-08 21:53:45 +01:00
olly
1f4d37431e Upgrade cast dependency
Issue: #7191
PiperOrigin-RevId: 305502293
2020-04-08 21:52:38 +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
29118f4586 Tweak release note 2020-04-04 00:21:20 +01:00
Oliver Woodman
f14c028078 Fix dump files for release 2020-04-03 22:57:06 +01:00