5575 Commits

Author SHA1 Message Date
ibaker
3101a5df58 Tweak null-handling of trackGroupToSampleQueueIndex in HlsSampleStreamWrapper
PiperOrigin-RevId: 275814023
2019-10-30 08:46:58 +00:00
ibaker
e43658af1f Switch back from method ref to Runnable in HlsSampleStreamWrapper
This reverts a81dea6a47 and adds in the necessary nullness annotations

After a discussion that this:: method references allocate on every call:
https://dzone.com/articles/passing-thismethod-reference-within-a-loop-affects

PiperOrigin-RevId: 275813989
2019-10-30 08:46:50 +00:00
bachinger
e6e2dcc58d Rollback of 36f8bd78f7
*** Original commit ***

Rollback of 4ad4e3e4fc

*** Original commit ***

Rollback of 3b22db33ba

*** Original commit ***

add top-level playlist API to ExoPlayer

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

***

PiperOrigin-RevId: 275813737
2019-10-30 08:46:42 +00:00
ibaker
93f2dd8deb Switch test usages of ConditionVariable#block(timeout) to CountDownLatch
ConditionVariable.block(timeout) doesn't work in Robolectric, because it
relies on the system clock which doesn't advance.

PiperOrigin-RevId: 275798281
2019-10-30 08:46:33 +00:00
Arnold Szabo
0391e73a0b Adding support for overlapping subtitles 2019-10-30 00:43:15 +02:00
Arnold Szabo
579167743b Parse and apply position attribute in SSA subtitles 2019-10-27 18:54:34 +02:00
samrobinson
694ccf424b Added an ICY header workaround for unseekable MP3 streams.
Issue:#6537
PiperOrigin-RevId: 275477266
2019-10-18 17:43:21 +01:00
ibaker
b7f335c715 Remove HlsSampleStreamWrapper from the null checking blacklist
PiperOrigin-RevId: 275440589
2019-10-18 17:43:13 +01:00
ibaker
1317851535 Remove HLS WebVttExtractor from null-checking blacklist
The null-checker wasn't clever enough to understand the while-loop was safe
so I switched it to a for.

PiperOrigin-RevId: 275440464
2019-10-18 17:43:06 +01:00
tonihei
16a6946f3e Replace @MonotonicNonNull with @Nullable for final variables.
@MonotonicNonNull is not useful if the variable is final, because it's only
assigned once and guaranteed to keep it's current nullability in the same
way as @MonotonicNonNull ensures it's kept non-null after checking.

This way, the workarounds can also be removed.

PiperOrigin-RevId: 275428656
2019-10-18 17:42:43 +01:00
andrewlewis
39d5f14343 Don't propagate empty supplemental data
PiperOrigin-RevId: 275425267
2019-10-18 17:42:35 +01:00
olly
701b013cdd Rollback of 9f0fd870e7
*** Original commit ***

Port Exo v1 work around for frame synchronization issue in KitKat to Exo v2.

***

PiperOrigin-RevId: 275372272
2019-10-18 17:42:27 +01:00
olly
64786c6ce4 Refactor GlViewGroup to ViewRenderer
GlViewGroup doesn't work properly as an actual ViewGroup. For example,
it doesn't support addition of child views after instantiation. This
change turns the class into a renderer, which is also more consistent
with other classes in the package.

PiperOrigin-RevId: 275322295
2019-10-18 17:42:19 +01:00
bachinger
0c0a67bb93 Fail at preparation when trying to download live content.
PiperOrigin-RevId: 275293735
2019-10-18 17:42:11 +01:00
bachinger
36f8bd78f7 Rollback of 4ad4e3e4fc
*** Original commit ***

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: 275276158
2019-10-18 17:42:03 +01:00
ibaker
9ec2d2fb36 Remove HlsMediaSource from null-checking blacklist
PiperOrigin-RevId: 275233915
2019-10-18 17:41:54 +01:00
olly
d874656e8a Round impossible H264 resolutions up to valid values for capabilities check
If an odd resolution is impossible in the specification itself, then we know
that the caller is passing invalid data. Round up on the assumption it's a
rounding error so that playback can proceed.

