- 25 Jan, 2023 14 commits
-
-
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 c41a5c84)
tonihei committed -
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 45b8fb0a)
ibaker committed -
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 2fd4aac3)
tonihei committed -
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 07d25bf4)
christosts committed -
* 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 4ce171a3)
tianyifeng committed -
PiperOrigin-RevId: 488884403 (cherry picked from commit cfe36af8)
tianyifeng committed -
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 fab66d97)
michaelkatz committed
-
- 23 Nov, 2022 2 commits
-
-
1.0.0-beta03
Michael Katz committed -
PiperOrigin-RevId: 490263003 (cherry picked from commit a9be38a3)
christosts committed
-
- 22 Nov, 2022 4 commits
-
-
PiperOrigin-RevId: 489959918 (cherry picked from commit 4ea72f0c)
michaelkatz committed -
#minor-release PiperOrigin-RevId: 489202167 (cherry picked from commit 6e73fc54)
michaelkatz committed
- 17 Nov, 2022 9 commits
-
-
Util.getAudioTrackChannelConfig() maps a channel count to a channel mask that is passed to AudioTrack. The method expected that playback of 8-channel audio is possible from Android 5.1 and playback of 12-channel audio is only possible from Android 12L. However, there is no restriction on the upper number of channels that can be passed to the AudioTrack. google/ExoPlayer#10701 is an example where the audio decoder outputs 12 channels on an Android 10. This change removes the restrictions for 8 and 12 channels. Note, we still do not support playback of arbitrary number of channels as it would require further changes to DefaultAudioSink. #minor-release Issue: google/ExoPlayer#10701 PiperOrigin-RevId: 488659831 (cherry picked from commit 491b1362)
christosts committed -
When we currently trigger the iteration finished event during the release, we don't mark the event as triggered. This means that someone can trigger another release from within the callback, which then tries to resend the event. Issue: google/ExoPlayer#10758 PiperOrigin-RevId: 488645089 (cherry picked from commit 1def68bf)
tonihei committed -
The MediaControllerImplBase listener invocations currently use the class member state that can change if one of the listener method implementations changes the state recursively. Updating the listener invocations to use a final local variable ensures all listeners get consistent updates. PiperOrigin-RevId: 487503373 (cherry picked from commit 33bea391)
tonihei committed
- 10 Nov, 2022 11 commits
-
-
The MediaControllerImplBase listener invocations currently use the class member state that can change if one of the listener method implementations changes the state recursively. Updating the listener invocations to use a final local variable ensures all listeners get consistent updates. PiperOrigin-RevId: 487503373 (cherry picked from commit 33bea391)
tonihei committed -
Creating the PlaybackStateCompat from a media3 Player state is done already by the MediaSessionConnector (and used widely). The media3 session module should set the same states under the same circumstances to ensure compatiblity and consistency. PlaybackStateCompat changes made in media3 session: - Use STATE_STOPPED when player is ended instead of STATE_PAUSED - Use STATE_PLAYING when playback is suppressed temporarily. - Set the playback speed to 0 if the player is not playing. - Add extras for mediaId and user-set playback speed. Part of the problem was that Player.isPlaying() was used to check the state. Unfortunately, MockPlayer.isPlaying() is implemented in a way that makes it hard to test these changes, because the value is set independently of playbackState, playWhenReady and suppression reason. To be able to write consistent, logical tests, this change also removes the independent setting of isPlaying in MockPlayer to align it better with a real player. This requires to update some other tests to use alternative methods. PiperOrigin-RevId: 487500859 (cherry picked from commit c5e071e5)
tonihei committed -
Without this the annotation isn't shown in javadoc (same in Dackka) No annotation: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.html#getSupportedTypes() Annotation present: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/source/MediaSource.Factory.html#getSupportedTypes() #minor-release PiperOrigin-RevId: 487498450 (cherry picked from commit 4f04a284)
ibaker committed -
The connection to a legacy MediaSession may receive additional onSessionReady callbacks that are treated as additional state updates. We currently also set the "notifyConnected" flag for these updates even though we are connected already, causing an IllegalStateException. Fix the exception by not setting this flag. We can also remove the wording about "locked" updates since this class operates everything on a single application thread. Issue: androidx/media#49 PiperOrigin-RevId: 487487286 (cherry picked from commit b24161a6)
tonihei committed -
#minor-release PiperOrigin-RevId: 487479366 (cherry picked from commit 40c6c431)
christosts committed -
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 e9ddfa53)
ibaker committed
-