Skip to content
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

Fix PGS subtitles rendered with border and no fill color #1006

Open
wants to merge 389 commits into
base: main
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jun 12, 2023

  1. Fix calling extra registerInputStream and not handling EOS

    PiperOrigin-RevId: 538796466
    (cherry picked from commit a7cff4e)
    claincly authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f1b9421 View commit details
    Browse the repository at this point in the history
  2. Add seekPrev and seekNext buttons on the default compact notification

    This change is for Android 12 and below, where the buttons are derived from the actions added with the notification. From Android 13 (https://developer.android.com/about/versions/13/behavior-changes-13#playback-controls), the system derives media controls from `PlaybackState` actions.
    
    When adding the actions onto the notification, the logic will iterate all the command buttons. The `COMMAND_KEY_CONPACT_VIEW_INDEX` extra will be checked for each button. If that extra is set for the three buttons on the compact view, then the customized buttons and their order will be used. Otherwise, the compact view will be "seekPrev" (if any), "play/pause" (if any), "seekNext" (if any) buttons (in such order).
    
    Issue: androidx#410
    PiperOrigin-RevId: 538797874
    (cherry picked from commit 2e2f193)
    tianyif authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    78f23c0 View commit details
    Browse the repository at this point in the history
  3. Add 'Keep every nth frame' frame dropping strategy.

    #minor-release
    
    PiperOrigin-RevId: 538804347
    (cherry picked from commit 276f2f1)
    tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    39b98fe View commit details
    Browse the repository at this point in the history
  4. Make StreamKey Bundleable and remove deprecated trackIndex

    #minor-release
    
    PiperOrigin-RevId: 538809105
    (cherry picked from commit 28b8fb7)
    oceanjules authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f18ec2e View commit details
    Browse the repository at this point in the history
  5. Enable re-preparing the ImaSSAIMediaSource

    #minor-release
    
    PiperOrigin-RevId: 538927855
    (cherry picked from commit a67ce06)
    marcbaechinger authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    ec3446f View commit details
    Browse the repository at this point in the history
  6. Implement logging support for Common Media Client Data (CMCD)

    Add support for including Common Media Client Data (CMCD) in the outgoing requests of adaptive streaming formats DASH, HLS, and SmoothStreaming.
    
    API structure and API methods:
       *   CMCD logging is disabled by default, use `MediaSource.Factory.setCmcdConfigurationFactory(CmcdConfiguration.Factory cmcdConfigurationFactory)` to enable it.
       *   All keys are enabled by default, override `CmcdConfiguration.RequestConfig.isKeyAllowed(String key)` to filter out which keys are logged.
       *  Override `CmcdConfiguration.RequestConfig.getCustomData()` to enable custom key logging.
    
    NOTE: Only the following fields have been implemented: `br`, `bl`, `cid`, `rtp`, and `sid`.
    
    Issue: google/ExoPlayer#8699
    
    #minor-release
    
    PiperOrigin-RevId: 539021056
    (cherry picked from commit b55ddf1)
    rohitjoins authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f1529d6 View commit details
    Browse the repository at this point in the history
  7. Do not reset period uid when DashMediaSource is released

    When the source is prepared again after stop, the period uid
    is calculated by subtracting the `firstPeriodId` from the
    period uid that is passed in to `createPeriod`. When this
    happens after stop, the uid from the old period uid that
    is still stored and has the value of the last played uid.
    
    Hence the `firstPeriodId` must not be reset when released.
    
    Issue: google/ExoPlayer#10838
    PiperOrigin-RevId: 539028570
    (cherry picked from commit 319854d)
    marcbaechinger authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    1c8c563 View commit details
    Browse the repository at this point in the history
  8. Add a timer to end a video stream prematurely in ExtTexMgr

    PiperOrigin-RevId: 539036285
    (cherry picked from commit a66f08b)
    claincly authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    50f4caa View commit details
    Browse the repository at this point in the history
  9. Make current period a placeholder when a live stream is reset

    In case the player is reset while a live stream is playing, the current
    period needs to be a placeholder. This makes sure that the default start
    position is used when the first live timeline arrives after re-preparing.
    
    #minor-release
    
    PiperOrigin-RevId: 539044360
    (cherry picked from commit 71153a4)
    marcbaechinger authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    56c62d1 View commit details
    Browse the repository at this point in the history
  10. Add missing empty lines

    PiperOrigin-RevId: 539100987
    (cherry picked from commit edf3043)
    claincly authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4dae1a1 View commit details
    Browse the repository at this point in the history
  11. Fix splitting ad playback state for partial ad group when joining

    This change addresses the case when the user joins the live stream
    on an ad period but the metadata for the ad period is not emitted.
    This results in inserting a partial ad group.
    
    In this case the ad group duration is longer than the partial ad
    group. If now the partial ad group ends at the period before the
    last period of the window (unknown duration), the splitting algorithm
    didn't recognize that the ad group already ended and made the last
    period wrongly an ad period.
    
    This change handles this edge case by counting the mapped ads in
    the partial ad group to detect this situation and stops splitting.
    
    #minor-release
    
    PiperOrigin-RevId: 539102785
    (cherry picked from commit cd604e7)
    marcbaechinger authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    21fb8c9 View commit details
    Browse the repository at this point in the history
  12. Throw exception when TimestampAdjuster initialization hits timeout

    Add `HlsMediaSource.Factory.setTimestampAdjusterInitializationTimeoutMs(long)` to set the timeout for the loading thread to wait for the `TimestampAdjuster` to initialize. If the initialization doesn't complete before the timeout, a `PlaybackException` is thrown to avoid the playback endless stalling. The timeout is set to zero by default.
    
    This can avoid HLS playback endlessly stalls when manifest has missing discontinuities. According to the HLS spec, all variants and renditions have discontinuities at the same points in time. If not, the one with discontinuities will have a new `TimestampAdjuster` not shared by the others. When the loading thread of that variant is waiting for the other threads to initialize the timestamp and hits the timeout, the playback will stall.
    
    Issue: androidx#323
    
    #minor-release
    
    PiperOrigin-RevId: 539108886
    (cherry picked from commit db3e662)
    tianyif authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    23e9280 View commit details
    Browse the repository at this point in the history
  13. Rollback of androidx@a66f08b

    *** Original commit ***
    
    Add a timer to end a video stream prematurely in ExtTexMgr
    
    ***
    
    This has been submitting for more than 1.5hrs. "This presubmit is running slowly because you have been throttled by Build Queue due to using too much of your Product Area's quota."
    
    adding NO_SQ as this is a pure rollback
    
    PiperOrigin-RevId: 539135970
    (cherry picked from commit 5c29abb)
    Googler authored and tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2ee0900 View commit details
    Browse the repository at this point in the history
  14. Clean up HLS sample for cast demo

    Issue: androidx#452
    #minor-release
    PiperOrigin-RevId: 539613535
    (cherry picked from commit c2f78db)
    marcbaechinger authored and tianyif committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c3a96b2 View commit details
    Browse the repository at this point in the history
  15. Update RELEASENOTES.md for media3-1.1.0-rc01 release

    Removed unreleased changes in this cherry-pick.
    
    PiperOrigin-RevId: 539606230
    (cherry picked from commit 49b893f)
    tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    66b59ec View commit details
    Browse the repository at this point in the history
  16. Version bump to media3:1.1.0-rc01

    #minor-release
    
    PiperOrigin-RevId: 539632164
    (cherry picked from commit 4bceb64)
    tof-tof committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3631e1c View commit details
    Browse the repository at this point in the history
  17. Release ExoPlayer instances in ExoPlayerTest

    This was recommended in robolectric/robolectric#8187 (comment)
    
    PiperOrigin-RevId: 539691757
    (cherry picked from commit 959e974)
    icbaker authored and tianyif committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    6615399 View commit details
    Browse the repository at this point in the history
  18. Factor out video decoding and fix two minor issues

    1. Not treating 0 as valid buffer index
    2. Not handling the case the last frame is a comparison frame
    
    PiperOrigin-RevId: 539607482
    (cherry picked from commit 4b1ac2f)
    claincly authored and tianyif committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    0cf3ab3 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. Notify listeners of error changes when masking in `MediaControllerImp…

    …lBase`
    
    Currently, the implementation of `MediaControllerImplBase` differs from `ExoPlayerImpl`. The listeners of the former are notified of player error changes only in `onPlayerInfoChanged` and not `updatePlayerInfo` (masking method). Whereas `ExoPlayerImpl` has one unified method - `updatePlaybackInfo` - which sends the events to all the available listeners.
    
    This change fixes the lack of 2 particular callbacks - `onPlayerErrorChanged` and `onPlayerError`, however, there might be more differences. Ideally, there should be a unified method for oldPlayerInfo/newPlayerInfo comparison-update-notify-listeners flow.
    
    Issue: androidx#449
    
    #minor-release
    
    PiperOrigin-RevId: 539961618
    (cherry picked from commit 4b5a457)
    oceanjules authored and tianyif committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    9dec0d3 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Add missing @OverRide

    PiperOrigin-RevId: 540220141
    (cherry picked from commit c76680a)
    tonihei authored and tianyif committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    a9b7831 View commit details
    Browse the repository at this point in the history
  2. Stop suppressing exceptions in MediaCodec.Callback during flush

    Previously `AsynchronousMediaCodecCallback.mediaCodecException` was
    cleared when flushing completed. This behaviour was changed in
    androidx@aeff51c
    so now the exception is not cleared.
    
    The result after that commit was that we would **only** suppress/ignore
    the expression if a flush was currently pending, and we would throw it
    both before and after the flush. This doesn't really make sense, so this
    commit changes the behaviour to also throw the exception during the
    flush.
    
    This commit also corrects the assertion in
    `flush_withPendingError_resetsError` and deflakes it so that it
    consistently passes. The previous version of this test, although the
    assertion was incorrect, would often pass because the
    `dequeueInputBuffer` call would happen while the `flush` was still
    pending, so the exception was suppressed.
    
    #minor-release
    
    PiperOrigin-RevId: 540237228
    (cherry picked from commit 248d1d9)
    icbaker authored and tianyif committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    983d9d5 View commit details
    Browse the repository at this point in the history
  3. Implement equals/hashCode for CommandButton

    #minor-release
    
    PiperOrigin-RevId: 540274932
    (cherry picked from commit 3d674fa)
    marcbaechinger authored and tianyif committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    3cfdd4f View commit details
    Browse the repository at this point in the history
  4. Add missing checkNotNull to bitmapLoader.

    #minor-release
    
    PiperOrigin-RevId: 540309118
    (cherry picked from commit cf21add)
    siroberts authored and tianyif committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    648e994 View commit details
    Browse the repository at this point in the history
  5. Remove = from parameter args in call to Constructor.newInstance

    These comments reflect the parameter names of the constructor that
    we're reflectively calling, but errorprone complains that they don't
    match the parameter names of `Constructor.newInstance`.
    
    PiperOrigin-RevId: 540348118
    (cherry picked from commit 567890d)
    icbaker authored and tianyif committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    3c9831f View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. Default RepeatMode for conversion is NONE/OFF

    Current behaviour causes an app to crash if it receives an unrecognized repeat mode send over the wire. In order to avoid the crash, a sensible default had to be chosen.
    
    For `Player.RepeatMode`, it is `Player.REPEAT_MODE_OFF`, which is the same value we use as default when unbundling `PlayerInfo`.
    
    For `PlaybackStateCompat.RepeatMode`, it is `PlaybackStateCompat.REPEAT_MODE_NONE`, which is what we use in the no-arg `LegacyPlayerInfo` constructor.
    
    Issue: androidx#448
    
    #minor-release
    
    PiperOrigin-RevId: 540563792
    (cherry picked from commit 501da10)
    oceanjules authored and tianyif committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    2367e7a View commit details
    Browse the repository at this point in the history
  2. Add CMCD logging when requesting initialization chunk for DASH and HLS

    Additionally, two existing methods to `buildDataSpec` in `DashUtil` have been deprecated, while a new method has been added that allows the inclusion of `httpRequestHeaders`.
    
    Issue: google/ExoPlayer#8699
    
    #minor-release
    
    PiperOrigin-RevId: 540594444
    (cherry picked from commit 52878b2)
    rohitjoins authored and tianyif committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    0aede89 View commit details
    Browse the repository at this point in the history
  3. Refactor method CmcdLog.createInstance to accept bufferedDurationUs

    Instead of providing `playbackDurationUs` and `loadPositionUs` individually, which are used to calculate the buffer duration for CMCD logging, we can directly pass the pre-calculated `bufferedDurationUs` available in the `getNextChunk` method of the chunk source classes.
    
    Issue: google/ExoPlayer#8699
    
    #minor-release
    
    PiperOrigin-RevId: 540630112
    (cherry picked from commit be9b057)
    rohitjoins authored and tianyif committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    f01ca9d View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. Merge pull request androidx#436 from jaeho-lee104:feature/improve_con…

    …dition
    
    PiperOrigin-RevId: 540875285
    (cherry picked from commit af69d58)
    marcbaechinger authored and tianyif committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    7e0296f View commit details
    Browse the repository at this point in the history
  2. Fix bug where PlayerView distorts video when video size is unknown

    PiperOrigin-RevId: 541640959
    (cherry picked from commit 8d8c514)
    marcbaechinger committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    e53796f View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Fix spurious sessions created for events after the playlist is cleared

    Some events may arrive after the playlist is cleared (e.g. load
    cancellation). In this case, the DefaultPlaybackSessionManager may
    create a new session for the already removed item.
    
    We already have checks in place that ignore events with old
    windowSequenceNumbers, but these checks only work if the current
    session is set (i.e. the playlist is non-empty). The fix is to add
    the same check for empty playlists by keeping note of the last
    removed window sequence number.
    
    PiperOrigin-RevId: 541870812
    (cherry picked from commit e0191dd)
    tonihei authored and tianyif committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3561258 View commit details
    Browse the repository at this point in the history
  2. Fixed spelling across various PlayerInfo *ChangeReason fields

    PiperOrigin-RevId: 541892788
    (cherry picked from commit b9cc70d)
    oceanjules authored and tianyif committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4710b8f View commit details
    Browse the repository at this point in the history
  3. Fix ArrayIndexOutOfBoundIndex when re-preparing after exception

    When an app tried to re-prepare a live streeam with server side inserted
    ad after a playback exception, the player tried to find the ad group by
    its index in the ad playback state of the next timeline when creating
    the first period.
    
    If a source that supports server side ad, has removed the ad playback
    state when the source has been removed, this causes a crash. For live
    streams this is a reasonable thing to do given the exception could be
    caused by an invalid ad playback state.
    
    This change removes the ad metadata from the current period for live
    streams and the timeline. In case the ad playback state is not reset
    by the source, the first timeline refresh would ad the metadata again.
    
    PiperOrigin-RevId: 541959628
    (cherry picked from commit 4604f0c)
    marcbaechinger authored and tianyif committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f6a30f6 View commit details
    Browse the repository at this point in the history
  4. Switch to SVG assets hosted on developer.android.com for reference docs

    #minor-release
    
    PiperOrigin-RevId: 541970884
    (cherry picked from commit 34f2345)
    icbaker authored and tianyif committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    4f5d59b View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Order MediaControllerImplBase listener callbacks as in ExoPlayerImpl

    The callbacks for `PlayerInfo` changes are currently in both `MediaControllerImplBase.updatePlayerInfo` (masking) and `MediaControllerImplBase.onPlayerInfoChanged`. But the order was different between them both and `ExoPlayerImpl.updatePlaybackInfo` which they are trying to mimic.
    
    #minor-release
    
    PiperOrigin-RevId: 542519070
    (cherry picked from commit b8ac5b4)
    oceanjules authored and tianyif committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    b4c7e6c View commit details
    Browse the repository at this point in the history
  2. Fix missing equals sign in inline-comment parameter names

    PiperOrigin-RevId: 542577676
    (cherry picked from commit ea0f564)
    oceanjules authored and tianyif committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    e008e21 View commit details
    Browse the repository at this point in the history
  3. Cleaner unified PlayerInfo update method in MediaControllerImplBase

    `MediaControllerImplBase` has 2 methods for updating listeners about `PlayerInfo` changes - `updatePlayerInfo` (for masking the state) and `onPlayerInfoChanged` (when communicating with the session). There is a set number of listener callbacks related to `PlayerInfo` updates and both methods should go through the same control flow (whether we know that masking will ignore most of them or not).
    
    A unified method `notifyPlayerInfoListenersWithReasons` encapsulates only the shared logic of 2 methods - listeners' callbacks. This ensures that both methods call them in the same order and none are missed out.
    
    PiperOrigin-RevId: 542587879
    (cherry picked from commit c2d8051)
    oceanjules authored and tianyif committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    b220dfe View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. Document how to use a custom receiver app with the cast demo

    #minor-release
    Issue: androidx#452
    PiperOrigin-RevId: 539915277
    (cherry picked from commit 5afe755)
    marcbaechinger authored and tof-tof committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    1ae8ddd View commit details
    Browse the repository at this point in the history
  2. Fix two more unresolved SVGs in Timeline.Window and Timeline.Period

    These were missed in androidx@1034250
    
    #minor-release
    
    PiperOrigin-RevId: 541860649
    (cherry picked from commit 71f7322)
    icbaker authored and tof-tof committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    bcdadbf View commit details
    Browse the repository at this point in the history
  3. Add a section to CONTRIBUTING.md about push access to PR forks

    #minor-release
    
    PiperOrigin-RevId: 542294607
    (cherry picked from commit 3f7599e)
    icbaker authored and tof-tof committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    b1522b4 View commit details
    Browse the repository at this point in the history
  4. Merge release notes for media3 1.1.0 stable release

    Merged during cherry-pick
    
    PiperOrigin-RevId: 542539300
    (cherry picked from commit 7e47514)
    tof-tof committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    69c6038 View commit details
    Browse the repository at this point in the history
  5. Version bump to media3-1.1.0 and exoplayer 2.19.0

    #minor-release
    
    PiperOrigin-RevId: 542881427
    (cherry picked from commit 1143648)
    tof-tof committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    ece76c4 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Removing @callsuper from [add,remove]Listener of ForwardingListener.

    PiperOrigin-RevId: 543373503
    (cherry picked from commit 1fc49ce)
    Googler authored and tianyif committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    bf4561c View commit details
    Browse the repository at this point in the history
  2. Version bump for exoplayer 2.19.0 continued

    #minor-release
    
    PiperOrigin-RevId: 543369900
    (cherry picked from commit 81dfe9d)
    tof-tof committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    5fdeabb View commit details
    Browse the repository at this point in the history
  3. Fix version bump for media3:1.1.0

    #minor-release
    
    PiperOrigin-RevId: 543376501
    (cherry picked from commit 10cf063)
    tof-tof committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    1d73c68 View commit details
    Browse the repository at this point in the history
  4. Do not trim audio samples by changing their timestamp

    MP4 edit lists sometimes ask to start playback between two samples.
    If this happens, we currently change the timestamp of the first
    sample to zero to trim it (e.g. to display the first frame for a
    slightly shorter period of time). However, we can't do this to audio
    samples are they have an inherent duration and trimming them this
    way is not possible.
    
    PiperOrigin-RevId: 543420218
    (cherry picked from commit 2322462)
    tonihei authored and tianyif committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ec13c42 View commit details
    Browse the repository at this point in the history
  5. Use different package names in DiagnosticInfo for media3 and exoplayer

    Issue: androidx#476
    
    #minor-release
    
    PiperOrigin-RevId: 543460075
    (cherry picked from commit 140c83c)
    tianyif committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    7683ee2 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Clarify MediaPeriod.readDiscontinuity Javadoc

    It currently wrongly documents that it is only called before reading
    streams (that has never been the case and all MediaPeriods already need
    to handle calls after reading samples from the streams).
    
    It was also a bit unclear what a discontinuity implies and the new
    Javadoc calls out the main use case for discontinuties and the intended
    meaning of returning a discontinuity.
    
    #minor-release
    
    PiperOrigin-RevId: 543989124
    (cherry picked from commit b324b8a)
    tonihei authored and tianyif committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    f768fed View commit details
    Browse the repository at this point in the history
  2. Ensure that ShuffleOrder has the same length as the current playlist

    Add a fail-fast check in `ExoPlayerImpl` to ensure the equality of the lengths of `ShuffleOrder` and the current playlist. Also improve the documentation of `setShuffleOrder(ShuffleOrder)` with explicit instruction on this.
    
    Issue: androidx#480
    
    #minor-release
    
    PiperOrigin-RevId: 544009359
    (cherry picked from commit d895a46)
    tianyif committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    52706b2 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. Replace [email protected] with [email protected]

    #minor-release
    
    PiperOrigin-RevId: 544596686
    (cherry picked from commit f2c0eab)
    icbaker committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    00005cb View commit details
    Browse the repository at this point in the history
  2. CEA-608: Only truncate to 32 visible characters

    We introduced truncation to 32 chars in <unknown commit>
    and included indent and offset in the calculation. I think this is
    technically correct, but it causes problems with the content in
    Issue: google/ExoPlayer#11019 and it doesn't seem a problem to only truncate actual
    cue text (i.e. ignore offset and indent).
    
    PiperOrigin-RevId: 544677965
    (cherry picked from commit e8fdd83)
    icbaker authored and tianyif committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    aa34db4 View commit details
    Browse the repository at this point in the history
  3. Remove dead code in ProgressiveMediaSource.Builder

    These fields cannot be set and the logic to handle them can be removed.
    
    PiperOrigin-RevId: 544646460
    (cherry picked from commit 2f113c8)
    tonihei authored and tianyif committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    aefba8a View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Replace [email protected] with [email protected]

    #minor-release
    
    PiperOrigin-RevId: 545165879
    (cherry picked from commit 5e19a33)
    tonihei authored and tianyif committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    26ee4c3 View commit details
    Browse the repository at this point in the history
  2. Add nanoTime method to Clock to support overriding System.nanoTime()

    PiperOrigin-RevId: 545237925
    (cherry picked from commit de4575d)
    microkatz authored and tianyif committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    cb7b386 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. Include timing info in some SCTE-35 toString implementations

    This was helpful in investigating Issue: androidx#471
    
    PiperOrigin-RevId: 545393217
    (cherry picked from commit 3456382)
    icbaker authored and tianyif committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    bcde7e0 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Merge pull request androidx#487 from vishnuchilakala:allow_unsigned_i…

    …nt_for_adaptation_set_id
    
    PiperOrigin-RevId: 544601945
    (cherry picked from commit 9513f2c)
    microkatz authored and tianyif committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3a66617 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5328d64 View commit details
    Browse the repository at this point in the history
  3. Replace BitArray.skipBytes() with BitArray.skipBits()

    Based on the spec, ETSI TS 102 366 V1.4.1 Annex F, 6 bits should have skipped instead of 6 bytes.
    
    This correction was pointed out in Issue: androidx#474.
    
    PiperOrigin-RevId: 545658365
    (cherry picked from commit 07d4e59)
    rohitjoins authored and tianyif committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    0c6cfea View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. Change multidex dependency type to androidTestImplementation

    This is only needed for instrumentation tests and should not
    be included in regular builds.
    
    Issue: androidx#499
    PiperOrigin-RevId: 545913113
    (cherry picked from commit 2250ffe)
    tonihei authored and tianyif committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    9de5684 View commit details
    Browse the repository at this point in the history
  2. Fix incorrect class name for MediaPipe demo

    Issue: androidx#500
    
    #minor-release
    
    PiperOrigin-RevId: 545942450
    (cherry picked from commit bdbf3e2)
    andrewlewis authored and tianyif committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    405e5a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Clarify that new ConditionVariable instances are closed

    #minor-release
    
    PiperOrigin-RevId: 546803592
    (cherry picked from commit a8520bd)
    icbaker authored and tianyif committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    bae3876 View commit details
    Browse the repository at this point in the history
  2. Remove javadoc @link from non-javadoc comments

    Also update type names to match the current names for these types.
    
    PiperOrigin-RevId: 546884049
    (cherry picked from commit eed0e42)
    icbaker authored and tianyif committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    c1261aa View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Expand @UnstableApi javadoc with how to request stable API additions

    Issue: androidx#503
    
    #minor-release
    
    PiperOrigin-RevId: 547143885
    (cherry picked from commit 2afcf99)
    icbaker authored and tianyif committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    996755c View commit details
    Browse the repository at this point in the history
  2. Add custom layout to the state of the MediaController

    This change also marks the buttons of the custom layout as
    enabled/disabled according to available commands in the controller.
    Accordingly, `CommandButton.Builder.setEnabled(boolean)` is deprecated
    because the value is overridden by the library.
    
    Issue: androidx#38
    
    PiperOrigin-RevId: 547272588
    (cherry picked from commit ea21d27)
    marcbaechinger authored and tianyif committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    7d35f18 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. Add fields streaming format(sf), stream type(st) and version(v)

    Added these CMCD-Session fields to Common Media Client Data (CMCD) logging.
    
    PiperOrigin-RevId: 547435498
    (cherry picked from commit 0412a36)
    rohitjoins authored and tianyif committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    272c844 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Replace Dummy with Placeholder

    `Dummy` is a non inclusive language.
    
    PiperOrigin-RevId: 547815680
    (cherry picked from commit ca10204)
    rohitjoins authored and tianyif committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    77fb652 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Fix dependencies for UI module

    PiperOrigin-RevId: 548063325
    (cherry picked from commit 4d40f2e)
    rohitjoins authored and tianyif committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    88e3401 View commit details
    Browse the repository at this point in the history
  2. Add tests for DefaultSsChunkSource

    Added tests for Common Media Client Data (CMCD) logging in SmoothStreaming(SS)
    
    PiperOrigin-RevId: 548072725
    rohitjoins authored and tianyif committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    57d0c19 View commit details
    Browse the repository at this point in the history
  3. Prepend Ogg ID and Comment Header Pages to offloaded Opus stream

    Add Ogg ID Header and Comment Header Pages to the Ogg encapsulated Opus for offload playback. This further matches the RFC 7845 spec and provides initialization data to decoders.
    
    PiperOrigin-RevId: 548080222
    (cherry picked from commit 847f6f2)
    microkatz authored and tianyif committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    0983500 View commit details
    Browse the repository at this point in the history
  4. Remove duplicated release note entry

    Issue: androidx#515
    
    #minor-release
    
    PiperOrigin-RevId: 548111465
    (cherry picked from commit 42998d6)
    tonihei authored and tianyif committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    d4c66e5 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. Fix race condition in clipped sample streams

    The streams return end-of-input if they read no samples, but know that
    they are fully buffered to at least the clipped end time. This helps to
    detect the end of stream even if there are no new buffers after the end
    of the clip (e.g. for sparse metadata tracks).
    
    The race condition occurs because the buffered position is evaluated
    after reading the sample. So between reading "no sample" and checking
    the buffered position, the source may have loaded arbitrary amounts
    of data. This may lead to a situation where the source has not read
    all samples, reads NOTHING_READ (because the queue is empty) and then
    immediately returns end-of-stream (because the buffered position
    jumped forward), causing all remaining samples in the stream to be
    skipped. This can fixed by moving the buffered position check to
    before reading the sample, so that it never exceeds the buffered
    position at the time of reading "no sample".
    
    #minor-release
    
    PiperOrigin-RevId: 548646464
    (cherry picked from commit c64d9fd)
    tonihei authored and tianyif committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    3931c28 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Add fields top bitrate(tb) and object duration(d)

    Added these CMCD-Object fields to Common Media Client Data (CMCD) logging.
    
    PiperOrigin-RevId: 548950296
    (cherry picked from commit 1b2a2fc)
    rohitjoins authored and tianyif committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    6443614 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Add field measured throughput (mtp)

    Updated `ExoTrackSelection` to provide the most recent bitrate estimate, enabling the inclusion of measured throughput (mtp) as a CMCD-Request field in Common Media Client Data (CMCD) logging.
    
    Additionally, made changes to the `checkArgument` methods in `CmcdLog` to prevent the use of default values in certain cases.
    
    PiperOrigin-RevId: 549369529
    (cherry picked from commit cdb174c)
    rohitjoins authored and tianyif committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    7352a1b View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. Tighten the demo app's handling of DrmInitData for downloads

    This code is Widevine specific. `OfflineLicenseHelper.downloadLicense`
    requires the passed `Format` to have a `DrmInitData.SchemeData` with
    Widevine UUID and non-null `data` field. The demo app tries to check
    this in advance (to avoid an exception later), but its checks are
    looser than those made by `OfflineLicenseHelper`. This change tightens
    the checks to match.
    
    Issue: androidx#512
    PiperOrigin-RevId: 549587506
    (cherry picked from commit 1ccedf8)
    icbaker authored and tianyif committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    eaf4a2b View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2023

  1. Add comment about out-of-order timestamps in AtomParsers.parseStbl

    PiperOrigin-RevId: 550596173
    (cherry picked from commit 449cf55)
    icbaker authored and tianyif committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    db336d5 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2023

  1. Fix ms to us conversion bug in DecoderVideoRenderer

    The current code multiplies the value by 1000 twice,
    effectively converting to nanoseconds.
    
    #minor-release
    
    PiperOrigin-RevId: 551129750
    (cherry picked from commit f766936)
    tonihei authored and tianyif committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    ac175a9 View commit details
    Browse the repository at this point in the history
  2. Only use result.sendError where supported by legacy media library

    `MediaLibraryServiceLegacyStub` handles various edge cases by calling
    `result.sendError(null)` with the intention to send back an error to
    the legacy browser [1].
    
    `MediaBrowserServiceCompat` of the legacy media1 Compat library has an
    inner base class `Result` that has a default implementation of
    `onErrorSent` that throws an `UnsupportedOperationException` [2].
    However, most anonymous inner classes for `Result` created in
    `MediaBrowserServiceCompat` do not override `onErrorSent` [3].
    
    Hence Media3 must not call `sendError` in these cases. Instead we call
    `sendResult(null)` according to what the default implementation of
    the callbacks in `MediaBrowserServiceCompat` do ([4] as an example).
    
    Issue: androidx#78
    Issue: androidx#334
    
    [1] https://github.com/androidx/media/blob/release/libraries/session/src/main/java/androidx/media3/session/MediaLibraryServiceLegacyStub.java#L200
    [2] https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java;l=872
    [3] https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java;l=578-604?q=MediaBrowserServiceCompat&ss=androidx
    [4] https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java;l=1395
    
    PiperOrigin-RevId: 551210137
    (cherry picked from commit 17ee527)
    marcbaechinger authored and tianyif committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    ab2505d View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2023

  1. Fix parsing of H.265 sequence parameter sets

    Fix short term reference picture list parsing. Before this change, `deltaPocS0`
    was derived by adding one to the value of the syntax element
    `delta_poc_s0_minus1`, but (maybe surprising) the specification actually says
    that `DeltaPocS0[stRpsIdx][i]` should be assigned the negation
    `-(delta_poc_s0_minus1[i] + 1)` on the first iteration, then that value added
    to the previous value on previous iterations. See equations (7-67) to (7-70) in
    the 2021-08 version of the H.265/HEVC specification.
    
    Also read the number of long term reference pictures once rather than on every
    loop iteration (subsection 7.3.2.2.1).
    
    PiperOrigin-RevId: 551852999
    (cherry picked from commit ddb0f86)
    andrewlewis authored and tianyif committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    50db520 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Fix wrong documentation and add missing annotations

    #minor-release
    
    PiperOrigin-RevId: 552749407
    (cherry picked from commit 267d416)
    rohitjoins authored and tianyif committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    e8a4894 View commit details
    Browse the repository at this point in the history
  2. Simplify and accurately compute chunk duration

    Refactored `CmcdLog` to `CmcdHeadersFactory` for improved representation of its purpose and updated implementations.
    
    #minor-change
    
    PiperOrigin-RevId: 552831995
    rohitjoins authored and tianyif committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    46c757b View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Update translations

    PiperOrigin-RevId: 554439196
    (cherry picked from commit ff3902d)
    tianyif committed Aug 7, 2023
    2 Configuration menu
    Copy the full SHA
    c0c67dd View commit details
    Browse the repository at this point in the history
  2. Check command availability before getting tracks in PlayerView

    #minor-release
    
    PiperOrigin-RevId: 554451569
    (cherry picked from commit 117b18f)
    kim-vde authored and tianyif committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    4b3a4b3 View commit details
    Browse the repository at this point in the history
  3. Use ceiling divide logic in AudioTrackPositionTracker.hasPendingData

    This fixes a bug with playing very short audio files, introduced by
    androidx@fe71087
    
    The existing code using floor integer division results in playback never
    transitioning to `STATE_ENDED` because at the end of playback for the
    short sample clip provided `currentPositionUs=189937`,
    `outputSampleRate=16000` and `(189937 * 16000) / 1000000 = 3038.992`,
    while `writtenFrames=3039`. This is fixed by using `Util.ceilDivide`
    so we return `3039`, which means
    `AudioTrackPositionTracker.hasPendingData()` returns `false` (since
    `writtenFrames ==
    durationUsToFrames(getCurrentPositionUs(/* sourceEnded= */ false))`).
    
    Issue: androidx#538
    PiperOrigin-RevId: 554481782
    (cherry picked from commit 6e91f0d)
    icbaker authored and tianyif committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    7e58fde View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. Add field object type (ot)

    Added this CMCD-Object field to Common Media Client Data (CMCD) logging.
    
    PiperOrigin-RevId: 554843305
    (cherry picked from commit 3ec462d)
    rohitjoins authored and tianyif committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    57c73d5 View commit details
    Browse the repository at this point in the history
  2. Fix PlayerWrapper's creation of VolumeProviderCompat

    When hardware buttons are used to control the volume of the remote device, the call propagates to `MediaSessionCompat.setPlaybackToRemote(volumeProviderCompat)`. However, `volumeProviderCompat` was created incorrectly when the new device volume commands were present (COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS and COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS), i.e. with volumeControlType = `VOLUME_CONTROL_FIXED`. This resulted in `VolumeProviderCompat` which doesn't call `onSetVolumeTo` or `onAdjustVolume` and hence doesn't propagate the calls to the `Player`. Instead, it only worked with the deprecated commands which ensured the volumeControlType was `VOLUME_CONTROL_ABSOLUTE`.
    
    This bug was introduced in androidx@c71e4bf (1.0 media 3 release) when `PlayerWrapper`'s call to `createVolumeProviderCompat` was mostly rewritten to handle the new commands, but the two if-statements were not amended. Note: this change fixes the bug only for Android 11 and below. For 12 and above, there is a tracking bug for the regression that was introduced: https://issuetracker.google.com/issues/201546605
    
    http://Issue: androidx#554
    
    PiperOrigin-RevId: 554966361
    (cherry picked from commit dedccc5)
    oceanjules authored and tianyif committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    136f087 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Verify source is not released before updating ad playback state

    Updates to the ad playback state are posted on the main handler,
    so they may arrive after the source has already been released
    (=the internal MediaSource is null). This can cause NPEs.
    
    PiperOrigin-RevId: 555102426
    (cherry picked from commit 20d2ce7)
    tonihei authored and tianyif committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    bab04eb View commit details
    Browse the repository at this point in the history
  2. Bump IMA SDK version to 3.30.3

    PiperOrigin-RevId: 555130308
    (cherry picked from commit 38eabdc)
    rohitjoins authored and tianyif committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    4af6fcb View commit details
    Browse the repository at this point in the history
  3. Fix Gradle Lint with @RequiresApi and SDK version

    Gradle Lint doesn't recognise `checkState` assertion and TargetApi should only ever be used for suppressing a bug in Android Lint. Hence, we keep @RequiresApi and add an if-statement explicitly. Also, fixes >26 to >=26 for the version check.
    
    PiperOrigin-RevId: 555144577
    (cherry picked from commit f7c31bd)
    oceanjules authored and tianyif committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    2fb3a45 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Merge pull request androidx#528 from zgzong:patch-2

    PiperOrigin-RevId: 554869426
    (cherry picked from commit ef54364)
    tianyif committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    294fa26 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Stop setting -no-module-directories in ExoPlayer javadoc generation

    This flag was introduced to fix links in javadoc search when generating
    it with Java 11: <unknown commit>
    
    The flag is no longer supported with Java 17 (which is required for
    Gradle 8.0+), and seems to no longer be needed: I generated the javadoc
    with it removed and the search links work OK.
    
    PiperOrigin-RevId: 536738686
    icbaker authored and tianyif committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    8ff61a1 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Update release notes for Media3 1.1.1

    PiperOrigin-RevId: 555951054
    (cherry picked from commit b24f767)
    tianyif committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    a842e62 View commit details
    Browse the repository at this point in the history
  2. Bump version numbers to Media3 1.1.1 and ExoPlayer 2.19.1

    PiperOrigin-RevId: 555987303
    (cherry picked from commit 1e2a5cd)
    tianyif committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    9c7cf22 View commit details
    Browse the repository at this point in the history
  3. Fix Media3 1.1.1 release notes

    PiperOrigin-RevId: 556735572
    (cherry picked from commit dca4f1a)
    tianyif committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    3f36610 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Configuration menu
    Copy the full SHA
    12332a4 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. Update playlist UI when playlist is updated

    When changing the playlist on Android Auto the UI of the
    activity needs to be kept in sync.
    
    PiperOrigin-RevId: 569528785
    (cherry picked from commit 52d9fbf)
    marcbaechinger authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    4acce9b View commit details
    Browse the repository at this point in the history
  2. Mark test_session_current support app as MultiDexApplication

    PiperOrigin-RevId: 570015354
    (cherry picked from commit e9bf41c)
    icbaker authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    1c7b426 View commit details
    Browse the repository at this point in the history
  3. MediaCodeVideoRenderer: flush video sink before codec

    When seeking, we must first flush the video sink so it stops
    using any SurfaceTextures before flushing MediaCodec.
    
    #minor-release
    
    PiperOrigin-RevId: 570015998
    (cherry picked from commit 144bd72)
    christosts authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    ecfddb9 View commit details
    Browse the repository at this point in the history
  4. Merge pull request androidx#574 from hugohlln:main

    PiperOrigin-RevId: 570037211
    (cherry picked from commit b06d823)
    copybara-github authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    948491f View commit details
    Browse the repository at this point in the history
  5. Fix Util.scaleLargeValue/Timestamp to handle negative numbers

    #minor-release
    
    PiperOrigin-RevId: 570337535
    (cherry picked from commit 9edbfa9)
    icbaker authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    ffe65b3 View commit details
    Browse the repository at this point in the history
  6. Deprecate experimental keepAudioTrackOnSeek methods.

    #minor-release
    
    PiperOrigin-RevId: 570340714
    (cherry picked from commit 1bb501a)
    Samrobbo authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    27d6a9b View commit details
    Browse the repository at this point in the history
  7. Explicitly mark DecoderOutputBuffer as shouldBeSkipped if needed

    In some cases, SimpleDecoder output needs to be skipped for rendering
    because the decoder produces no data. This is one of the remaining
    usages of BUFFER_FLAG_DECODE_ONLY at the moment and can be more
    directly solved without using the flag. SimpleDecoder still needs to
    check the flag though for backwards compatbility with custom decoders
    while the flag is not completely removed.
    
    PiperOrigin-RevId: 570345233
    (cherry picked from commit c8aac24)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    bc3dded View commit details
    Browse the repository at this point in the history
  8. Add Dumper support for outputting multiline strings

    PiperOrigin-RevId: 570348425
    (cherry picked from commit b83f12c)
    oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    484339e View commit details
    Browse the repository at this point in the history
  9. Add DashPlayback test with sideloaded TTML subtitles

    The test is hidden behind the Ignore annotation due to some flakiness just like `webvttInMp4`. However, it will be removed when the subtitle parsing is moved to a pre-sample-queue architecture.
    
    #minor-release
    
    PiperOrigin-RevId: 570376275
    (cherry picked from commit bd5a392)
    oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    e4637d8 View commit details
    Browse the repository at this point in the history
  10. Disable offload scheduling at set up for track transition

    While sleeping for offload, position is estimated based on time playing. If asleep and AudioTrack is reused, then the position will keep incrementing as the subsequent item plays. That is until wakeup when playing position is updated to the timestamp of the second item. Offload scheduling should be disabled until track transitions fully.
    
    PiperOrigin-RevId: 570397140
    (cherry picked from commit da06bf0)
    microkatz authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    2564c11 View commit details
    Browse the repository at this point in the history
  11. Move decode-only handling out of MetadataDecoder interface logic

    The interface requires the implementation to return null if the
    decode-only flag is set. So instead of setting the flag and returning
    null, we can simply not call the method and assume it's null.
    
    The only reason where this wouldn't work is if the metadata format
    has keyframe-like logic and requires previous metadata to decode
    the next one. This is not something we came across before and it seems
    ignorable. If that feature is needed in the future, we should instead
    add a method to MetadataDecoder to set the first output timestamp.
    
    #minor-release
    
    PiperOrigin-RevId: 570399838
    (cherry picked from commit 796781d)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    0480b70 View commit details
    Browse the repository at this point in the history
  12. Add nullness annotations to MediaCodecRenderer

    #fixit
    
    PiperOrigin-RevId: 570403923
    (cherry picked from commit 7a91474)
    rohitjoins authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    7957554 View commit details
    Browse the repository at this point in the history
  13. Add nullness annotations to DecoderVideoRenderer

    Also fixed a bug where format queue was polled with wrong timestamp value.
    
    #fixit
    
    PiperOrigin-RevId: 570420304
    (cherry picked from commit a879bae)
    rohitjoins authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    5563365 View commit details
    Browse the repository at this point in the history
  14. Add onAudioTrackInitialized/Released events

    This is useful for analytics and understanding player behavior
    during transitions.
    
    #minor-release
    
    PiperOrigin-RevId: 570623227
    (cherry picked from commit 8e2bf21)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    6d2bf51 View commit details
    Browse the repository at this point in the history
  15. Update getName of BitmapFactoryImageDecoder

    cleanup from androidx@8f5835c
    
    #minor-release
    
    PiperOrigin-RevId: 570663437
    (cherry picked from commit 572fb46)
    tof-tof authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    c99c71b View commit details
    Browse the repository at this point in the history
  16. Replace ENCODING_DTS_UHD_P2 value by reference to platform constant

    #minor-release
    
    PiperOrigin-RevId: 570696505
    (cherry picked from commit 9ef1c20)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    889739d View commit details
    Browse the repository at this point in the history
  17. Remove wrong Javadoc

    The corresponding logic has been removed in androidx@796781d
    
    #minor-release
    
    PiperOrigin-RevId: 570729509
    (cherry picked from commit 64fe863)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    7bfddf9 View commit details
    Browse the repository at this point in the history
  18. Add Decoder.setOutputStartTimeUs and use it in extension decoders

    This gets rid of the reliance on the decode only flag that is still
    set on input buffers to the decoder if they are less than the start
    time.
    
    We still need to set and check the decode-only flag in SimpleDecoder
    to ensure compatbility with custom decoders that use the flag while
    it's not fully removed.
    
    PiperOrigin-RevId: 570736692
    (cherry picked from commit a03e20f)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    df85a99 View commit details
    Browse the repository at this point in the history
  19. Add CuesWithTiming.endTimeUs

    In most cases this is more useful than `durationUs`.
    
    We will keep `durationUs`, and the constructor will continue to take
    `startTimeUs` and `durationUs`, to allow for use-cases where we don't
    know the start time but still want to indicate a duration (this will be
    used to implement CEA-608 timeout).
    
    #minor-release
    
    PiperOrigin-RevId: 570944449
    (cherry picked from commit bf7b91e)
    icbaker authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    1a0000d View commit details
    Browse the repository at this point in the history
  20. Use RTSP Setup response timeout value in KeepAliveMonitor intervalMs

    Set KeepAliveMonitor to send a keep-alive message at half the timeout value, if provided, by the RTSP Setup response.
    
    Issue: androidx#662
    PiperOrigin-RevId: 570946237
    (cherry picked from commit 42c1846)
    microkatz authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    21c714d View commit details
    Browse the repository at this point in the history
  21. Remove experimental keepAudioTrackOnSeek.

    PiperOrigin-RevId: 570966027
    (cherry picked from commit 068d420)
    Samrobbo authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    fbb64e2 View commit details
    Browse the repository at this point in the history
  22. Update documentation wrongly referencing the decode-only flag

    #minor-release
    
    PiperOrigin-RevId: 570973457
    (cherry picked from commit 87f1b42)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    3c414fc View commit details
    Browse the repository at this point in the history
  23. Change equalTo check in ImagePlaybackTest to atLeast

    The aim of this test is to make sure the image is onscreen for the right amount of time, so to drive down flakes from the decoder taking too long, change this to an atLeast check
    
    #minor-release
    
    PiperOrigin-RevId: 570988044
    (cherry picked from commit 9cc75ca)
    tof-tof authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    a4582be View commit details
    Browse the repository at this point in the history
  24. Add tests for CuesWithTiming.endTimeUs

    #minor-release
    
    PiperOrigin-RevId: 570988195
    (cherry picked from commit 6057b59)
    icbaker authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    dad362b View commit details
    Browse the repository at this point in the history
  25. Remove release notes lines added by merge conflict

    #minor-release
    
    PiperOrigin-RevId: 571005643
    (cherry picked from commit 49b1e0b)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    03008b9 View commit details
    Browse the repository at this point in the history
  26. Deprecate decode-only flag.

    The flag is no longer used by our components and only set and checked
    in a few places to guarantee compatiblity with existing renderers and
    decoders that still use it.
    
    The flag will be removed in the future due to its design limitations.
    
    #minor-release
    
    PiperOrigin-RevId: 571291168
    (cherry picked from commit 89d0198)
    tonihei authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    7e9ca0b View commit details
    Browse the repository at this point in the history
  27. Add MEDIA_PLAY_FROM_SEARCH to manifest of session demo app

    This is required to make GMS send voice commands to the app.
    
    #minor-release
    
    PiperOrigin-RevId: 571326122
    (cherry picked from commit 78f403a)
    marcbaechinger authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    da5a743 View commit details
    Browse the repository at this point in the history
  28. Allow pause if in offload mode after writing all buffers

    In offload mode, `AudioTrack#stop()` will put the track in `PLAYSTATE_STOPPING` rather than `PLAYSTATE_STOPPED`. The difference in state means that `AudioTrack` can be paused and played during this 'stopping' period.
    
    Currently, if `AudioTrackPositionTracker#handleEndOfStream()` has been called then `DefaultAudioSink` in `pause()` won't call `AudioTrack#pause()`. `AudioTrack#pause()` should be called in this case if in offload mode.
    
    #minor-release
    
    PiperOrigin-RevId: 571335108
    (cherry picked from commit ab42d64)
    microkatz authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    5d0d30a View commit details
    Browse the repository at this point in the history
  29. Update cached playbackHeadPosition when pausing after AudioTrack.stop()

    In some streaming scenarios, like offload, the sink may finish writing buffers a bit before playback reaches the end of the track. In this case a player may pause while in this 'stopping' state.
    
    The AudioTrackPositionTracker needs to update the cached values it uses to calculate position in the `PLAYSTATE_STOPPED`/`PLAYSTATE_STOPPING` states if pause/play are called during this period.
    
    PiperOrigin-RevId: 571345914
    (cherry picked from commit a789db5)
    microkatz authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    f43d0f1 View commit details
    Browse the repository at this point in the history
  30. Add multidex Gradle dependency to test-session-current

    #minor-release
    
    PiperOrigin-RevId: 571347856
    (cherry picked from commit e63be03)
    oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    efb8c70 View commit details
    Browse the repository at this point in the history
  31. Deflake RTSP keep-alive monitor test

    Alters RTSP KeepAlive monitor test to just make sure that keep-alive message is sent.
    
    The test was added in androidx@42c1846
    
    #minor-release
    
    PiperOrigin-RevId: 571349013
    (cherry picked from commit 417970f)
    microkatz authored and oceanjules committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    f776021 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. Bump Media3 version numbers for 1.2.0-beta01 release

    #minor-release
    
    PiperOrigin-RevId: 572003628
    (cherry picked from commit 97645a2)
    oceanjules committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    ef013c0 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Update RELEASENOTES.md for 1.2.0-beta01 release

    PiperOrigin-RevId: 571941830
    (cherry picked from commit 62ad1df)
    oceanjules committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    c16accb View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Rollback of androidx@64bd3bc

    PiperOrigin-RevId: 574766164
    (cherry picked from commit f0cab4d)
    tonihei authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    2ae6b1e View commit details
    Browse the repository at this point in the history
  2. Do not hide System UI when app rejects connection

    If an app rejects the connection of the internal media notification manager
    the session should behave like without the the media notification controller.
    The legacy System UI controller should not be hidden or even rejected to
    connect in such a case.
    
    #minor-release
    
    PiperOrigin-RevId: 574807901
    (cherry picked from commit 54d5810)
    marcbaechinger authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a8b0bd7 View commit details
    Browse the repository at this point in the history
  3. Merge pull request androidx#728 from lawadr:audio-capabilities-fix

    PiperOrigin-RevId: 574829263
    (cherry picked from commit 5f80a47)
    copybara-github authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    cb67b16 View commit details
    Browse the repository at this point in the history
  4. Add missing command checks to playback resumption flow

    Player methods shouldn't be called if they are not available and the
    entry point to the playback resumption flow only checks
    COMMAND_PLAY_PAUSE.
    
    #minor-release
    
    PiperOrigin-RevId: 574834148
    (cherry picked from commit bfd1a27)
    tonihei authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    e1ad106 View commit details
    Browse the repository at this point in the history
  5. Remove CompositionPlayer activity from the transformer demo app

    The CompositionPlayer is not ready yet.
    
    Issue: androidx#741
    PiperOrigin-RevId: 574859927
    (cherry picked from commit beb1711)
    droid-girl authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    9ac6f89 View commit details
    Browse the repository at this point in the history
  6. Rollback of androidx@eafe2e3

    PiperOrigin-RevId: 574755143
    (cherry picked from commit cf37337)
    Googler authored and rohitjoins committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    4c778ed View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Update translations in the ui module

    #minor-release
    
    PiperOrigin-RevId: 575161190
    (cherry picked from commit a8ab9e2)
    rohitjoins committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    47a451a View commit details
    Browse the repository at this point in the history
  2. Use MediaSessionImpl.onMediaButtonEvent() to dispatch key events

    This change moves the handling of any media button event into
    `MediaSessionImpl.onMediaButtonEvent(intent)`. This includes
    the double click handling from `MediaSessionLegacyStub`.
    
    The advantage is that everything is in one place which allows
    to offer `MediaSession.Callback.onMediaButtonEvent` with which
    an app can override the default implementation and handle media
    buttons in a custom way.
    
    Media button events can originate from various places:
    
    - Delivered to `MediaSessionService.onStartCommand(Intent)`
      - A `PendingIntent` from the notification below API 33
      - An `Intent` sent to the `MediaButtonReceiver` by the system dispatched
        to the service
    - Delivered to `MediaSessionCompat.Callback.onMediaButtonEvent(Intent)`
      implemented by `MediaSessionLegacyStub` during the session is active
      - Bluetooth (headset/remote control)
      - Apps/system using `AudioManager.dispatchKeyEvent(KeyEvent)`
      - Apps/system using `MediaControllerCompat.dispatchKeyEvent(keyEvent)`
    
    Issue: androidx#12
    Issue: androidx#159
    Issue: androidx#216
    Issue: androidx#249
    
    #minor-release
    
    PiperOrigin-RevId: 575231251
    (cherry picked from commit a79d44e)
    marcbaechinger authored and rohitjoins committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    f2cf43c View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2023

  1. Update TextRenderer to handle CuesWithTiming instances directly

    The existing `Subtitle` handling code is left intact to support the
    legacy post-`SampleQueue` decoding path for now.
    
    This also includes full support for merging overlapping `CuesWithTiming`
    instances, which explains the test dump file changes, and which should
    resolve the following issues (if used with the
    decoder-before-`SampleQueue` subtitle logic added in
    androidx@5d453fc):
    
    * Issue: google/ExoPlayer#10295
    * Issue: google/ExoPlayer#4794
    
    It should also help resolve Issue: androidx#288, but that will also require
    some changes in the DASH module to enable pre-`SampleQueue` subtitle
    parsing (which should happen soon).
    
    PiperOrigin-RevId: 571021417
    (cherry picked from commit 002ee05)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    6ad54d7 View commit details
    Browse the repository at this point in the history
  2. Return true from CuesResolver.addCues if the output changed

    This belongs in the resolver, because it depends on the resolution
    algorithm (and therefore the logic can't live in `TextRenderer`).
    
    This also fixes a bug in `TextRenderer` where we were doing arithmetic
    with `cues.durationUs` without checking if it was `TIME_UNSET` first.
    
    #minor-release
    
    PiperOrigin-RevId: 571332750
    (cherry picked from commit 2724287)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    1818d46 View commit details
    Browse the repository at this point in the history
  3. Report dropped frames from the VideoSink

    After androidx@4fad529, MediaCodecVideoRenderer does not report if frames
    are dropped from the VideoSink. This commit fixes this.
    
    #minor-release
    
    PiperOrigin-RevId: 571905721
    (cherry picked from commit 05b17b5)
    christosts authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    3ba8459 View commit details
    Browse the repository at this point in the history
  4. Fix the asset and dump file names for the standalone TTML DASH test

    #minor-release
    
    PiperOrigin-RevId: 571941997
    (cherry picked from commit 33c151e)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    99ea703 View commit details
    Browse the repository at this point in the history
  5. Use more targeted listening in session PlayerActivity

    The current metadata updates are triggered by item transitions,
    but depending on the speed of loading the playlist, the first
    metadata may only be known later via metadata-change callbacks.
    
    Slow playlist loading also means the UI stays empty and it's
    beneficial to show a placeholder to avoid the impressions the
    UI hangs.
    
    Finally, clean-up by removing unused string constants and merging
    all listeners into onEvents
    
    #minor-release
    
    PiperOrigin-RevId: 571951529
    (cherry picked from commit fd81c90)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    fdaf9b4 View commit details
    Browse the repository at this point in the history
  6. ...Update metalava library and Reformat api.txt...

    PiperOrigin-RevId: 572013340
    (cherry picked from commit da49a02)
    Googler authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    f799259 View commit details
    Browse the repository at this point in the history
  7. Fix the resumption of playback when suitable device is connected.

    With this change the playback will resume as soon as the suitable device is connected and suppression reason is cleared (within set time out).
    
    #minor-release
    
    PiperOrigin-RevId: 572140309
    (cherry picked from commit dc859ea)
    Googler authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    c913237 View commit details
    Browse the repository at this point in the history
  8. Add missing Future cancellation checks

    Future.isDone and getDone doesn't imply the Future was successful
    and it may have been cancelled or failed.
    
    In case where we handle failure, we should also handle cancellation
    to avoid CancellationException to bubble up unchecked.
    
    In demo app code where we use isDone for field initialization, we
    want to crash in the failure case (usually security exception where
    the connection is disallowed), but we want to gracefully handle
    cancellation. Cancellation of these variables usually happens in
    Activity.onDestroy/onStop, but methods may be called after this point.
    
    #minor-release
    
    PiperOrigin-RevId: 572178018
    (cherry picked from commit fe7c62a)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    7d063e9 View commit details
    Browse the repository at this point in the history
  9. Make BundleListRetriever local Binder aware

    When used within the same process, we don't have to go via the
    onTransact method (which includes marshalling and unmarhsalling
    the data), but can directly return the list.
    
    #minor-release
    
    PiperOrigin-RevId: 572179846
    (cherry picked from commit 0bddd06)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    77bccf0 View commit details
    Browse the repository at this point in the history
  10. Use package-level @OptIn for demo apps

    This demonstrates that `@OptIn` can now be used at the package-level
    (since [`androidx.annotation:annotation-experimental:1.3.0`](https://developer.android.com/jetpack/androidx/releases/annotation#annotation-experimental-1.3.0)).
    
    PiperOrigin-RevId: 572187729
    (cherry picked from commit d60596c)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    bd24e78 View commit details
    Browse the repository at this point in the history
  11. Align audio adaptive support checks with video

    In particular:
     - Add allowAudioNonSeamlessAdaptiveness parameter (default true, same
       as video and as already implemented by default)
     - Forward mixedMimeTypeAdaptation support to AudioTrackScore
       (as for VideoTrackScore) and adapt mixed MIME type adaptive
       support accordingly
     - Check adaptive support when deciding whether a track is allowed for
       adaptation (also same check as for video). This takes the new
       parameter into account.
    
    PiperOrigin-RevId: 572191308
    (cherry picked from commit f20d18e)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    69749c5 View commit details
    Browse the repository at this point in the history
  12. Remove unneccessary method parameter

    The value already exists as a class field.
    
    #minor-release
    
    PiperOrigin-RevId: 572200771
    (cherry picked from commit e5fa0c2)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    d078baf View commit details
    Browse the repository at this point in the history
  13. Add SubtitleParser.Factory.getCueReplacementBehavior()

    This gives access to the replacement behavior for a particular subtitle
    format without needing to instantiate a `SubtitleParser`.
    
    #minor-release
    
    PiperOrigin-RevId: 572226084
    (cherry picked from commit e366c3d)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    292701b View commit details
    Browse the repository at this point in the history
  14. Update @UnstableApi docs to include a package-info.java example

    #minor-release
    
    PiperOrigin-RevId: 572229092
    (cherry picked from commit 7009c53)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    2ec24ac View commit details
    Browse the repository at this point in the history
  15. Do not interrupt controller thread without a good reason

    Interrupting the main thread in particular may be dangerous
    as the flag is not cleared after handling the current message.
    
    #minor-release
    
    PiperOrigin-RevId: 572259422
    (cherry picked from commit 8461173)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    7254f5a View commit details
    Browse the repository at this point in the history
  16. Add experimental opt-in to parse DASH subtitles during extraction

    This currently only applies to subtitles muxed into mp4 segments, and
    not standalone text files linked directly from the manifest.
    
    Issue: androidx#288
    
    #minor-release
    
    PiperOrigin-RevId: 572263764
    (cherry picked from commit 66fa591)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    03a3f77 View commit details
    Browse the repository at this point in the history
  17. Add MediaSession.Builder().setPeriodicPositionUpdateEnabled()

    This allows to disable periodic position updates when building
    the session.
    
    #minor-release
    
    PiperOrigin-RevId: 572531837
    (cherry picked from commit 4dc3db4)
    marcbaechinger authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    4b85207 View commit details
    Browse the repository at this point in the history
  18. Request notification permission when starting session demo app

    #minor-release
    
    PiperOrigin-RevId: 572556101
    (cherry picked from commit c7a091a)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    de3eb67 View commit details
    Browse the repository at this point in the history
  19. Update release notes to mention AudioOffloadPreference class changes

    Issue: androidx#721
    PiperOrigin-RevId: 572565009
    (cherry picked from commit cef85be)
    microkatz authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ec21b9e View commit details
    Browse the repository at this point in the history
  20. Check whether a session is still managed before removing

    When the controller of the `MediaNotificationManager` is disconnected,
    the session is removed from the service without checking whether the
    session hasn't already been removed. This caused flakiness in `MediaSessionServiceTest.addSession()`.
    
    Because there is a public API `MediaSessionService.removeSession()`,
    the controller can't make an assumption whether the session is still
    contained in the service when being disconnected.
    
    #minor-release
    
    PiperOrigin-RevId: 572568350
    (cherry picked from commit 7fdc5b2)
    marcbaechinger authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    0255f3b View commit details
    Browse the repository at this point in the history
  21. Split available command filtering and bundling

    A few methods in PlayerInfo and related classes combine filtering
    information with bundling in one method. This makes it impossible
    to use just the filtering for example and it's also easier to reason
    about than two dedicated methods. This change splits these methods
    into two parts accordingly.
    
    PiperOrigin-RevId: 572592458
    (cherry picked from commit 4ebe630)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    7d61461 View commit details
    Browse the repository at this point in the history
  22. Avoid bundling PlayerInfo for in-process calls

    PlayerInfo bundling is costly and we can add a shortcut for
    in-process binder calls where we store the direct object
    reference in a live Binder object that can be written to the
    Bundle instead of the individual data fields.
    
    #minor-release
    
    PiperOrigin-RevId: 572816784
    (cherry picked from commit d1fc15f)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    d7044c7 View commit details
    Browse the repository at this point in the history
  23. Migrate SubtitleParser tests to incremental parse() methods

    All the production code is already calling these new incremental
    methods, migrating the tests allows us to remove the old
    `List`-returning methods in a follow-up change.
    
    #minor-release
    
    PiperOrigin-RevId: 572822828
    (cherry picked from commit a12bde4)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    24c39b6 View commit details
    Browse the repository at this point in the history
  24. Merge pull request androidx#650 from cedricxperi:dts-lbr-buffer-under…

    …flow-fix
    
    PiperOrigin-RevId: 572864175
    (cherry picked from commit 2421ba4)
    copybara-github authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    c7186c9 View commit details
    Browse the repository at this point in the history
  25. Change LegacySubtitleUtil handling of SubtitleParser.OutputOptions

    If the `Subtitle` has 'active' cues at `OutputOptions.startTimeUs`, this
    change ensures these are emitted in a `CuesWithTiming` with
    `CuesWithTiming.startTimeUs = OutputOptions.startTimeUs`. If
    `OutputOptions.outputAllCues` is also set, then another `CuesWithTiming`
    is emitted at the end that covers the 'first part' of the active cues,
    and  ends at `OutputOptions.startTimeUs`.
    
    As well as adding some more tests to `LegacySubtitleUtilWebvttTest`,
    this change also adds more tests for `TtmlParser` handling of
    `OutputOptions`, which transitively tests the behaviour of
    `LegacySubtitleUtil`.
    
    #minor-release
    
    PiperOrigin-RevId: 573151016
    (cherry picked from commit f9ece88)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    b77a253 View commit details
    Browse the repository at this point in the history
  26. Remove the 'super speed' SmoothStreaming PlayReady stream from demo

    This content is no longer available, the manifest is returning a 404.
    
    Issue: google/ExoPlayer#11309
    
    #minor-release
    
    PiperOrigin-RevId: 573202175
    (cherry picked from commit a19f577)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    74277b1 View commit details
    Browse the repository at this point in the history
  27. Migrate SubtitleParser implementations to incremental parse()

    All production and test callers of the non-incremental methods are
    already migrated, so we can remove them in this change too.
    
    #minor-release
    
    PiperOrigin-RevId: 573207318
    (cherry picked from commit ecd2464)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    f77f3df View commit details
    Browse the repository at this point in the history
  28. Test more URI forms in RawResourceDataSourceContractTest

    PiperOrigin-RevId: 573220915
    (cherry picked from commit 40459f7)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    3244318 View commit details
    Browse the repository at this point in the history
  29. Remove deprecated DownloadNotificationHelper.buildProgressNotification

    Use a non deprecated method that takes a `notMetRequirements` parameter
    instead.
    
    PiperOrigin-RevId: 573252909
    (cherry picked from commit 8b7ebc7)
    Googler authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    b65136e View commit details
    Browse the repository at this point in the history
  30. Calculate HLS live playlist refresh interval accurately

    Previously, we calculated the next playlist reload time by adding the target duration (or half of it, depending on whether there is a real update in the new playlist snapshot) from the last load completion time, which makes the reload interval as long as `targetDuration(or half of it) + lastLoadDuration`. While still complying to the standard that "the client MUST wait for at least the target duration before attempting to reload the Playlist file again", this could cause buffering when the playback position is close to the end of live window. This change is to calculate the reload interval accurately by not adding the term `lastLoadDuration`.
    
    Issue: androidx#663
    
    #minor-release
    
    PiperOrigin-RevId: 573300009
    (cherry picked from commit 58a63c8)
    tianyif authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    2a7d85e View commit details
    Browse the repository at this point in the history
  31. Expand MediaItems in session demo instead of just replacing them

    When MediaItems are added from the controller, we currently completely
    replace the item with the one from our database, overriding any
    potential additional information the controller may have set.
    
    Also forward the onAddMediaItems/onSetMediaItems callbacks to common
    helper methods instead of redirecting them through super methods
    
    #minor-release
    Issue: androidx#706
    PiperOrigin-RevId: 573799351
    (cherry picked from commit 00425db)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    e46ee01 View commit details
    Browse the repository at this point in the history
  32. Only set the queue when COMMAND_GET_TIMELINE is available

    Android Auto shows a queue button when the queue is not empty.
    Apps were able to remove this queue button with the legacy API
    by not setting the queue of the session.
    
    After this change, removing `COMMAND_GET_TIMELINE` from the commands
    of the media notification controller or the session player sets the
    queue in the platform session to null.
    
    #minor-release
    Issue: androidx#339
    PiperOrigin-RevId: 573813558
    (cherry picked from commit f53e1bc)
    marcbaechinger authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    386d223 View commit details
    Browse the repository at this point in the history
  33. Send ConnectionState as in-process bundle if possible

    #minor-release
    
    PiperOrigin-RevId: 573849858
    (cherry picked from commit d5f093f)
    marcbaechinger authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    85167f1 View commit details
    Browse the repository at this point in the history
  34. Send media button events from service directly using MediaSessionImpl

    Media button event coming from the `MediaSessionService` are delegated
    to the `MediaSessionImpl` and then sent to the session by using the
    `MediaSessionStub` directly instead of using the `MediaController`
    API.
    
    Splitting the `MediaController.Listener` and `Player.Listener` in
    `MediaNotificationManager` got reverted, and both listener are set to the
    controller as before. This reverts the change that introduced a
    different timing behaviour. It still holds, that a listener
    registered on a `MediaController` that calls a method like `play()` is
    called immediately and before the call has arrived at the player. This
    change works around this behaviour from the library side by calling
    `MediaSessionStub` directly with a `ControllerInfo`.
    
    #minor-release
    
    PiperOrigin-RevId: 573918850
    (cherry picked from commit 64bd3bc)
    marcbaechinger authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    8e48433 View commit details
    Browse the repository at this point in the history
  35. Move DASH subtitle parsing release note to correct section

    #minor-release
    
    PiperOrigin-RevId: 574090381
    (cherry picked from commit df19097)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    f290d0e View commit details
    Browse the repository at this point in the history
  36. Merge pull request androidx#491 from v-novaltd:dsparano-exo128

    PiperOrigin-RevId: 574129451
    (cherry picked from commit 009d48a)
    copybara-github authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    29846d0 View commit details
    Browse the repository at this point in the history
  37. Publish MIDI decoder module on Maven repository

    Issue: androidx#734
    
    #minor-release
    
    PiperOrigin-RevId: 574182702
    (cherry picked from commit 61770f8)
    christosts authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    ee83baf View commit details
    Browse the repository at this point in the history
  38. Rollback of androidx@64bd3bc

    PiperOrigin-RevId: 574290408
    (cherry picked from commit 1a43aa3)
    Googler authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    fcb3315 View commit details
    Browse the repository at this point in the history
  39. Rollback of androidx@4ebe630

    PiperOrigin-RevId: 574308136
    (cherry picked from commit ff330bd)
    Googler authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    9ace485 View commit details
    Browse the repository at this point in the history
  40. Fix MIDI decoder build.gradle

    Issue: androidx#734
    
    #minor-release
    
    PiperOrigin-RevId: 574425269
    (cherry picked from commit ff4ff76)
    christosts authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    5a4adc9 View commit details
    Browse the repository at this point in the history
  41. Use DataSourceBitmapLoader by default

    This replaces the SimpleBitmapLoader that can now be deprecated
    as it's fully unused and doesn't provide any additional functionality.
    
    #minor-release
    
    PiperOrigin-RevId: 574454636
    (cherry picked from commit db86932)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    fe60d0d View commit details
    Browse the repository at this point in the history
  42. Send decode-only Opus samples in bypass mode for seekPreRoll skip

    As Opus decoders skip some bytes prior to playback during a seek, the renderer for bypass playback should send samples to the decoder even if they would be decode-only.
    
    #minor-release
    
    PiperOrigin-RevId: 574494666
    (cherry picked from commit 00193e0)
    microkatz authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    111ac63 View commit details
    Browse the repository at this point in the history
  43. Add formatting to scheme list in DefaultDataSource javadoc

    The current formatting makes the 'scheme' part of the list blend into
    the definition, especially when the definition is multi-line.
    
    https://developer.android.com/reference/androidx/media3/datasource/DefaultDataSource
    
    I considered adding another level of nesting, but I think bold will
    help distinguish the structure of the list without adding too much HTML
    or visual whitespace.
    
    #minor-release
    
    PiperOrigin-RevId: 574514208
    (cherry picked from commit aec6db7)
    icbaker authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    5d6fefe View commit details
    Browse the repository at this point in the history
  44. Rollback of androidx@4ebe630

    PiperOrigin-RevId: 574530273
    (cherry picked from commit c0759a4)
    tonihei authored and rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    21cb3a6 View commit details
    Browse the repository at this point in the history
  45. Update RELEASENOTES for 1.2.0-rc01 release

    PiperOrigin-RevId: 575795800
    (cherry picked from commit 7202f5d)
    rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    c997c71 View commit details
    Browse the repository at this point in the history
  46. Bump Media3 version numbers for 1.2.0-rc01

    #minor-release
    
    PiperOrigin-RevId: 575805495
    (cherry picked from commit 9d3d7ab)
    rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    7a2d80d View commit details
    Browse the repository at this point in the history
  47. Reorder RELEASENOTES to move unreleased changes to correct section

    PiperOrigin-RevId: 575807109
    (cherry picked from commit 105bdf5)
    rohitjoins committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    1c54c39 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. Add com.github.philburk:jsyn to JAR list

    #minor-release
    
    PiperOrigin-RevId: 576148893
    (cherry picked from commit 00943a0)
    rohitjoins committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    3d6ac7f View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Rollback of androidx@a19f577

    PiperOrigin-RevId: 577139027
    (cherry picked from commit dd6306e)
    icbaker authored and oceanjules committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    7991838 View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2023

  1. Bump media3 versions to 1.2.0 (stable)

    #minor-release
    
    PiperOrigin-RevId: 580856330
    (cherry picked from commit 3918d36)
    oceanjules committed Nov 12, 2023
    3 Configuration menu
    Copy the full SHA
    a2679fb View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Merge release notes for media3 1.2.0 stable release

    PiperOrigin-RevId: 580923121
    (cherry picked from commit 7ee07a5)
    oceanjules authored and icbaker committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    f90726a View commit details
    Browse the repository at this point in the history
  2. Add @OptIn to fields in demo PlayerActivity now this is supported

    This is possible now we use `annotation-experimental:1.3.1`.
    
    #minor-release
    
    PiperOrigin-RevId: 582315579
    (cherry picked from commit 8d83d49)
    icbaker committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    1b83c59 View commit details
    Browse the repository at this point in the history
  3. Remove recommendation to pin annotation-experimental to version 1.2.0

    This was intended to avoid bringing in a transitive dependency on the
    Kotlin standard library, but Gradle no longer flags lint errors on
    `@RequiresOptIn` violations with `annotation-experimental:1.2.0` (1.3.0
    is needed), making this recommendation dangerous. See also
    https://issuetracker.google.com/310651921.
    
    PiperOrigin-RevId: 582276430
    (cherry picked from commit aa1ec98)
    icbaker committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    2cc8afe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4f5038b View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. Clean-up multi-line strings in YAML issue templates

    * If we don't want any newlines in the result, it's better to use `>`
    * If we want newlines (e.g. for markdown) then we should ensure the
      string **only** contains the newlines we want, because GitHub (unlike
      other markdown renderers) preserves single newlines in the output,
      leading to ugly newlines dictated by the source.
    
    Also remove a markdown-style link that isn't renderered as markdown.
    
    PiperOrigin-RevId: 590309749
    (cherry picked from commit 6aeaad2)
    icbaker committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    f6fe90f View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. Fallback to legacy sizerate check for H264 if CDD PerfPoint check fails

    Some devices supporting Performance Points for decoder coverage are missing coverage over the CDD requirements for H264. For these cases ExoPlayer should fall back to legacy resolution and frame rate support checks. If there is an H264 stream evaluated as a `PerformancePointCoverageResult` of `COVERAGE_RESULT_NO`, then ExoPlayer checks for coverage of the [720p CDD requirement](https://source.android.com/docs/compatibility/10/android-10-cdd#5_3_4_h_264).
    
    Issue: google/ExoPlayer#10898
    
    Issue: androidx#693
    PiperOrigin-RevId: 575768836
    (cherry picked from commit 4515a0c)
    microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    79ce4f1 View commit details
    Browse the repository at this point in the history
  2. Bump okhttp dependency to 4.12

    Issue: androidx#768
    PiperOrigin-RevId: 577208115
    (cherry picked from commit e8cca68)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    a017080 View commit details
    Browse the repository at this point in the history
  3. Remove stray parentheses from release notes

    PiperOrigin-RevId: 577809964
    (cherry picked from commit db1ab1d)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    fe8bbca View commit details
    Browse the repository at this point in the history
  4. Put the custom keys in MediaMetadataCompat to MediaMetadata.extras

    PiperOrigin-RevId: 578473874
    (cherry picked from commit 84022ea)
    tianyif authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    2237f49 View commit details
    Browse the repository at this point in the history
  5. Add warning log if DASH manifest contains incomplete ClearKey info

    Unfortunately we can't fail any more obviously at this point, because
    manifests often contain config for multiple DRM schemes, and when
    parsing the manifest we don't know which scheme is going to be used for
    playback. It would be unreasonable to fail playback due to incomplete
    ClearKey config if playback was otherwise going to succeed using e.g.
    Widevine.
    
    * Issue: androidx#777
    * Issue: androidx#563
    * Issue: google/ExoPlayer#9169
    
    #minor-release
    
    PiperOrigin-RevId: 578491484
    (cherry picked from commit d42c237)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    07258aa View commit details
    Browse the repository at this point in the history
  6. Split media1/media3 conversion methods out of MediaUtils

    Android Studio removed some nested imports, but I think the extra
    qualification at the usage site is actually mostly helpful, so I'm
    leaving it as-is.
    
    PiperOrigin-RevId: 578518880
    (cherry picked from commit 72b7019)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    2f4d475 View commit details
    Browse the repository at this point in the history
  7. Fix access to stale ByteBuffer in FfmpegAudioDecoder

    The native code can now reallocate the buffer if it needs to grow
    its size, so we have to reacquire a reference in the Java code to
    avoid accessing a stale instance.
    
    This fixes a bug introduced by androidx@8750ed8.
    
    PiperOrigin-RevId: 578799862
    (cherry picked from commit ae6f83d)
    tonihei authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    4009427 View commit details
    Browse the repository at this point in the history
  8. Fix proguard rule to also keep referenced class name

    PiperOrigin-RevId: 579234050
    (cherry picked from commit bce82bd)
    tonihei authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    d8d552a View commit details
    Browse the repository at this point in the history
  9. Remove old pre-releases from the github bug template

    PiperOrigin-RevId: 580554963
    (cherry picked from commit 508582d)
    oceanjules authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    f189af5 View commit details
    Browse the repository at this point in the history
  10. Don't crash when receiving a bad playback state

    PiperOrigin-RevId: 580942377
    (cherry picked from commit e798096)
    Googler authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    2db9da5 View commit details
    Browse the repository at this point in the history
  11. Parse "f800" as channel count of 5 for Dolby in DASH manifest

    Issue: androidx#688
    PiperOrigin-RevId: 581908905
    (cherry picked from commit 79711eb)
    tianyif authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    21461ab View commit details
    Browse the repository at this point in the history
  12. Expand frame drop workaround to Realme C11

    Based on on-device testing, this device seems to have the same issue as Moto G (20) where frames are dropped despite configuring the decoder not to drop frames.
    
    PiperOrigin-RevId: 581943805
    (cherry picked from commit 330713f)
    andrewlewis authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    7901d1c View commit details
    Browse the repository at this point in the history
  13. Update recommended way to suppress @UnstableApi errors in lint.xml

    #minor-release
    
    PiperOrigin-RevId: 582599098
    (cherry picked from commit bd7615c)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    b972276 View commit details
    Browse the repository at this point in the history
  14. Workaround layout problems with Material Design

    In some contexts (e.g. BottomSheetDialogFrament), Material Design
    themes will override the default of singleLine=false to true. This
    causes layout problems because the forward/rewind buttons are no
    longer visible with singleLine=true.
    
    This problem can be avoided by explicitly requesting the default
    value of false in our layout files.
    
    Issue: androidx#511
    
    #minor-release
    
    PiperOrigin-RevId: 582604131
    (cherry picked from commit 310e2ed)
    tonihei authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    69884e7 View commit details
    Browse the repository at this point in the history
  15. Populate MediaMetadata.extras to MediaMetadataCompat

    Ensures backward compatibility.
    
    Issue: androidx#802
    PiperOrigin-RevId: 583425114
    (cherry picked from commit 6df2408)
    rohitjoins authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    aab1c9a View commit details
    Browse the repository at this point in the history
  16. Use .test top level domain for test URI

    PiperOrigin-RevId: 583951327
    (cherry picked from commit ffbaa09)
    rohitjoins authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    0038355 View commit details
    Browse the repository at this point in the history
  17. Return empty timeline when media info is null

    Issue: androidx#708
    PiperOrigin-RevId: 584054624
    (cherry picked from commit 167f50a)
    marcbaechinger authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    5752a09 View commit details
    Browse the repository at this point in the history
  18. Add test case to test position conversion when POSITION_UNKNOWN

    PiperOrigin-RevId: 584261559
    (cherry picked from commit ec47813)
    marcbaechinger authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    ea642a4 View commit details
    Browse the repository at this point in the history
  19. Avoid clipping live offset override to min/max offsets

    The live offset override is used to replace the media-defined
    live offset after user seeks to ensure the live adjustment adjusts
    to the new user-provided live offset and doesn't go back to the
    original one.
    
    However, the code currently clips the override to the min/max
    live offsets defined in LiveConfiguration. This is useful to
    clip the default value (in case of inconsistent values in the media),
    but the clipping shouldn't be applied to user overrides as
    the player will then adjust the position back to the min/max
    and doesn't stay at the desired user position.
    
    See androidx@2416d99#r132871601
    
    PiperOrigin-RevId: 584311004
    (cherry picked from commit af0282b)
    tonihei authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    c9f6ad0 View commit details
    Browse the repository at this point in the history
  20. MidiExtractor: mark only the first sample as key-frame

    This change fixes a bug with seeking forward in MIDI. When seeking forward,
    the progressive media period attempts to seek within the sample queue, if a
    key-frame exists before the seeking position. With MIDI, however, we can
    only skip Note-On and Note-Off samples and all other samples must be sent
    to the MIDI decoder.
    
    When seeking outside the sample queue, the MidiExtractor already
    instructs the player to start from the beginning of the MIDI input. With
    this change, only the first output sample is a key-frame, thus the
    progressive media period can no longer seek within the sample queue and
    is forced to seek from the MIDI input start always.
    
    Issue: androidx#704
    
    PiperOrigin-RevId: 584321443
    (cherry picked from commit ec08db4)
    christosts authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    124eb31 View commit details
    Browse the repository at this point in the history
  21. Add session extras to the state of the controller

    This change adds `MediaController.getSessionExtras()` through
    which a controller can access the session extras.
    
    The session extras can be set for the entire session when
    building the session. This can be overridden for specific
    controllers in `MediaSession.Callback.onConnect`.
    
    PiperOrigin-RevId: 584430419
    (cherry picked from commit a063d13)
    marcbaechinger authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    5e86c4c View commit details
    Browse the repository at this point in the history
  22. Merge pull request androidx#707 from equeim:ffmpeg-6.0

    PiperOrigin-RevId: 584893190
    (cherry picked from commit 45b51d8)
    copybara-github authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    33484b0 View commit details
    Browse the repository at this point in the history
  23. Remove redundant ) in Javadoc

    PiperOrigin-RevId: 584910697
    (cherry picked from commit 85a54e2)
    tonihei authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    4234bc7 View commit details
    Browse the repository at this point in the history
  24. Fix typo in DashManifestParser

    PiperOrigin-RevId: 585017285
    (cherry picked from commit 479344d)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    36f634d View commit details
    Browse the repository at this point in the history
  25. Avoid value close to overflow for KEY_OPERATING_RATE

    Using `Integer.MAX_VALUE` risks causing arithmetic overflow in the codec
    implementation.
    
    Issue: androidx#810
    
    PiperOrigin-RevId: 585104621
    (cherry picked from commit ad40db4)
    andrewlewis authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    97c9e23 View commit details
    Browse the repository at this point in the history
  26. Work around codec frame rate issues in Redmi Note 9 Pro

    The decoder and encoder won't accept high values for frame rate, so avoid
    setting the key when configuring the decoder, and set a default value for the
    encoder (where the key is required).
    
    Also skip SSIM calculation for 4k, where the device lacks concurrent decoding
    support.
    
    PiperOrigin-RevId: 585604976
    (cherry picked from commit 8b38b34)
    andrewlewis authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    710c1b9 View commit details
    Browse the repository at this point in the history
  27. Restrict operating rate workaround to SM8550

    PiperOrigin-RevId: 585613041
    (cherry picked from commit e84a13f)
    andrewlewis authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    19ee787 View commit details
    Browse the repository at this point in the history
  28. Merge pull request androidx#837 from superjohan:fix/android-14-clearkey

    PiperOrigin-RevId: 585639025
    (cherry picked from commit 5f27b18)
    copybara-github authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    db64831 View commit details
    Browse the repository at this point in the history
  29. Update emulator device names

    PiperOrigin-RevId: 585682881
    (cherry picked from commit b598c96)
    tof-tof authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    d68c36e View commit details
    Browse the repository at this point in the history
  30. Exit early progressive loads if the load task is canceled

    Add an check when loading progressive media in case the load
    is canceled. If the player is released very early, the progressive
    media period may carry on with the initial loading unnecessarily.
    
    PiperOrigin-RevId: 586288385
    (cherry picked from commit 3d1d8f4)
    christosts authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    3f3287a View commit details
    Browse the repository at this point in the history
  31. Don't include null text or bitmaps in Cue.toBundle()

    `fromBundle` doesn't distinguish between `FIELD_BITMAP` and `FIELD_TEXT`
    being present with a null value, or being absent, so we might as well
    avoid including them when the value is null.
    
    I've separated this from a later change to add
    `Cue.toSerializableBundle` which will also skip setting a bitmap value
    into the `Bundle` if `this.bitmap == null`. This is partly because it
    results in changes to a lot of extractor test dump files, and it's
    easier to review that as a separate change.
    
    PiperOrigin-RevId: 586626141
    (cherry picked from commit 28c2106)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    fa268cf View commit details
    Browse the repository at this point in the history
  32. MCR: Ensure mediaCrypto and codec are atomically non-null

    `mediaCrypto` is initialized before `codec` in
    `maybeInitCodecOrBypass`. Before this change, it was possible for
    `maybeInitCodecOrBypass` to complete with `mediaCrypto != null` and
    `codec == null`, in particular if it was run as part of clearing the
    player surface (since in that case, no video codec is initialized).
    This inconsistent state then causes issues during a later invocation of
    `maybeInitCodecOrBypass`, when `mediaCrypto` is still non-null, and
    `mediaCryptoRequiresSecureDecoder = true`, but the
    content has been changed to unencrypted with no associated DRM session.
    This results in a playback error, because a secure decoder is
    initialized but there's no DRM session available to work with it.
    
    This change ensures that when `maybeInitCodecOrBypass` completes,
    either both `mediaCrypto != null` and `codec != null` (i.e. codec
    initialization was completed) or `mediaCrypto == null` and
    `codec == null` (i.e. codec initialization was not completed). We also
    ensure that when nulling out `mediaCrypto` we also set
    `maybeInitCodecOrBypass = false`. A later change should be able to
    demote `maybeInitCodecOrBypass` from a field to a local in order to
    remove any risk of that part of state becoming out of sync. This
    resolves the issue, because during the second invocation of
    `maybeInitCodecOrBypass` an insecure decoder is now (correctly)
    initialized and the unencrypted content is successfully played.
    
    #minor-release
    
    PiperOrigin-RevId: 587713911
    (cherry picked from commit 913f6da)
    icbaker authored and microkatz committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    483426a View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Map VORBIS channel layout to Android layout

    Both the extension OPUS decoder and the OMX/C2 MediaCodec
    implementations for OPUS and VORBIS decode into the channel
    layout defined by VORBIS. See
    https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-140001.2.3
    
    While this is technically correct for a stand-alone OPUS or VORBIS
    decoder, it doesn't match the channel layout expected by Android.
    See https://developer.android.com/reference/android/media/AudioFormat#channelMask
    
    The fix is to apply the channel mapping after decoding if needed.
    Also add e2e tests with audio dumps for the extension renderer,
    including a new 5.1 channel test file.
    
    Issue: google/ExoPlayer#8396
    
    PiperOrigin-RevId: 588004832
    (cherry picked from commit b1541b0)
    tonihei authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    57187aa View commit details
    Browse the repository at this point in the history
  2. Limit processing Opus decode-only frames by seek-preroll in offload

    As Opus decoders skip some bytes prior to playback during a seek, the renderer for bypass playback should send samples to the decoder even if they would be decode-only. However, the renderer should not send samples with time preceding that range. This change adds that constraint.
    
    #minor-release
    
    PiperOrigin-RevId: 588014983
    (cherry picked from commit d1e38ab)
    microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    03eae4f View commit details
    Browse the repository at this point in the history
  3. Fix nullability issue in MediaControllerImplLegacy

    PiperOrigin-RevId: 588035411
    (cherry picked from commit e0f1783)
    Googler authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    c314123 View commit details
    Browse the repository at this point in the history
  4. Add Robolectric e2e test support for HEVC content

    PiperOrigin-RevId: 588055594
    (cherry picked from commit d4fe3fe)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    ea72856 View commit details
    Browse the repository at this point in the history
  5. Add extractor and playback tests for Pixel JPEG motion photo

    This image has two video tracks in the MP4 data, one is a 'real' video
    which we want to play by default, and the other is a low-fps video track
    which isn't intended to be directly played, it's encoded in HEVC for
    compression and decoding efficiency.
    
    This test demonstrates ExoPlayer's current behaviour default extraction
    and playback, which results in selecting the high-res, low-fps track
    (actually single sample in this example), instead of playing the actual
    video.
    
    PiperOrigin-RevId: 588068908
    (cherry picked from commit 6360082)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    482d5d6 View commit details
    Browse the repository at this point in the history
  6. TransformerEndToEndTest: replace /*testId=*/ with variable

    PiperOrigin-RevId: 589765715
    (cherry picked from commit 00d5b6e)
    tof-tof authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7df03f3 View commit details
    Browse the repository at this point in the history
  7. Fix handling of multiple HEVC tracks in JPEG motion photos

    The MP4 data in JPEG motion photos can contain multiple `video/hevc` tracks, but only the first is at a playable frame rate while the others are low-fps, high-res tracks designed for specific use-cases (not direct video playback).
    
    ExoPlayer currently selects the unplayable track by default, because it
    has a higher resolution. This change introduces a flag to
    `Mp4Extractor` that results in the first video track being marked as
    `ROLE_FLAG_MAIN`, and all subsequent video tracks `ROLE_FLAG_ALTERNATE`
    - this then results in the playable lower-res track being selected by
    default.
    
    PiperOrigin-RevId: 589832072
    (cherry picked from commit 5266c71)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    e509db2 View commit details
    Browse the repository at this point in the history
  8. Fix handling of repeated EOS in SilenceSkippingAudioProcessor.

    Issue: androidx#712
    PiperOrigin-RevId: 589882412
    (cherry picked from commit 90a0cbd)
    Samrobbo authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    89baa96 View commit details
    Browse the repository at this point in the history
  9. Merge pull request androidx#867 from equeim:ndk-r26

    PiperOrigin-RevId: 590142275
    (cherry picked from commit 27f437b)
    copybara-github authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    504bcd8 View commit details
    Browse the repository at this point in the history
  10. Fix VorbisComment.populateMediaMetadata key comparison to ignore case

    Issue: androidx#876
    
    #minor-release
    
    PiperOrigin-RevId: 590215918
    (cherry picked from commit 5580b78)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    5001f70 View commit details
    Browse the repository at this point in the history
  11. Merge pull request androidx#864 from v-novaltd:dsparano-exo129_2

    PiperOrigin-RevId: 590234505
    (cherry picked from commit f465efe)
    copybara-github authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7d564f8 View commit details
    Browse the repository at this point in the history
  12. Combine 'matching' versions in media3 bug template

    #minor-release
    
    PiperOrigin-RevId: 590586491
    (cherry picked from commit 9a76616)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    33a5190 View commit details
    Browse the repository at this point in the history
  13. Merge pull request androidx#753 from stevemayhew:p-fix-issue-9347

    PiperOrigin-RevId: 590862514
    (cherry picked from commit ab296ef)
    copybara-github authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    c8a403e View commit details
    Browse the repository at this point in the history
  14. Fix broadcasting notifyChildrenChanged for legacy controllers

    When broadcasting a notifyChildrenChanged event, the task for legacy
    controllers was sent to the broadcasting callback. This would
    technically work, but because the subscription list is maintained
    with specific controllers, the broadcast controller isn't subscribed
    and hence the call wasn't executed.
    
    This change calls the overloaded method for a specific controller
    for each connected controller. Making sure (only) subscribed
    controllers are notified.
    
    Issue: androidx#644
    PiperOrigin-RevId: 590904037
    (cherry picked from commit 4974f96)
    marcbaechinger authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    09d30a1 View commit details
    Browse the repository at this point in the history
  15. Use different wraparound assumptions for duration readers

    The timestamp adjuster also estimates the number of wraparounds
    of the 90Khz TS timestamp. It does that by assuming that a new
    timestamp is always close to the previous one (in either direction).
    
    This logic doesn't always work for duration estimates because the
    timestamp at the end of the media is not close to the one at the
    beginning and it may also never be less than the one at the beginning.
    
    This can be fixed by introducing a new estimation model that assumes
    the new timestamp is strictly greater than the previous one without
    making the assumption that it has to be close to it.
    
    Issue: androidx#855
    
    #minor-release
    
    PiperOrigin-RevId: 590936953
    (cherry picked from commit 0157878)
    tonihei authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    4231a1d View commit details
    Browse the repository at this point in the history
  16. Fix sending negative bufferedDurationUs to CmcdData.Factory

    When track is changed during playback, `playbackPositionUs` may be in middle of a chunk and `loadPositionUs` should be the start of that chunk. In this situation `loadPositionUs` can be less than the current `playbackPositionUs`, resulting into negative `bufferedDurationUs`. It translates to having no buffer and hence we should send `0` for `bufferedDurationUs` when creating new instances of `CmcdData.Factory`.
    
    Issue: androidx#888
    
    #minor-release
    
    PiperOrigin-RevId: 591099785
    (cherry picked from commit 7f6596b)
    rohitjoins authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    6236fd3 View commit details
    Browse the repository at this point in the history
  17. Add Widevine license renewal example to demo app

    PiperOrigin-RevId: 592182371
    (cherry picked from commit 0b8a9a2)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    5d7c914 View commit details
    Browse the repository at this point in the history
  18. Add container to Format.toLogString

    While investigating Issue: androidx#887 I naively assumed the CEA-608
    captions were in a TS file, but they're actually in an MP4 (which is
    possibly obvious given DASH only supports MP4). This change includes
    container info in the `EventLogger` `tracks` output.
    
    PiperOrigin-RevId: 592192752
    (cherry picked from commit 6853ffc)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    1da24b2 View commit details
    Browse the repository at this point in the history
  19. Merge pull request androidx#914 from cemrich:366-forward-time-wrong

    PiperOrigin-RevId: 592871532
    (cherry picked from commit 966b517)
    copybara-github authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b68173a View commit details
    Browse the repository at this point in the history
  20. Expand operating rate workaround to T612 chipset

    PiperOrigin-RevId: 592916187
    (cherry picked from commit 1845a4a)
    andrewlewis authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b9d205b View commit details
    Browse the repository at this point in the history
  21. Don't set negative values to setWhen()

    When the 'when' timer of the notification is disabled
    `DefaultMediaNotificationProvider` may set `C.TIME_UNSET`
    as the time. Users reported problems on some devices with
    this and the docs ask for an event time that probably
    shouldn't be a negative number.
    
    This change sets `0L` instead of `C.TIME_UNSET` when the
    timer is disabled.
    
    Issue: androidx#903
    
    #minor-release
    
    PiperOrigin-RevId: 594451074
    (cherry picked from commit 426bc94)
    marcbaechinger authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    d1b882a View commit details
    Browse the repository at this point in the history
  22. Merge pull request androidx#369 from Tolriq:fix_invalid_frames

    PiperOrigin-RevId: 595650068
    (cherry picked from commit 8eda9f2)
    copybara-github authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    77d220c View commit details
    Browse the repository at this point in the history
  23. Return null if media notification controller Future is not done

    When the media notification controller is requested for a session
    with `getConnectedControllerForSession` and the `Future` is not null
    but not yet completed, the `Future` was returned either way. This was
    reported as creating a race condition between the notification
    being requested for update the very first time, and the media
    notification controller having completed connecting to the session.
    
    Returning null from `getConnectedControllerForSession` when the
    `Future` is available but not yet done fixes the problem. This is
    safe because for the case when a notification update is dropped,
    the media notification controller will trigger the update as soon
    as the connection completes.
    
    Issue: androidx#917
    #minor-release
    PiperOrigin-RevId: 595699929
    (cherry picked from commit 5c50b27)
    marcbaechinger authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    141f9b7 View commit details
    Browse the repository at this point in the history
  24. Clarify docs on Player.setMediaItem(s) and replaceMediaItem(s)

    These methods sound similar, but have different behaviour. This change
    tries to make the distinction clearer, and sign-post from one to the
    other.
    
    #minor-release
    
    Issue: androidx#910
    PiperOrigin-RevId: 595701540
    (cherry picked from commit 95e7429)
    icbaker authored and microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    d55b334 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    f0d24cb View commit details
    Browse the repository at this point in the history
  26. Bump media3 version to 1.2.1 and update RELEASENOTES

    PiperOrigin-RevId: 596916027
    (cherry picked from commit 324e1be)
    microkatz committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    1f79a0a View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Fix typo of missing closing parentheses in RELEASENOTES

    PiperOrigin-RevId: 597496311
    microkatz committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    0ae7a6b View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Fix merge error with ffmpeg_jni.cc

    Fix merge error with ffmpeg_jni.cc where cherry-pick process included code from nonselected commit.
    microkatz authored Jan 17, 2024
    Configuration menu
    Copy the full SHA
    b930b40 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Update PgsParser.java

    Fix "subtitles rendered with border and no fill color" problem:
    moneytoo/Player#413
    
    because '0' means it's an index to the palette table, not an RGBA value of 0
    SimonHung authored Jan 19, 2024
    Configuration menu
    Copy the full SHA
    1a65c69 View commit details
    Browse the repository at this point in the history