I missed this when fixing `positionInMs` for Dackka in d2a3d8f6fa
This time I manually verified that all the `@Override` methods have
parameter names that match [the docs](https://developer.android.com/reference/androidx/leanback/media/PlayerAdapter).
#minor-release
PiperOrigin-RevId: 506017063
(cherry picked from commit 736f090cce540de78a968e62fd8c5aec413e8122)
ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden,
which causes lint errors with gradle.
#minor-release
PiperOrigin-RevId: 504306210
(cherry picked from commit f86948f01c2397b9f53ef598e311e2de9055118e)
This method allows to call through to `StreamManager.focus()` of the currently playing SSAI stream.
PiperOrigin-RevId: 501399144
(cherry picked from commit 0ba0c0ed43fbcf4a57f6fc91829ba00d72e3672f)
For TV devices the skip button needs to have the focus to be accessible with
the remote control. This property makes this configurable while being set to
true by default.
PiperOrigin-RevId: 501077608
(cherry picked from commit d2898b70ead3b2ad1244a730c3b456146755c138)
Initialising the fields as Integer and then getting a String on compute
time is slow. Instead we directly initialise these fields as String.
Improves the time taken in bundling PlayerInfo further to less than
200ms from ~300ms.
Also modified a test to improve productive coverage.
PiperOrigin-RevId: 500003935
(cherry picked from commit d49437c6e112e60e9c85edeef73a73bce7de939a)
Some Player methods operate relative to existing indices in the
playlist (add,remove,move,seek). As these operations may be issued
from a place with a stale playlist (e.g. a controller that sends
a command while the playlist is changing), we have to handle out-
of-bounds indices gracefully. In most cases this is already
documented and implemented correctly. However, some cases are not
documented and the existing player implementations don't handle
these cases consistently (or in some cases not even correctly).
PiperOrigin-RevId: 495856295
(cherry picked from commit a1c0b10482baffc3721561446ee4bb788d8a1231)
BasePlayer simplifies implementations by handling all the various
seek methods and forwarding to a single method that can then be
implemented by subclasses. However, this loses the information about
the concrete entry point used for seeking, which is relevant when
the subclass wants to verify or filter by Player.Command. This
can be improved by adding the command as a new parameter. Since
we have to change the method anyway, we can also incorporate the
boolean flag about whether the current item is repeated to avoid
the separate method.
PiperOrigin-RevId: 494948094
(cherry picked from commit 6e0f1f10b3666e6c2c74fc5a154dec3f0e03fecb)
Fix some other link titles and destinations spotted along the way.
#minor-release
PiperOrigin-RevId: 493276172
(cherry picked from commit c006575d4306f9bfad9c6f27d964fab00a6e1718)
These flags ensure that any errors cause the script to exit (instead of
just carrying on) (`-e`) and that any unrecognised substitution variables
cause an error instead of silently resolving to an empty string (`-u`).
Issues like Issue: google/ExoPlayer#10791 should be more quickly resolved with
`set -e` because the script will clearly fail with an error like
`make: command not found` which would give the user a clear pointer
towards the cause of the problem.
#minor-release
PiperOrigin-RevId: 490001419
(cherry picked from commit f83441974411dca5673a34548b11bc6e6cb809ff)
This tag is only understood by Dackka, which is used to generate the media3 javadoc.
PiperOrigin-RevId: 489233200
(cherry picked from commit 058cba95d40db83c77f4dd0aa8cb561221463b3a)
This better matches the callback name (onSurfaceSizeChanged) and
probably cause less confusion with getVideoSize.
PiperOrigin-RevId: 488669786
(cherry picked from commit 8438daca1f8cbea24aa414ee500044baf1a28367)
These aren't caught by presubmit because the classes are annotated
`@VisibleForTesting` and are therefore stripped out by Metalava. However
Metalava doesn't run when we're generating javadoc for real.
#minor-release
PiperOrigin-RevId: 487476260
(cherry picked from commit 14e23d34e17afa076cd912264bb60685961c58e3)
This uses `@hide` on `protected final` methods to hide them from Dackka
javadoc generation, since these methods are inaccessible to developers
anyway. These symbols will still (currently) be included in artefacts
distributed on Maven (because we don't run Metalava as part of
generating these artefacts).
In some cases I had to change the visibility/finality of methods to make
them `protected final` before adding the `@hide` annotation (but
the impact should be very low, since most of these methods were either
already unusable by app developers, or they shouldn't have been used).
#minor-release
PiperOrigin-RevId: 487472907
(cherry picked from commit 1cd488ac9a1e838139495f55aa32eb951f1e8d8f)
This makes two types of fix:
1. Align parameter names on overridden methods where the superclass
has `@param` javadoc.
2. Use `@hide` on `protected final` methods that refer to package-private
types. This will hide these symbols from Dackka javadoc generation
but not (currently) from the artefacts distributed on Maven. These
methods are currently unusable outside their package anyway (e.g. by
external developers) because of the dependency on a package-private
type.
This also changes some HLS, SmoothStreaming, and IMA code where I've renamed
parameters of overridden methods to be consistent across the type
hierarchy.
#minor-release
PiperOrigin-RevId: 487472665
(cherry picked from commit 10c4a4dfc172cfac77528c7cb746fe827ca6f78c)
Imported from GitHub PR Issue: google/ExoPlayer#10762
This ensure that ffmpeg error code are properly translated to values that the ExoPlayer decoder understand.
The main gain is that it allows the decoder to properly ignore more cases of invalid data and recover.
The second gain is that the other errors are now proper ExoPlayer errors and no more obscure buffer ones.
Fixes: Issue: google/ExoPlayer#10760
Merge 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a into 972e169bd85b14848dcae75e34f9e95fe87e1f4b
COPYBARA_INTEGRATE_REVIEW=go/exoghi/10762 from Tolriq:ffmpeg_error_code 82ceeb77d6df71f5ffb0474db66a36fd6eb8e51a
PiperOrigin-RevId: 487189910
(cherry picked from commit 6d2e7a1b5760a05eade18b1a028b3d27f714715c)
This change makes adding ad events in live streams more robust by allowing ad
groups to grow in number of ads if more ad events are received than initially
announced by the SDK.
With the IMA prefetch feature, an AdPod can grow in size in certain conditions
like from initially 2 ads to 4 ads being part of the ad group. With this change,
if an additional ad event arrives while the ad group is still being played,
the ad group is expanded. If the event arrives late and the ad group is already
completed, a new group is created for the remaining ads.
This also covers the case where we join the live stream while an ad is being
played and we missed at least one LOADED event from the SDK. Ads of the group
before the first LOADED event are ignored in such a case.
PiperOrigin-RevId: 484214760
(cherry picked from commit 136addf640e451602163be9e4272d1e27b8ed5b8)
* Non-standard parameter comment; prefer `/* paramName= */ arg`
(see http://go/bugpattern/ParameterComment)
This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.
This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/media/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.
#codehealth
Tested:
Local presubmit tests passed.
PiperOrigin-RevId: 472252461
(cherry picked from commit dfdcf76daf7762fd40f593662bbb1f5141db1da7)
Native multidex can only be used for binaries with minSdkVersion of 21 or higher, but minSdkVersion was specified to 16.
PiperOrigin-RevId: 470003836
(cherry picked from commit 142d1c062c4ed4fba450465588217ae5506fece3)
`android_binary` is only required when building an application.
PiperOrigin-RevId: 469413752
(cherry picked from commit f01896af156efdafeaef6a5eb13e9d251a2e1d57)
We create an empty CueGroup in many places as default or
where none is needed. Instead, we can define a constant
for this purpose and reuse it.
PiperOrigin-RevId: 467944841
(cherry picked from commit 29208ec1ed4d78fa86af33b81a2b32f3151b9004)
The specified CMake version doesn't work with the latest
Android Studio releases. Updating to a more recent version
fixes the problem.
Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 467634063
(cherry picked from commit 80b635e7abf3a980b801c49c7975c4963aed7518)
From NDK 23.1.7779620 and above, the arm64-v8a ABI needs additional
build flags to correctly link the ffmpeg libraries.
Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 467161973
(cherry picked from commit 6ea1d0ecf068d866faf2f1c0f4624ae5de872497)
In some cases, the IMA SDK fails to call the expected loadAd
event to load the next ad to play. This is (potentially) the
only remaining case where playback can get stuck due to missing
calls from IMA as the player doesn't even have a MediaSource at
this stage and is only waiting for IMA to provide the ad URL.
We can reuse the existing adPreloadTimeoutMs that was added for
a similar purpose (when preloading the first ad in the group).
The JavaDoc matches this purpose as well and the default timeout
is appropriate since we expect to get the loadAd call immediately.
Issue: google/ExoPlayer#10510
PiperOrigin-RevId: 466953617
(cherry picked from commit 91fc5c4f3c52c02439d1e65f09fa2d2c1c5fcf05)
It's always safe to ignore the result of these methods, because the
caller already has a reference to the returned value.
PiperOrigin-RevId: 462388947
(cherry picked from commit 21cab6124de7b65f1af016cfc260555fa0b6e738)
`TextRenderer` is updated to output `CueGroup`, which contains the presentation time of the cues, in microseconds.
PiperOrigin-RevId: 456531399
(cherry picked from commit bf11a8a83148f0d68c82cf22a5f978b1e6a5e299)
Leaving the media item that has been passed in unchanged, ensures that the
media item in the timeline is equal to the media item that the user has
passed into the player. The value of the tag is the uid of the window,
meaning this is redundant information.
#minor-release
PiperOrigin-RevId: 460542246
(cherry picked from commit 9d87c0db78f899ff05e8a26a3e6b4a9667fa81d2)
I don't think it's useful to keep these in numerical order, it makes
more sense to keep them grouped into a 'logical' ordering.
#minor-release
PiperOrigin-RevId: 460453464
(cherry picked from commit 1b1e0f890da4de6055491730595f72afdde0811a)
The media item needs to be assigned to `Window.mediaItem` in `CastTimeline.setWindow`. For this the `MediaItem` needs to be available in the timeline.
When a `MediaItem` is passed to the `set/addMediaItems` method, we can't yet know the Cast `MediaQueueItem.itemId` that is generated on the device and arrives with an async update of the `RemoteMediaClient` state. Hence in the `CastTimelineTracker`, we need to store the `MediaItem` by Casts's `MediaItem.contentId`. When we then receive the updated queue, we look the media item up by the content ID to augment the `ItemData` that is available in the `CastTimeline`.
Issue: androidx/media#25
Issue: google/ExoPlayer#8212
#minor-release
PiperOrigin-RevId: 460325235
(cherry picked from commit 02e1484ebc14a97829c9f5836333412c01205f57)