Issue: #6551
PiperOrigin-RevId: 275226813
2019-10-17 11:52:50 +01:00
ibaker
0d5b3c0fa4 Remove HlsMasterPlaylist from null-checking blacklist
PiperOrigin-RevId: 275052534
2019-10-17 11:52:34 +01:00
Oliver Woodman
23f545a0a4 Merge pull request #6528 from julioz:log-param
PiperOrigin-RevId: 275014741
2019-10-16 14:02:21 +01:00
samrobinson
841b3a8bc7 Add AUDIO_BECOMING_NOISY handling to SimpleExoPlayer.
Feature enabled through the SimpleExoPlayer.setHandleAudioBecomingNoisy.

PiperOrigin-RevId: 274988924
2019-10-16 14:02:11 +01:00
ibaker
e63d3b4b61 Add HlsSampleStreamWrapper#assertPreparationComplete
This gives a clear way to ensure all the preparation-related @MonotonicNonNull
fields have been set to something.

PiperOrigin-RevId: 274988280
2019-10-16 14:02:03 +01:00
tonihei
03e3ceaedb Align PlaybackSuppressionReason java doc with method doc.
Same change as done in c49388aca2.

PiperOrigin-RevId: 274894288
2019-10-15 23:08:45 +01:00
olly
5e538a2a28 Clean up GvrPlayerActivity
PiperOrigin-RevId: 274845045
2019-10-15 23:08:23 +01:00
ibaker
fc95d07a94 Remove HlsChunkSource from null-checking blacklist
PiperOrigin-RevId: 274789337
2019-10-15 23:08:00 +01:00
ibaker
0ba91811d1 Break the inheritance of FullSegmentEncryptionKeyCache
Use composition instead.

This makes the null-handling more explicit & complete (previous implementation
tried to prevent null values, but didn't override all mutation methods
e.g. replace(), putIfAbsent() etc.)

PiperOrigin-RevId: 274778513
2019-10-15 23:07:53 +01:00
kimvde
a10fea30c9 Enable setOutputSurfaceWorkaround for some devices
The corresponding devices are Wiko FEVER l5460 and Huawei Honor 8X.

Issue:#6503
PiperOrigin-RevId: 274753710
2019-10-15 23:07:30 +01:00
ibaker
3eea797069 Rollback of fdfe631850
*** Original commit ***

Remove null-ness of muxedCaptionFormats list

Pre-work for removing HlsMasterPlaylist and HlsPlaylistParser from null-checking
blacklist.

***

PiperOrigin-RevId: 274591502
2019-10-15 23:07:23 +01:00
ibaker
fdfe631850 Remove null-ness of muxedCaptionFormats list
Pre-work for removing HlsMasterPlaylist and HlsPlaylistParser from null-checking
blacklist.

PiperOrigin-RevId: 274585117
2019-10-15 23:07:15 +01:00
ibaker
e670b1d0f6 Remove HlsMediaChunk from null-checking blacklist
PiperOrigin-RevId: 274566133
2019-10-14 14:35:42 +01:00
olly
d36abf966e Fix broken Javadoc
PiperOrigin-RevId: 274564800
2019-10-14 14:18:49 +01:00
olly
c49388aca2 Clean up playback suppression
PiperOrigin-RevId: 274561876
2019-10-14 13:58:11 +01:00
ibaker
eb677eb4b9 Add a Util.nullSafeArrayAppend and use it in HlsSampleStreamWrapper
I could do this with nullSafeArrayConcat but this saves allocating a throw-away
single-element array.

