10923 Commits

Author SHA1 Message Date
andrewlewis
c80e7b0a68 Add back jcenter() to repositories
The buildscript entry is required by
com.android.tools.build:gradle:4.0.1.

For other projects, it appears that org.checkerframework is
in jcenter.

Without this change building with gradlew is broken, at least.

#minor-release

PiperOrigin-RevId: 366222799
2021-04-01 16:06:26 +01:00
olly
ae47a138ee Delete unused surfacecapturer package
PiperOrigin-RevId: 366131005
2021-04-01 16:06:18 +01:00
ibaker
af926deb7a Use outputStreamEnded for MetadataRenderer#isEnded
Issue: #8710
#minor-release
PiperOrigin-RevId: 366051836
2021-04-01 16:06:09 +01:00
tonihei
a7d7cfd023 Release all PlaybackStatsListener session when timeline becomes empty.
Currently they are only released when the timeline becomes non-empty
again or the player is released.

Issue: #8778
PiperOrigin-RevId: 366041625
2021-04-01 16:06:01 +01:00
andrewlewis
86a0a405b6 Update instructions for GMaven releasing
Issue: #5246

#minor-release

PiperOrigin-RevId: 366041182
2021-04-01 16:05:53 +01:00
ibaker
056ef5c914 Use Metadata.Entry.toString in PlaybackOutput test logging if possible
Add an allowlist of Metadata.Entry implementations with stable toString
overrides.

PiperOrigin-RevId: 366037505
2021-04-01 16:05:44 +01:00
olly
f5a4f3e609 Switch tests to use SimpleExoPlayer
PiperOrigin-RevId: 366033200
2021-04-01 16:05:35 +01:00
ibaker
c02288452b Add test for emsg near to end of DASH period
The dumped output should include metadata, but doesn't because of
Issue: #8710. The fix is in a follow-up change.
PiperOrigin-RevId: 366028303
2021-04-01 16:05:27 +01:00
bachinger
2fa3675edb [Cast] Notify media item transition only when playing period removed
When playback transitions automatically, the timeline may have changed because the cast device learned about the duration of the next media item and includes this in the new media status that is sent to the CastPlayer. In such a case we need to make sure that we don't report a media item transition with reason PLAYLIST_CHANGED but for reason AUTO.

PiperOrigin-RevId: 366025323
2021-04-01 16:05:18 +01:00
jaewan
ffb5b41a20 Fix typo in Player#setMediaItems() Javadoc
PiperOrigin-RevId: 366015326
2021-04-01 16:05:10 +01:00
Oliver Woodman
6603c6bbcf Merge pull request #8720 from dlafayet:tts-shear-block
PiperOrigin-RevId: 365998615
2021-04-01 16:05:00 +01:00
tonihei
dc0ee7580e Deprecate AnalyticsListener.onSeekStarted.
The new onPositionDiscontinuity callback contains sufficient information, so
that this former workaround to obtain the position before a seek is no longer
needed.

PiperOrigin-RevId: 365993937
2021-04-01 16:04:51 +01:00
olly
7aeb476812 Fix DefaultExtractorInputTest.largeSkip
PiperOrigin-RevId: 365992439
2021-04-01 16:04:42 +01:00
olly
db42bef17b Modify visibility of onQueueInputBuffer.
Aims to achieve visibility parity with MediaCodecRenderer#onQueueInputBuffer.

Allows measuring the time when the codec queue the first input buffer in the codec. Which means the Codec has been initialized and is about to start decoding.

It also allows measuring how long it takes for the Codec to render its first frame.

PiperOrigin-RevId: 365906756
2021-04-01 16:04:34 +01:00
tonihei
192c1a18f7 Don't include video tracks without bitrate in adaptive selection.
This is generally not supported by our classes. A similar change for audio
was made in aa2beb080c.

PiperOrigin-RevId: 365795371
2021-04-01 16:04:26 +01:00
ibaker
84ce648c90 Move @Ignore from class to methods in DashWidevineOfflineTest
PiperOrigin-RevId: 365794941
2021-04-01 16:04:16 +01:00
tonihei
f31894616c Ensure callback can't access player before constructor finished.
If the player is created on a background thread (which is allowed
as the only exception to the access-on-one-thread-only rule), it
may happen that a callback on the main thread tries to access the
player before the constructor even finished. This is dangerous and
can cause exceptions due to uninitialized variables.

