-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.0 rc01 #251
Merged
Merged
1.0.0 rc01 #251
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. Unit tests 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: google/ExoPlayer#10604 PiperOrigin-RevId: 487779284 (cherry picked from commit fab66d9)
PiperOrigin-RevId: 488884403 (cherry picked from commit cfe36af)
The exclusion will be used in a follow-up CL when sending PlayerInfo updates. #minor-release PiperOrigin-RevId: 488939258 (cherry picked from commit bae5090)
PiperOrigin-RevId: 488970696 (cherry picked from commit f3ed9e3)
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 e1fe312)
* Transforms the `ListenableFuture<LibraryResult<MediaItem>>` and `ListenableFuture<LibraryResult<List<MediaItem>>>` to `ListenableFuture<MediaBrowserCompat.MediaItem>` and `ListenableFuture<List<MediaBrowserCompat.MediaItem>>`, and the result will be sent out when `ListenableFuture` the `MediaBrowserCompat.MediaItem` (or the list of it) is fulfilled. * Add `artworkData` to the tests in `MediaBrowserCompatWithMediaLibraryServiceTest`. PiperOrigin-RevId: 489205547 (cherry picked from commit 4ce171a)
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 22ccc1a)
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 cba65c8)
Issue: google/ExoPlayer#10756 PiperOrigin-RevId: 489236336 (cherry picked from commit d1b470e)
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 07d25bf)
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 81918d8)
When we currently call SessionToken.createSessionToken with a legacy token, we call the package manager to get the process UID. This requires visiblity to the target package, which may not be available unless the target runs a service known to the controller app. However, when connecting to a Media3, this UID doesn't have to be known, so we can move the call closer to where it's needed to avoid the unncessary visibility check. In addition, a legacy session may reply with unknown result code to the session token request, which we should handle as well. One of the constructor can be removed since it was only used from a test. PiperOrigin-RevId: 489917706 (cherry picked from commit 2fd4aac)
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 45b8fb0)
The only reason this is required at the moment is to set the process UID field in the token, that is supposed to make it easier for controller apps to identify the session. However, if this visibility is not provided, it shouldn't stop us from creating the controller for this session. Also docuement more clearly what UID means in this context. PiperOrigin-RevId: 490184508 (cherry picked from commit c41a5c8)
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: google/ExoPlayer#10175 * Issue: google/ExoPlayer#10505 #minor-release PiperOrigin-RevId: 490214619 (cherry picked from commit ff48fae)
PiperOrigin-RevId: 490224795 (cherry picked from commit fa531b7)
When receiving the `onTimelineChanged` callback, we convert the timeline to the list of `QueueItem`s, where decoding a bitmap is needed for building each of the `QueueItem`s. The strategy is similar to what we did in <unknown commit> for list of `MediaBrowserCompat.MediaItem` - set the queue item list until the bitmaps decoding for all the `MediaItem`s are completed. PiperOrigin-RevId: 490283587 (cherry picked from commit 8ce1213)
PiperOrigin-RevId: 490376734 (cherry picked from commit 1803d1c)
This avoids that apps have to depend on the legacy compat support library when they want to make this conversion. Also add a version to both helper methods that takes a Looper to give apps the option to use an existing Looper, which should be much faster than spinning up a new thread for every method call. Issue: #171 PiperOrigin-RevId: 490441913 (cherry picked from commit 03f0b53)
PiperOrigin-RevId: 490465182 (cherry picked from commit a32b82f)
The direct executor is not the proper way to determine on what thread to run the `Future.Listener` and the `MediaControllerCreationListener` because the listener may call the controller passed as argument which must happen on the same thread that built the controller. This change makes sure this is the case. PiperOrigin-RevId: 490478587 (cherry picked from commit 68908be)
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: #102 #minor-release PiperOrigin-RevId: 490483068 (cherry picked from commit 3d8c52f)
Before this change, the bitmap loading result with mainHandler, in which we set the metadata to `MediaSessionCompat`. However, the `MediaSessionCompat` is not thread safe, all calls should be made from the same thread. In the other calls to `MediaSessionCompat`, we ensure that they are on the application thread (which may be or may not be main thread), so we should do the same for `setMetadata` when bitmap arrives. Also removes a comment in `DefaultMediaNotificationProvider` as bitmap request caching is already moved to CacheBitmapLoader. PiperOrigin-RevId: 490524209 (cherry picked from commit 8092726)
#minor-release PiperOrigin-RevId: 490527831 (cherry picked from commit 76df06a)
*** Original commit *** Parse and set `peakBitrate` for Dolby TrueHD(AC-3) and (E-)AC-3 #minor-release *** PiperOrigin-RevId: 490570517 (cherry picked from commit 4273291)
To avoid complicated bit shifting and masking. Also makes the code more readable. PiperOrigin-RevId: 490749482 (cherry picked from commit 3d31e09)
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 4066970)
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 6abc94a)
PiperOrigin-RevId: 503172986 (cherry picked from commit 052c4b3)
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 280889b)
Added onSetMediaItems callback listener to allow the session to modify/set MediaItem list, starting index and position before call to Player.setMediaItem(s). Added conditional check in MediaSessionStub.setMediaItem methods to only call player.setMediaItem rather than setMediaItems if player does not support COMMAND_CHANGE_MEDIA_ITEMS PiperOrigin-RevId: 503427927 (cherry picked from commit bb11e02)
PiperOrigin-RevId: 504013985 (cherry picked from commit 5147011)
Created unified MediaUtils method to handle various logic for calling Player.setMediaItems from MediaSessionStub and MediaSessionLegacyStub PiperOrigin-RevId: 504271877 (cherry picked from commit 7fbdbeb)
ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden, which causes lint errors with gradle. #minor-release PiperOrigin-RevId: 504306210 (cherry picked from commit 5f6e172)
This allows a MediaController to understand which methods calls are available on a legacy session. PiperOrigin-RevId: 504306806 (cherry picked from commit 067340c)
These attributes are required when importing our artifacts into androidx-main in order to generate reference documentation (JavaDoc and KDoc). #minor-release PiperOrigin-RevId: 504502555 (cherry picked from commit 47349b8)
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 e2ece2f)
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 b3e7696)
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: google/ExoPlayer#10930 PiperOrigin-RevId: 505074653 (cherry picked from commit 542a1ef)
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: google/ExoPlayer#10941 PiperOrigin-RevId: 505098172 (cherry picked from commit 00436a0)
#cleanup #minor-release PiperOrigin-RevId: 505146915 (cherry picked from commit d7ef1ab)
This change fixes an issue that can be reproduced when a controller `onConnect` creates a `QueueTimeline` out of the state of a legacy session and then `prepare` is called. `activeQueueItemId`, `metadata` and the `queue` of the legacy session are used when a `QueueTimeline` is created. The change adds unit tests to cover the different combinatoric cases these properties being set or unset. PiperOrigin-RevId: 505731288 (cherry picked from commit 4a9cf7d)
I missed this when fixing `positionInMs` for Dackka in aae6941 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 d1a27bf)
PiperOrigin-RevId: 506261584 (cherry picked from commit c6569a3)
Can be used to combine multiple media items into a single timeline window. Issue: #247 Issue: google/ExoPlayer#4868 PiperOrigin-RevId: 506283307 (cherry picked from commit fcd3af6)
This change includes 3 things: - when the legacy media session is created, FLAG_HANDLES_QUEUE_COMMANDS is advertised if the player has the COMMAND_CHANGE_MEDIA_ITEMS available. - when the player changes its available commands, a new PlaybackStateCompat is sent to the remote media controller to advertise the updated PlyabackStateCompat actions. - when the player changes its available commands, the legacy media session flags are sent accoridingly: FLAG_HANDLES_QUEUE_COMMANDS is set only if the COMMAND_CHANGE_MEDIA_ITEMS is available. #minor-release PiperOrigin-RevId: 506605905 (cherry picked from commit ebe7ece)
PiperOrigin-RevId: 509218510 (cherry picked from commit 7390922)
PiperOrigin-RevId: 509222489 (cherry picked from commit a90728f)
#minor-release PiperOrigin-RevId: 509501665 (cherry picked from commit 20eae0e)
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.