Skip to content

r2.18.3#10995

Merged
christosts merged 104 commits intorelease-v2from
release-v2-r2.18.3
Feb 16, 2023
Merged

r2.18.3#10995
christosts merged 104 commits intorelease-v2from
release-v2-r2.18.3

Conversation

@christosts
Copy link
Copy Markdown
Contributor

No description provided.

microkatz and others added 30 commits January 25, 2023 17:33
Added new method to check if codec just functionally supports a format. Changed getDecoderInfosSortedByFormatSupport to use new function to order by functional support. This allows decoders that only support functionally and are more preferred by the MediaCodecSelector to keep their preferred position in the sorted list.

UnitTests included
-Two MediaCodecVideoRenderer tests that verify hw vs sw does not have an effect on sort of the decoder list, it is only based on functional support

Issue: #10604
PiperOrigin-RevId: 487779284
(cherry picked from commit 1eb8a6b)
PiperOrigin-RevId: 488970696
(cherry picked from commit f52bb27)
The method allows clients to specify a pre-existing thread
to use for playback. This can be used to run multiple ExoPlayer
instances on the same playback thread.

PiperOrigin-RevId: 488980749
(cherry picked from commit 79b809b)
They are called from the system only and don't need to be exported
to be visible to other apps.

PiperOrigin-RevId: 489210264
(cherry picked from commit c1fd03d)
I considered moving this enforcement inside the ExoPlayerImpl
implementation, but it might lead to app crashes in cases that apps
(incorrectly) call a released player, but it wasn't actually causing a
problem.

PiperOrigin-RevId: 489233917
(cherry picked from commit d4c9199)
Issue: #10756
PiperOrigin-RevId: 489236336
(cherry picked from commit cbcdbfe)
When estimating the AudioTrack min buffer size, we must use a PCM
frame of 1 when doing direct playback (passthrough). The code was
passing -1 (C.LENGTH_UNSET).

PiperOrigin-RevId: 489238392
(cherry picked from commit d9d7168)
This adds the full Builders and State representation needed to
implement all Player getter methods and listener invocations.

PiperOrigin-RevId: 489503319
(cherry picked from commit b81cd08)
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: #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 f834419)
PiperOrigin-RevId: 490012573
(cherry picked from commit 1551bea)
PiperOrigin-RevId: 490181547
(cherry picked from commit 788f747)
ExoPlayer is unable to detect the presence of subtitle tracks in some
MPEG-TS files that don't fully declare them. It's possible for a
developer to provide the list instead, but doing so is quite awkward
without this helper method. This is consistent for how
`DefaultExtractorsFactory` allows other aspects of the delegate
`Extractor` implementations to be customised.

* Issue: #10175
* Issue: #10505

#minor-release

PiperOrigin-RevId: 490214619
(cherry picked from commit 4853444)
PiperOrigin-RevId: 490224795
(cherry picked from commit e567594)
PiperOrigin-RevId: 490465182
(cherry picked from commit 8a9a66c)
This change includes a change in the `IMediaController.aidl` file and needs
to provide backwards compatibility for when a client connects that is of an older or
newer version of the current service implementation.

This CL proposes to create a new AIDL method `onPlayerInfoChangedWithExtensions`
that is easier to extend in the future because it does use an `Bundle` rather than
primitives. A `Bundle` can be changed in a backward/forwards compatible way
in case we need further changes.

The compatibility handling is provided in `MediaSessionStub` and `MediaControllerStub`. The approach is not based on specific AIDL/Binder features but implemented fully in application code.

Issue: androidx/media#102
#minor-release
PiperOrigin-RevId: 490483068
(cherry picked from commit f262e91)
#minor-release

PiperOrigin-RevId: 490527831
(cherry picked from commit 01eddb3)
*** Original commit ***

Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3

#minor-release

***

PiperOrigin-RevId: 490570517
(cherry picked from commit ea3552c)
*** Original commit ***

Rollback of 01eddb3

*** Original commit ***

Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3

#minor-release

***

***