PiperOrigin-RevId: 274545815
2019-10-14 13:58:04 +01:00
ibaker
498a23e328 Add null-checker annotations to HlsSampleStreamWrapper
PiperOrigin-RevId: 274545728
2019-10-14 13:57:56 +01:00
ibaker
6ebcac3883 Remove DefaultHlsExtractorFactory from null-checking blacklist
PiperOrigin-RevId: 274537528
2019-10-14 13:57:48 +01:00
olly
b71b9f7c58 Bump version to 2.10.6
PiperOrigin-RevId: 274534626
2019-10-14 13:57:41 +01:00
andrewlewis
d52f06e611 Clean up surface on setting renderer
If a surface was previously passed to the player then an output buffer
renderer was set, we would remove surface callbacks but not clear the
surface on renderers that accept MSG_SET_SURFACE.

PiperOrigin-RevId: 274532266
2019-10-14 13:57:33 +01:00
olly
ce01c79e01 Add a javadoc explanation for ProgressiveDownloader that explains that it tries to skip downloading already cached bytes.
download calls through to CacheUtil#cache, which handles skipping already downloaded bytes.

It is useful for callers to know that ProgressiveDownloader has this behavior - otherwise, they might reimplement the logic themselves.

I hope this behavior is something that can be part of the public API :)

PiperOrigin-RevId: 274202995
2019-10-13 12:41:55 +01:00
andrewlewis
1c66010b4a Add MediaFormat on video frame metadata listener
This is useful for apps that want to access HDR metadata that MediaCodec puts
in its output format.

PiperOrigin-RevId: 274169985
2019-10-13 12:41:47 +01:00
olly
4ae79105de Make FileDataSourceFactory an inner class
This is a proof of concept for cleanup we should do for all of
our DataSource implementations as we move toward stabilizing
parts of the API.

- Move all XDataSourceFactory classes to be inner classes.
- Remove chained constructors for XDataSourceFactory classes. Keep
  required args going through constructors. Use setters for the
  rest.
- Not applicable in this case, but we probably want to deprecate
  all but the no-arg method for instantiating eac XDataSource
  instance (with the all-arg method kept but with the intention
  of making it package private).

PiperOrigin-RevId: 274162076
2019-10-13 12:41:39 +01:00
andrewlewis
5f71e86335 Handle legacy DASH audio channel configuration
Issue: #6523
PiperOrigin-RevId: 274160232
2019-10-13 12:41:24 +01:00
ibaker
a81dea6a47 In-line 2 method reference runnables in HlsSampleStreamWrapper
PiperOrigin-RevId: 274148614
2019-10-13 12:41:16 +01:00
bachinger
674e92e1ee provide content description for the player view to make show/hide controls accessible
PiperOrigin-RevId: 274148026
2019-10-13 12:41:08 +01:00
olly
a268e1b63f Test audio focus denial
- Verifies that playWhenReady doesn't become true if audio focus
  is denied.
- Also verifies there's no suppression reason in this case, because
  the denial is permanent rather than temporary.

PiperOrigin-RevId: 274141099
2019-10-13 12:41:00 +01:00
olly
46c6f260f5 Add test action for setting audio attributes
Also removed "to be executed" from all the comments, since it
didn't seem to add value.

PiperOrigin-RevId: 274139837
2019-10-13 12:40:52 +01:00
olly
3f7c3bb085 Don't set a playback suppression reason for permanent audio focus loss
It's documented to be for temporary loss only (i.e. the case where
externally reported playWhenReady is still true)

PiperOrigin-RevId: 274129922
2019-10-13 12:40:44 +01:00
Julio Zynger
706668fde3 Name logged fields in EventLogger 2019-10-10 19:49:09 +02:00
sofijajvc
62618f24ec Remove copybara exclusions and add extension to the demo app
Issue: #3353
PiperOrigin-RevId: 273949689
2019-10-10 14:46:16 +01:00
ibaker
60566721d4 Enable ID3-in-EMSG for HLS streams
This supports both chunkless & traditional preparation

PiperOrigin-RevId: 273938344
2019-10-10 14:46:07 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
olly
3d0886f458 Fix bogus reporting of audio focus loss
Playback cannot be suppressed if playWhenReady=false

PiperOrigin-RevId: 273726084
2019-10-10 14:44:39 +01:00