To solve this, we can make sure that every player access is blocked
until the constructor finished. Blocking is safe because the
constructor itself is not doing any blocking work or acquiring locks.

The thread verification method is already called on every entry
point to the player, so we can reuse the same method for checking.

PiperOrigin-RevId: 365792949
2021-04-01 16:04:08 +01:00
tonihei
394ab7bcfd Make use of position discontinuity changes.
The extended onPositionDiscontinuity callback can be used to improve some
listener classes:
 - Listening to onTimelineChanged to detect discontinuities is no longer needed.
 - Listening to onSeekStarted is no longer needed as the start position is part
   of the onPositionDiscontinuty callback.
 - The exact old position is also useful for media time history logging.

As a side effect, removing onSeekStarted handling from PlaybackStatsListener
fixes Issue: #8675 that was caused by the special EventTime handling for
onSeekStarted.

PiperOrigin-RevId: 365558959
2021-04-01 16:04:00 +01:00
olly
47af9a6889 Enable internal retry for recoverable codec exceptions
PiperOrigin-RevId: 365556167
2021-04-01 16:03:51 +01:00
tonihei
76700e9d84 Log error for TrackGroups with multiple languages or role flags.
A TrackGroup must contain the same content in all Formats (except for
the quality, encoding etc). Verify that the language and role flags
are the same and log an error if don't match. Don't throw to avoid
breaking existing use cases that just happen to work by chance.

PiperOrigin-RevId: 365539240
2021-04-01 16:03:43 +01:00
ibaker
dd3597c2c1 Document that the order of cues passed to TextOutput is important
Fix WebViewSubtitleOutput to respect this (CanvasSubtitleOutput already
does).

Issue: #8704
PiperOrigin-RevId: 365534018
2021-04-01 16:03:35 +01:00
kimvde
9be84e4998 Document execution of unavailable command
PiperOrigin-RevId: 365044658
2021-04-01 16:03:26 +01:00
tonihei
e42004652a Add 5G-NSA detection for API 31+
The hacky workaround for APIs 29/30 doesn't work on API 31. Instead,
we can use the onDisplayInfoChanged callback, that is accessible from
API 31.

PiperOrigin-RevId: 364997282
2021-04-01 16:03:17 +01:00
krocard
1526ca5e3c Move add/remove Player.Listener down of BasePlayer
The BasePlayer implementation of add/remove
Listener knows about Components.
As those are removed from the Player
interface, the implementation of those
methods needs to be moved down in Player
implementations.

This commit makes no functional change.

PiperOrigin-RevId: 364985291
2021-04-01 16:03:09 +01:00
krocard
774cce4df3 Make StubExoPlayer not abstract
All Player methods should throw
NotSupportedException.
Making it abstract prevents the compiler catching
non implemented methods.

PiperOrigin-RevId: 364974387
2021-04-01 16:02:59 +01:00
olly
3ebf94cd45 DataSources: Remove position-out-of-range workarounds
PiperOrigin-RevId: 364871094
2021-04-01 16:02:50 +01:00
Denise LaFayette
475b1fe3de Address code review comments 2021-03-25 11:59:28 -07:00
olly
2b0995635e StyledPlayerControlView: Fix view measurement issue
The exo_controls_background view is supposed to fill its parent,
and so previously used match_parent to do this. However, if the
parent uses wrap_content for its own dimensions, the constraints
being specified become somewhat ambiguous. The parent is supposed
to be sizing itself to wrap its children, and one of the children
is supposed to be sizing itself to match the parent.

Intuitively for this case, you'd hope that the layout logic would
size the parent to wrap its other children, and that the
match_parent child would then fill the parent with its determined
size. That's not what happens, and instead the parent ends up
expanding to occupy all of the space available to it.

This commit sets the exo_controls_background view's dimensions
to be 0dp in the layout, to stop it from influencing the size of
the parent. It's then expanded to fill the parent in code.

Issue: #8726
#minor-release
PiperOrigin-RevId: 364868301
2021-03-24 19:56:34 +00:00
bachinger
dc4148d576 Add positions and new reasons to onPositionDiscontinuity
PiperOrigin-RevId: 364861539
2021-03-24 19:56:25 +00:00
Denise LaFayette
4be774aaac Support tts:shear in TTML parser and WebView output 2021-03-24 12:39:44 -07:00
kimvde
f19ab4aa8b Add possibility to iterate over Commands
PiperOrigin-RevId: 364836973
2021-03-24 18:08:16 +00:00
ibaker
94a4ed7981 Treat Dolby Vision as H264 in MCVR#getCodecMaxInputSize()
Issue: #8705
PiperOrigin-RevId: 364821429
2021-03-24 18:08:06 +00:00
kimvde
e1fec35ff3 Add command to seek to default position
PiperOrigin-RevId: 364821216
2021-03-24 18:07:56 +00:00
tonihei
6f73ac659f Add 5G-SA initial bitrate estimates to bandwidth meter.
PiperOrigin-RevId: 364810286
2021-03-24 18:07:46 +00:00
Ian Baker
e2abc961b2 Merge pull request #8749 from romanofranz:patch-1
PiperOrigin-RevId: 364779790
2021-03-24 18:07:35 +00:00
aquilescanta
273d68accd Add missing switch case
Before this change, calling read after reaching the end of input in an Ogg file
would cause an IllegalStateException.

PiperOrigin-RevId: 364758873
2021-03-24 18:07:25 +00:00
gyumin
bffb68b23b Add BundleUtil to remove androidx.core dependency
It's copied from BundleCompat in androidx.core.

PiperOrigin-RevId: 364682379
2021-03-24 18:07:15 +00:00
tonihei
b35c81124d Add 5G-NSA detection.
PiperOrigin-RevId: 364607555
2021-03-24 18:07:06 +00:00
kimvde
c202d406fb Improve commands Javadoc
PiperOrigin-RevId: 364600438
2021-03-24 18:06:56 +00:00
kimvde
b6290b1164 Add commands only available in SimpleExoPlayer
PiperOrigin-RevId: 364598601
2021-03-24 18:06:46 +00:00
samrobinson
75dd1b4355 Add buildUpon to MediaMetadata.
PiperOrigin-RevId: 364590789
2021-03-24 18:06:36 +00:00
samrobinson
a68bb38ac4 Change MediaMetadata private constructor to take the Builder.
PiperOrigin-RevId: 364580585
2021-03-24 18:06:26 +00:00
kimvde
2c76bc5a4c JpegExtractor: support JFIF segment preceding Exif segment
#minor-release

PiperOrigin-RevId: 364561115
2021-03-24 18:06:16 +00:00
gyumin
3fbfc0ec0e Fix Timeline.toBundle for empty timeline
PiperOrigin-RevId: 364513299
2021-03-24 18:06:07 +00:00
krocard
bb1261da3c setPlaybackParameters no longer accepts null for DEFAULT
Null was an alias for DEFAULT. Remove this for nullness
safety in the API.

The ExoPlayer implementation still checks for null and
replaces it by DEFAULT, so this is ABI compatible.

PiperOrigin-RevId: 364370017
2021-03-24 18:05:57 +00:00
Ian Baker
6c688891e3 Merge pull request #8653 from dlafayet:textemphasis
PiperOrigin-RevId: 364363882
2021-03-24 18:05:46 +00:00
gyumin
7b4b5cbf5a Preserve window indices of Timeline when bundling
PiperOrigin-RevId: 364324490
2021-03-24 18:05:35 +00:00
ibaker
10a8c603f7 Fix review comments on SpannedData
Comments made after submitting
e14180e532

PiperOrigin-RevId: 364276495
2021-03-24 18:05:26 +00:00
andrewlewis
66c9964be8 Fix typo in styled player control view javadoc
#minor-release

PiperOrigin-RevId: 363915106
2021-03-24 18:05:16 +00:00
aquilescanta
d9d2b1fbdd Add 'once' to list of devices that need SetOutputSurfaceWorkaround
Issue: #8718
PiperOrigin-RevId: 363869093
2021-03-24 18:05:06 +00:00