PiperOrigin-RevId: 490707234
(cherry picked from commit 8c91a31)
Issue: #10811
PiperOrigin-RevId: 490726544
(cherry picked from commit bb270c6)
To avoid complicated bit shifting and masking. Also makes the code more readable.

PiperOrigin-RevId: 490749482
(cherry picked from commit 89e4b8d)
Format expects the values of `averageBitrate` and `peakBitrate` in bps and the value fetched from AC3SpecificBox and EC3SpecificBox is in kbps.

PiperOrigin-RevId: 490756581
(cherry picked from commit 67955e0)
Our FakeClock generally makes sure that playback tests are fully
deterministic. However, this fails if the test uses blocking waits
with clock.onThreadBlocked and where relevant Handlers are created
without using the clock.

To fix the flakiness, we can make the following adjustments:
 - Use TestExoPlayerBuilder instead of legacy ExoPlayerTestRunner
   to avoid onThreadBlocked calls. This also makes the tests more
   readable.
 - Use clock to create Handler for FakeVideoRenderer and
   FakeAudioRenderer. Ideally, this should be passed through
   RenderersFactory, but it's too disruptive given this is a
   public API.
 - Use clock for MediaSourceList and MediaPeriodQueue update
   handler.

PiperOrigin-RevId: 490907495
(cherry picked from commit 7d62943)
Remove self-links, and remove section that is documenting internal
ordering behaviour of
[`SimpleBasePlayer.getCombinedMediaMetadata`](https://github.com/google/ExoPlayer/blob/bb270c62cf2f7a1570fe22f87bb348a2d5e94dcf/library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java#L1770)
rather than anything specifically about this method.

#minor-release

PiperOrigin-RevId: 490923719
(cherry picked from commit ed8c196)
FakeClock keeps an internal list of messages to be executed to
ensure deterministic serialization. The next message from the list
is triggered by a separate helper message sent to the real Handler.
However, if the target HandlerThread is no longer alive (e.g. when
it quit itself during the message execution), this helper
message is never executed and the entire message execution chain
is stuck forever.

This can be solved by checking the return values of Hander.post or
Handler.sendMessage, which are false if the message won't be
delivered. If the messages are not delivered, we can unblock the
chain by marking the message as complete and triggering the next
one.

PiperOrigin-RevId: 491275031
(cherry picked from commit 2977bef)
PiperOrigin-RevId: 491289028
(cherry picked from commit c827e46)
It's clearer if each test method follows the Arrange/Act/Assert pattern

PiperOrigin-RevId: 491299379
(cherry picked from commit bf77290)
The list of charsets is already hard-coded, and using `Charset` types
ensures they will all be present at run-time, hence we will never
encounter an 'unsupported' charset.

PiperOrigin-RevId: 491324466
(cherry picked from commit 043546a)
…download_manager_helpers

PiperOrigin-RevId: 491336828
(cherry picked from commit 3a7f940)
The fix for b/171657375 (internal) has been shipped with 21.1.0 already (see https://developers.google.com/cast/docs/release-notes#august-8,-2022).

PiperOrigin-RevId: 491583727
(cherry picked from commit 04f031d)
To support OPUS offload, we need to provide a few configuration values
that are currently not set due to the lack of devices supporting
OPUS offload.

PiperOrigin-RevId: 491613716
(cherry picked from commit 4cf877b)
marcbaechinger and others added 25 commits January 25, 2023 18:29
Starting with Android 13 (API 33) an app needs to request the
permission to post notifications or notifications are suppressed.
This change documents this in the class level JavaDoc of the
`DownloadService`.

Issue: #10884
PiperOrigin-RevId: 501346908
(cherry picked from commit 055ed77)
This method allows to call through to `StreamManager.focus()` of the currently playing SSAI stream.

PiperOrigin-RevId: 501399144
(cherry picked from commit 0ba0c0e)
PiperOrigin-RevId: 502388865
(cherry picked from commit 26e1a28)
PiperOrigin-RevId: 502571320
(cherry picked from commit 345f234)
When bundling PlayerInfo, we remove data when the controller is not
allowed to access this data via getters. We also remove data for
performance reasons. In the toBundle() method, it's currently hard to
make the connection between allowed commands and filtering, because
the values are checked at a different place. This can be made more
readable by forwarding the applicable Commands directly.

The only functional fix is to filter the Timeline when sending the
first PlayerInfo after a connecting a controller if the command to
get the Timeline is not available. This also allows us to remove a
path to filter MediaItems from Timelines as it isn't used.

PiperOrigin-RevId: 502607391
(cherry picked from commit 5461d5c)
PiperOrigin-RevId: 502821506
(cherry picked from commit 8fcd6bb)
When bundling PlayerInfo, we need to remove information if the
controller is not allowed to access it. This was only partially
done at the moment.

PiperOrigin-RevId: 502852798
(cherry picked from commit 50f066d)
We currently only document it for the getCurrentMediaItem(), but
the command was always meant to cover all information about the
current media item and the position therein.

To correctly hide information for controllers, we need to filter
the Timeline when bundling the PlayerInfo class if only this
command is available.

PiperOrigin-RevId: 503098124
(cherry picked from commit 5e9c9ed)
This makes it implicitly clear that if the value of a getter changes due
to a change in command availability then the listener will be invoked,
without needing to explicitly document every command on every listener
method.

#minor-release

PiperOrigin-RevId: 503178383
(cherry picked from commit aa23920)
The "Transforming media" page has been updated with changes that won't
be part of the next release. Undo these changes so that this page is
consistent with the latest release.

PiperOrigin-RevId: 503917637
(cherry picked from commit fdf8666)
PiperOrigin-RevId: 504281747
(cherry picked from commit 4c1be4c)
ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden,
which causes lint errors with gradle.

#minor-release

PiperOrigin-RevId: 504306210
(cherry picked from commit f86948f)
#minor-release

PiperOrigin-RevId: 504517946
(cherry picked from commit f083ff2)
The commands are partly checked already before enabling
features or calling player methods, but the checks were
still missing in many places.

#minor-release

PiperOrigin-RevId: 504589888
(cherry picked from commit 2d7ddcc)
For most missing commands, we already disable the corresponding
controls. This change extends this to more UI elements that are
disabled in case the corresponding action is unavailable.

#minor-release

PiperOrigin-RevId: 505057751
(cherry picked from commit 641c3b1)
MergingMediaPeriod creates its track groups with ids concatenating position in its periods array and the underlying child track group id. The ids can be used in selectTracks for matching to periods list.

Issue: #10930
PiperOrigin-RevId: 505074653
(cherry picked from commit ee055ef)
When seeking in fMP4, we try to extract as little samples as possible
by only starting at the preceding sync frame. This comparison should
use <= to allow sync frames at exactly the seek position.

Issue: #10941

#minor-release

PiperOrigin-RevId: 505098172
(cherry picked from commit ac3017b)
I missed this when fixing `positionInMs` for Dackka in d2a3d8f

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 736f090)
PiperOrigin-RevId: 506261584
(cherry picked from commit 107e0c6)
Can be used to combine multiple media items into a single timeline window.

Issue: androidx/media#247
Issue: #4868
PiperOrigin-RevId: 506283307
(cherry picked from commit eb8fffb)
#minor-release

PiperOrigin-RevId: 509246479
(cherry picked from commit 8ff024e)
#minor-release

PiperOrigin-RevId: 509501665
(cherry picked from commit b18dccd)
#minor-release

PiperOrigin-RevId: 509789955
(cherry picked from commit 4759e00)
#minor-release

PiperOrigin-RevId: 509864205
(cherry picked from commit 19d4a58)
#minor-release

PiperOrigin-RevId: 509867431
(cherry picked from commit 482871f)
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Feb 16, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@christosts christosts self-assigned this Feb 16, 2023
@christosts christosts merged commit f72ca83 into release-v2 Feb 16, 2023
@christosts christosts deleted the release-v2-r2.18.3 branch February 16, 2023 17:18
@google google locked and limited conversation to collaborators Apr 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants