4970 Commits

Author SHA1 Message Date
ibaker
0d144366c3 Mark MediaSessionService.MediaNotification final
PiperOrigin-RevId: 406347510
2021-11-09 10:07:00 +00:00
christosts
2c98e8bb4f ExoPlayer.Builder: lazily initialize default components
Initialize default components lazily in ExoPlayer.Builder to avoid
redundant component instantiations, useful in cases where apps
overwrite default components with ExoPlayer.Builder setters.

The fields in ExoPlayer.Builder are wrapped in a Supplier (rather than
just making then nullable and initializing them in
ExoPlayer.Builder.build()) so that we maintain the proguarding
properties of this class.

PiperOrigin-RevId: 406345976
2021-11-09 10:06:11 +00:00
christosts
9d5fd4f402 DefaultExtractorsFactory: lazily load flac extension
PiperOrigin-RevId: 406332026
2021-11-09 10:06:11 +00:00
bachinger
80c5e00b18 Defer setting defaults for rendition reports until playlist is parsed
This makes sure that #EXT-X-RENDITION-REPORT tags can be placed before
the list of segments/parts as well. We were previously assuming that
these come at the end, which naturally would make sense and is done like
this in all examples, but it is not explicitly defined by the spec.

Issue: google/ExoPlayer#9592
PiperOrigin-RevId: 406329684
2021-11-09 10:05:40 +00:00
bachinger
222db48298 Make package in test manifest consistent
PiperOrigin-RevId: 406255369
2021-11-08 15:18:26 +00:00
ibaker
a60843ead5 Migrate callers of deprecated C.java methods to Util.java
#minor-release

PiperOrigin-RevId: 406166670
2021-11-08 15:17:26 +00:00
ibaker
67640dff0e Remove confusing @throws clauses from MediaLibrarySessionCallback
These seem to be describing an exception being thrown based on a
property of the value being returned from this method? Or is the
expectation that every implementation of this interface throws the
AssertionError themselves.

Given AssertionError is unchecked, and shouldn't be explicitly caught
anywhere, it seems easiest just to remove all this documentation?

PiperOrigin-RevId: 406107606
2021-11-08 15:16:11 +00:00
huangdarwin
7f64a5a1aa Transformer GL: Simplify GL program handling.
Relanding 9788750ddb, with some changes
applied to improve primarily readability, naming,
and nullness checks.

PiperOrigin-RevId: 406101742
2021-11-08 15:15:02 +00:00
ibaker
f37e980018 Migrate media3.session references from Window to MediaItem
#minor-release

PiperOrigin-RevId: 405927299
2021-11-08 15:13:41 +00:00
ibaker
d83fe03d88 Update most Player parameter & doc references from Window to MediaItem
Only deprecated references remain.

Usages of the deprecated methods will be migrated in a follow-up change.

#minor-release

PiperOrigin-RevId: 405927141
2021-11-08 15:12:32 +00:00
ibaker
b60acca872 Clarify that ExoPlayer.Builder constructor overloads only exist for R8
Also add a setRenderersFactory() method, so that all constructor-provided
components can also be passed via setters.

This comment already appears on the constructor that takes all
components, but it applies to these ones as well.

PiperOrigin-RevId: 405917343
2021-11-08 15:11:15 +00:00
hschlueter
399172d63f Refactor nullness checks in renderers.
`checkNotNull` should be avoided where possible.
This change adds `@EnsuresNonNull` or `@EnsuresNonNullIf` to configuration methods for fields they initialize.

`checkNotNull` is now avoided for the `@MonotonicNonNull` formats by adding `@RequiresNonNull` annotations.

`checkNotNull` is now avoided for the encoder and decoder in `feedMuxerFromEncoder()`, `feedEncoderFromDecoder()`, `feedDecoderFromInput()`, etc. by creating local variables for `encoder` and `decoder` in `render` after the configuration method calls and passing these as non-null parameters.

PiperOrigin-RevId: 405893824
2021-10-27 17:51:40 +01:00
ibaker
60a68f8891 Remove IntRange from Player.getMediaItemAt
No other index-related methods in Player are annotated, it's considered
obvious that these should be >=0.

PiperOrigin-RevId: 405882756
2021-10-27 17:50:41 +01:00
ibaker
d39ffa5a34 Add missing javadoc to new ExoPlayer.Builder constructors
Should have been part of
<unknown commit>

#minor-release

PiperOrigin-RevId: 405880982
2021-10-27 17:49:43 +01:00
ibaker
9a49a9ccda Remove all references to @NonNull
Our package-info.java files are annotated with @NonNullApi which results
in everything being non-null by default, so this annotation is never
needed.

#minor-release

PiperOrigin-RevId: 405864737
2021-10-27 17:48:40 +01:00
andrewlewis
651985b0ac Move doc-files to new package name
PiperOrigin-RevId: 405862549
2021-10-27 13:08:53 +01:00
ibaker
e8fdab353f Allow missing full_range_flag in colr box with type=nclx
Test file produced with:
$ MP4Box -add "sample.mp4#video:colr=nclc,1,1,1" -new sample_18byte_nclx_colr.mp4

And then manually changing the `nclc` bytes to `nclx`.

This produces an 18-byte `colr` box with type `nclx`. The bitstream of
this file does not contain HDR content, so the file itself is invalid
for playback with a real decoder, but adding the box is enough to test
the extractor change in this commit.

(aside: MP4Box will let you pass `nclx`, but it requires 4 parameters, i.e. it
requires the full_range_flag to be set, resulting in a valid 19-byte colr box)

#minor-release
Issue: #9332
PiperOrigin-RevId: 405842520
2021-10-27 13:04:55 +01:00
samrobinson
031f26ba61 Migrate SegmentSpeedProviderTest off deprecated method.
PiperOrigin-RevId: 405841397
2021-10-27 13:03:48 +01:00
olly
aff15ae9ee Set assumedVideoMinimumCodecOperatingRate for all playbacks
PiperOrigin-RevId: 405736227
2021-10-27 09:23:28 +01:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00