7939 Commits

Author SHA1 Message Date
aquilescanta
79acadcc89 Check for section_syntax_indicator in TS tables
Issue:#7325
PiperOrigin-RevId: 314321914
2020-06-03 10:17:39 +01:00
Oliver Woodman
5e2b89b562 Add release date 2020-06-01 19:15:15 +01:00
Oliver Woodman
9f87c2eaef Finalize release notes 2020-06-01 19:12:39 +01:00
Oliver Woodman
9830c773c6
Merge pull request #7455 from google/dev-v2-r2.11.5-7193
Merge fix for #7193 into dev-v2-r2.11.5
2020-06-01 19:11:01 +01:00
tonihei
145754618d Simplify keeping track of current id in DefaultPlaybackSessionManager
We currently have a currentMediaPeriodId and an activeSessionId that are more
or less tracking the same thing unless the current media period isn't "active" yet.

Simplify this logic by using a single currentSessionId field and the respective
isActive flag of this session. Also move all session creation and activation code in
the same method to make it easier to reason about the code.

This change also fixes a subtle bug where events after a seek to a new window
are not ignored as they should.

PiperOrigin-RevId: 289432181
2020-06-01 18:04:26 +01:00
tonihei
f4cc1d6250 Make sure finishAllSessions() can be called without removing listener
Currently, this method is only supposed to be called before removing
the listener from the player or when releasing the player.

If called at other times, it will throw an exception later when
a playback session is ended automatically.

issue:#7193
PiperOrigin-RevId: 308254993
2020-06-01 18:01:46 +01:00
tonihei
18eccf9a81 Make sure not to create new playback sessions while still IDLE.
The first session should only be created once we have the media items
and/or called prepare. Otherwise the first session is created with
an EventTime having an empty timeline making it less useful.

issue:#7193
PiperOrigin-RevId: 308100555
2020-06-01 17:52:48 +01:00
Oliver Woodman
1062edf52e Revert "Update TrackSelectionDialogBuilder to use androidx compat Dialog."
This reverts commit b05e9944ea95c2b1a341610568e5cfbe8df6f333.
2020-06-01 09:50:40 +01:00
andrewlewis
b5e5b55ef8 Fix typo
PiperOrigin-RevId: 312083761
2020-05-29 22:32:43 +01:00
andrewlewis
35a705e92a Add release notes for issues fixed by preloading migration
PiperOrigin-RevId: 312080838
2020-05-29 22:32:12 +01:00
andrewlewis
51a3f214ed Fix handling of fetch errors for post-rolls
The ad break time in seconds from IMA was "-1" for postrolls, but this didn't
match C.TIME_END_OF_SOURCE in the ad group times array.

Handle an ad break time of -1 directly by mapping it onto the last ad group,
instead of trying to look it up in the array.

PiperOrigin-RevId: 312064886
2020-05-29 22:29:29 +01:00
andrewlewis
51b2a0f7a9 Add support for timing out ad preloading
Detect stuck buffering cases in ImaAdsLoader, and discard the ad group after
a timeout. This is intended to make the IMA extension more robust in the case
where an ad group unexpectedly doesn't load.

The timing out behavior is enabled by default but apps can choose to retain
the old behavior by setting an unset timeout on ImaAdsLoader.Builder.

PiperOrigin-RevId: 311729798
2020-05-29 22:29:14 +01:00
andrewlewis
e8c7405545 Upgrade IMA SDK to 3.19.0
PiperOrigin-RevId: 311106612
2020-05-29 22:20:00 +01:00
andrewlewis
e482aa2be8 Fix method ordering in ImaAdsLoader
Put static methods at the end.

Also add a couple of missing parameter name comments.

PiperOrigin-RevId: 311077684
2020-05-29 22:18:15 +01:00
andrewlewis
929b60e209 Improve DEBUG logging in ImaAdsLoader
Log content progress events, as these are helpful to debug triggering of events
based on the content progress.

Don't log AD_PROGRESS events as they occur several times per second while ads
are playing, and the verbosity makes logs difficult to read.

PiperOrigin-RevId: 311077302
2020-05-29 22:17:51 +01:00
andrewlewis
5529c124fe Remove deprecated symbols in ImaAdsLoader
PiperOrigin-RevId: 310901647
2020-05-29 22:17:24 +01:00
andrewlewis
8c108fb5fd Upgrade IMA SDK to 3.18.2
PiperOrigin-RevId: 310883076
2020-05-29 22:17:00 +01:00
andrewlewis
3b99a84dae Migrate to new IMA preloading APIs
issue:#6429
PiperOrigin-RevId: 309906760
2020-05-29 22:15:30 +01:00
andrewlewis
de03e389c0 Enable nullness checking for the IMA extension
adPlaybackState is now non-null, and the uninitialized case is covered by a new
boolean hasAdPlaybackState. Position progress updates are now non-null and
initialized with IMA's VIDEO_TIME_NOT_READY constant.

Also fix some misc code issues:
- Remove empty branch for SmoothStreaming (Android Studio warns about this).
- Tidy onTimelineChanged and onPositionDiscontinuity and the methods they call
  to improve naming.
- Remove logging for IMA events after release, as these methods are expected to
  be called in the current IMA SDK behavior.

PiperOrigin-RevId: 308977116
2020-05-29 21:58:59 +01:00
andrewlewis
6e66dc02fb Replace IMA ad tag fakes with mocks
The mocking setup is quite messy/unclear compared to the fakes, but it seems
worth switching over because IMA API changes have already required changes
to fakes in the past, and there are more API changes in the version we are
about to upgrade to. This change should generally remove the need to keep
the fakes up-to-date.

PiperOrigin-RevId: 308819176
2020-05-29 21:58:46 +01:00
tonihei
67d1b728d3 Clarify/fix position reference points for AdPlaybackState.
The positions were interchangeably used with window and period
positions. This change more clearly ensures that all positions in the
AdPlaybackState are based on periods and that we use the right adjustments
for all usages.

PiperOrigin-RevId: 297811633
2020-05-29 21:50:07 +01:00
tonihei
d1b900604a Add test to ensure AdsLoader is initialized.
This tests explicitly that initialization happens even if the Timeline
is a placeholder.

No other change is needed. While the Timeline is still a placeholder
ImaAdsLoader.getCurrentPeriodPosition will return 0 and trigger
pre-rolls (intended behaviour) and it doesn't matter whether the
actual initial period position may be somewhere else.

PiperOrigin-RevId: 298833867
2020-05-29 21:42:22 +01:00
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