- 15 Jun, 2022 7 commits
-
-
These calls were not implemented so far as they require a mix of initial prepareFrom/playFrom calls and addQueueItem. We can also support clients without queue handling to set single MediaItems. To make the calls consistent and predictable in the session, we need to ensure that none of the play/pause/addQueueItem/ removeQueueItem/prepare/playFromXYZ/prepareFromXYZ are called before the controller is prepared and has media. #minor-release PiperOrigin-RevId: 455110246 (cherry picked from commit b475f1f2)
tonihei committed -
PiperOrigin-RevId: 455094147 (cherry picked from commit ad3348cc)
Marc Baechinger committed -
See https://issuetracker.google.com/208178382 PiperOrigin-RevId: 454949204 (cherry picked from commit 1f380c1d)
bachinger committed
- 14 Jun, 2022 2 commits
-
-
#minor-release PiperOrigin-RevId: 454884692 (cherry picked from commit 118d689a)
christosts committed -
PiperOrigin-RevId: 454641746 (cherry picked from commit 970eb444)
Marc Baechinger committed
-
- 13 Jun, 2022 2 commits
-
-
`codecDrainAction` is set to `DRAIN_ACTION_NONE` in 3 places in `MediaCodecRenderer`: * The constructor (so there's no prior state to worry about) * `updateDrmSessionV23()`: Where `mediaCrypto` is reconfigured based on `sourceDrmSession` and `codecDrmSession` is also updated to `sourceDrmSession`. * `resetCodecStateForFlush()`: Where (before this change) the action is unconditionally set back to `DRAIN_ACTION_NONE` and so any required updated implied by `DRAIN_ACTION_FLUSH_AND_UPDATE_DRM_SESSION` is not done. This change ensures that `flushOrReleaseCodec()` handles `DRAIN_ACTION_FLUSH_AND_UPDATE_DRM_SESSION` before calling . This probably also resolves Issue: google/ExoPlayer#10274 #minor-release PiperOrigin-RevId: 454114428 (cherry picked from commit 222faa96)
ibaker committed
- 09 Jun, 2022 10 commits
-
-
The track selector will select multi-channel formats when those can be spatialized, otherwise the selector will prefer stereo/mono audio tracks. When the device supports audio spatialization (Android 12L+), the DefaultTrackSelector will monitor for changes in the platform Spatializer and trigger a new track selection upon a Spatializer change event. Devices with a `television` UI mode are excluded from audio channel count constraints. #minor-release PiperOrigin-RevId: 453957269 (cherry picked from commit e2f0fd76)
christosts committed -
This change fixes a bug where the player is frozen with HLS chunkless preparation because the audio stream wrappers are not marked as master timestamp sources before preparation. #minor-release PiperOrigin-RevId: 453941815 (cherry picked from commit 9221eeb2)
christosts committed -
The service handles three different types of `Intents`. Custom command and media command Intents created by the library and media button event Intents from other sources. Media commands from the library as well as from external sources have the action set to `android.intent.action.MEDIA_BUTTON`. If the data URI is set and can be used to identify a session then it is a library Intent. If the Intent is coming from an external KeyEvent, the service implementation is asked which session to use by calling `onGetSession(controllerInfo)` with the controller info being an anonymous legacy controller info. Intents representing a custom command are always coming from the library and hence always have a data URI. Issue: androidx/media#82 PiperOrigin-RevId: 453932972 (cherry picked from commit 8b592fc7)
bachinger committed -
PiperOrigin-RevId: 453905355 (cherry picked from commit 58f7ac25)
Marc Baechinger committed -
Some Player implementations have no playlist capability but can still set a MediaItem for playback. Examples are a MediaController connected to a legacy MediaSession, ExoPlayer up to 2.12 or MediaPlayer. To indicate this capability, we need an allowed command in addition to COMMAND_CHANGE_MEDIA_ITEMS that just allows to set a single item that replaces everything that is currently played. #minor-release PiperOrigin-RevId: 453879626 (cherry picked from commit 5333c67d)
tonihei committed -
Use Collections.synchronizedSet() instead of creating a set from a ConcurrentHashMap because ConcurrentHashMap has a bug in APIs 21/22 that can result in lost updates. PiperOrigin-RevId: 453696565 (cherry picked from commit d506c709)
christosts committed -
With HLS chunkless preparation, audio formats may have no value for channel count. In this case, the DefaultAudioSink will either query the platform for a supported channel count (API 29+) or assume a max channel count based on the encoding spec in order to decide whether the audio format can be played with audio passthrough. Issue: google/ExoPlayer#10204 #minor-release PiperOrigin-RevId: 453644548 (cherry picked from commit 86973382)
christosts committed -
These legacy callbacks are currently forwarded to onSetMediaUri which will be removed in the future. Also make sure to only call player.prepare/play after the items have been set. The calls to onAddQueueItem are also forwarded to onAddMediaItems to actually allow a session to resolve these items to playable media, which wasn't possible so far. PiperOrigin-RevId: 453625204 (cherry picked from commit bd126ec5)
tonihei committed -
PiperOrigin-RevId: 453490088 (cherry picked from commit a2a45043)
Marc Baechinger committed
-
- 07 Jun, 2022 6 commits
-
-
#minor-release PiperOrigin-RevId: 453408087 (cherry picked from commit 62497f23)
christosts committed -
The current setup with distinct, private `keyForField` implementations, leaves open the (theoretical) possibility of a clash in the `Bundle` keys used by the superclass and subclass. This change brings consistency with our only other extensible `Bundleable` type (`PlaybackException`). #minor-release PiperOrigin-RevId: 453385875 (cherry picked from commit 814e43db)
ibaker committed -
We generally nest the `Builder` for `Foo` inside `Foo`. In this case, there's already a `DefaultTrackSelector.Parameters.Builder` type visible to a developer, it just happens to be the 'common' `TrackSelectorParameters.Builder`, so using it is a bit weird. For example this code snippet doesn't compile because `DefaultTrackSelector.Parameters.Builder#build()` returns `TrackSelectionParameters`. This CL fixes that problem and the code snippet now compiles. ```java DefaultTrackSelector.Parameters params = new DefaultTrackSelector.Parameters.Builder(context).build() ``` #minor-release PiperOrigin-RevId: 453215702 (cherry picked from commit 247c2d84)
ibaker committed
-
- 31 May, 2022 7 commits
-
-
This should fix running `./gradlew clean test` if MediaPipe hasn't been built, for example. PiperOrigin-RevId: 452033698 (cherry picked from commit 208a9114)
andrewlewis committed -
This reinstates the permissive behaviour removed by https://github.com/androidx/media/commit/fe7e5b8181333683fda7869c3d9cffc0bdefcccb Test file created by opening bear.opus in a hex editor and naively duplicating the two header packets, starting at (and including) the first `OggS` in the file and ending just before the third `OggS`. #minor-release Issue: google/ExoPlayer#10038 PiperOrigin-RevId: 452015662 (cherry picked from commit 12821758)
ibaker committed -
This ensures the 'use X instead' message is easily visible in the generated HTML for the overriding method. Currently it's not, e.g.: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/BasePlayer.html#getCurrentWindowIndex() #minor-release PiperOrigin-RevId: 452002224 (cherry picked from commit b8ca5b89)
ibaker committed
- 30 May, 2022 6 commits
-
-
The current verion of AGP warns it doesn't support Android API 32 [1]. The wrapper was upgraded with ([instructions](https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper)): ```shell $ ./gradlew wrapper --gradle-version 7.4.2 --distribution-type all ``` [1] ``` WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 32 This Android Gradle plugin (7.0.3) was tested up to compileSdk = 31 This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=32 to this project's gradle.properties The build will continue, but you are strongly encouraged to update your project to use a newer Android Gradle Plugin that has been tested with compileSdk = 32 ``` #minor-release PiperOrigin-RevId: 451893214 (cherry picked from commit 3ba9d7e1)
ibaker committed -
Marc Baechinger committed
-
Gives a bit more information upon failures PiperOrigin-RevId: 451882968
aquilescanta committed -
PiperOrigin-RevId: 451875964
bachinger committed -
The classes were renamed to `PlaceholderXXX` in https://github.com/androidx/media/commit/33373d0d0a159ad9c9c3590c838098c4c1530910 #minor-release PiperOrigin-RevId: 451872006
ibaker committed -
This provides an (unstable) API for apps to broadcast session extras Bundle to all connected controllers and set the extras in the legacy session. Similar to the custom layout, the extras Bundle is not part of the Media3 session state. This means that when a Media3 controller connects to the session after the broadcast, the extras needs to be sent to that controller in `MediaSession.Callback.onPostConnect(MediaSession session, ControllerInfo controller)`. PiperOrigin-RevId: 451871731
bachinger committed
-