1. 01 Feb, 2021 2 commits
  2. 26 Jan, 2021 11 commits
    • Remove randomness from adaptive bitrate tests. · 9b3014dd
      - The order of sample stream (and thus the order in which loads are
        triggered) currently depends on a Set and thus on the hash codes
        of the objects that change with every run. Changing to a List solves
        this problem.
      - The FakeAdaptiveDataSet directly created a static Random (with random
        seed) to compute the variation of chunk sizes. Changing this to an
        injected Random object that can always be initialized with the same
        seed also removed this randomness from the tests.
      
      PiperOrigin-RevId: 353878661
      tonihei committed
    • Make FakeClock fully deterministic. · 2e52c0b8
      This is achieved by only triggering one message at a time. After
      triggering a message we send another to ourselves to know when the
      following message can be triggered.
      
      Other required changes:
       - The messages need to be sorted correctly (by time and creation order)
       - To prevent deadlocks when one thread is waiting for another,
         we need to add new method to Clock to indicate that the current
         thread is about to wait. This then allows us to trigger messages
         from other threads in FakeClock.
       - AnalyticsCollectorTest needed some adjustments:
         - onTimelineChanged now deterministically arrives after the initial
           timline is already known, so some of the period information changes
           from window only to full period info.
         - The playlistOperations test suffers from a bug that the first frame
           is rendered too early and that's why we now get additional events.
      
      PiperOrigin-RevId: 353877832
      tonihei committed
    • Fix FakeClock remove messages behaviour. · a318e56d
      We currently only remove messages that have already been sent
      to the actual Handler, not the pending ones that are only kept
      in the FakeClock. Fix this by also removing matching messages
      from the FakeClock list.
      
      PiperOrigin-RevId: 353877049
      tonihei committed
    • Handle all messages in FakeClock. · 89ea38d1
      Currently only delayed messages are handled. Change this to handling
      all messages so that we have more control over their execution order.
      
      This requires adding a new wrapper type for the Message to support
      the obtainMessage + sendToTarget use case.
      
      PiperOrigin-RevId: 353876557
      tonihei committed
    • Remove FakeClock.sleep. · 06fe0900
      This functionality isn't used and there is no point in supporting
      it.
      
      PiperOrigin-RevId: 353876038
      tonihei committed
    • Fix parsing of Vorbis codec private · 0d85958a
      - Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
        byte and to int again (due to numeric promotion).
      - Fix addition of int and byte with most significant bit set. The byte
        was incorrectly promoted to an int negative value.
      
      Issue:#8496
      #minor-release
      PiperOrigin-RevId: 353865751
      kimvde committed
    • Add toBundle/fromBundle to AudioAttributes and DeviceInfo · 3e8e3737
      PiperOrigin-RevId: 353864181
      gyumin committed
    • Add @RequiresApi(29) to RandomizedMp3Decoder · f69e4be4
      This is needed for the MediaFormat#getInteger calls in onConfigured().
      
      The end-to-end playback tests this is used for have to run on API 29
      anyway (because of ShadowMediaCodec and ShadowMediaCodecList
      functionality).
      
      #minor-release
      
      PiperOrigin-RevId: 353858622
      ibaker committed
    • BandwidthMeter minor javadoc fix · ccf031f9
      PiperOrigin-RevId: 353858581
      christosts committed
    • Elaborate method comments in transformer audio renderer · b1df2f4e
      #minor-release
      
      PiperOrigin-RevId: 353856211
      andrewlewis committed
    • Remove duplicate release notes · 3c17aeb7
      These changes are all in 2.12.3, they shouldn't be in the 2.13.0
      section.
      
      #minor-release
      
      PiperOrigin-RevId: 353855677
      ibaker committed
  3. 25 Jan, 2021 16 commits
    • Bump version to 2.13.0 · 724ded16
      PiperOrigin-RevId: 353655249
      ibaker committed
    • Use maximum supported channel count for Atmos from API 29 · e696a7c6
      #minor-release
      
      PiperOrigin-RevId: 353649545
      andrewlewis committed
    • OkHttp/Rtmp extensions: Remove dependency on core · 3fcc14b3
      They only require common. This allows their use for non-playback networking
      without requiring the user to depend on the whole of core. I will also make
      the same change for Cronet, although this needs a little more work.
      
      PiperOrigin-RevId: 353649388
      olly committed
    • Replace non-inclusively named constant · a1f06987
      Issue: #7565
      PiperOrigin-RevId: 353649187
      olly committed
    • Move Player in common · b0258e71
      This is the last CL to move Player in common.
      
      #player-to-common
      
      PiperOrigin-RevId: 353642347
      krocard committed
    • Split mutations method out of TrackSelection · ec437350
      `TrackSelection` had mutation methods which were to be called only
      internally by ExoPlayer components but were exposed in the
      public `Player` interface.
      
      The mutation methods have been moved out of `TrackSelection`
      to a new class `ExoTrackSelection`.
      
      Current track related read-only method have also been moved out,
      because they are actually something quite unclear.
      Even for a single item playlist, it's the track being buffered rather
      than the track being played, which is unclear.
      But when you have a playlist it starts to get really confusing,
      because if the next item is being buffered, then it's actually
      the last track to be buffered in the currently playing item.
      As a final aside, the implementations don't do proper thread synchronization
      to ensure visibility of updated state by the calling thread.
      
      Exposing those mutable methods in the public `Player` interface
      was problematic because they leaking internal concepts of `ExoPlayer`.
      This is also required to minimize the `Player` interface for long term
      stability.
      
      `ExoTrackSelection` is a subclass of `TrackSelection`.
      This is not ideal as an `TrackSelection` implementation could
      break the current immutability.
      This was done in order for this refactor to be simpler.
      A future patch will fully split the two classes.
      
      All `MediaPeriod` and `Sources` had to be updated to use the new
      `TrackSelection` dynamic aspect class name.
      An alternative would have been to break ExoPlayer's public API, keeping
      `TrackSelection` as the dynamic aspect name, and calling the public static
      aspect class `TrackSelectionState` or similar.
      Nevertheless, while it would have impacted less files, it would have
      many more small apps and casual users of ExoPlayer.
      
      #player-to-common
      
      PiperOrigin-RevId: 353637924
      krocard committed
    • Rename DUMMY_MEDIA_ID and related cleanup · b069a567
      Issue: #7565
      PiperOrigin-RevId: 353616594
      olly committed
    • Upgrade Robolectric to 4.5 (from 4.5-alpha-3) · 5433b83a
      PiperOrigin-RevId: 353615959
      ibaker committed
    • Fix bug in CronetDataSource · 3b08a792
      This change fixes a bug in CronetDataSource when it makes a Range
      request but the server does not support Range requests and returns the
      entire resource. Before the fix, the CronetDataSource would read more
      bytes than the intended range.
      
      PiperOrigin-RevId: 353614477
      christosts committed
    • Some more language fixes · dc7fde1f
      Issue: #7565
      PiperOrigin-RevId: 353613493
      olly committed
    • Migrate CronetDataSourceFactory to DefaultHttpDataSource.Factory · bfc73698
      We normally wouldn't do this kind of thing, given CronetDataSourceFactory is
      deprecated, but it's needed to change the cronet --> core dependency to a
      cronet --> common dependency.
      
      PiperOrigin-RevId: 353609198
      olly committed
    • Allow playback for ads buffered to end · c37f7578
      `ImaAdsLoader` only loads ad media URLs once playback of the preceding ad (if
      any) has started, and this behavior is likely to be similar for other ad loader
      implementations due to limits on how long before an ad plays it is meant to be
      loaded. This is problematic for very short ads followed by an ad because the ad
      will load to the end but load control may not allow playback to start due to
      the total buffered duration being low.
      
      Fix this by allowing playback to start regardless of load control if we are
      waiting for an ad media period to prepare.
      
      An alternative fix would be to fake the ad progress in the `ImaAdsLoader` to
      trigger loading the next ad, but this would only allow one ad to load ahead (so
      the problem would remain for two short ads in a row followed by another ad).
      
      Issue: #8492
      PiperOrigin-RevId: 353600088
      andrewlewis committed
    • LoadControler no longer uses TrackSelectionArray · 6a900ab1
      Instead it uses a TrackSelection[].
      
      #player-to-common
      
      PiperOrigin-RevId: 353584567
      krocard committed
    • Remove non Player use of TrackSelectionArray, use TrackSelection[] · bf3816bd
      This is necessary for the child cl that `TrackSelection`
      in two distinct class. It avoids to split the array
      version of such class too.
      
      TrackSelectionArray exist to have an immutable array of TrackSelection.
      Internal users are trusted to not mutate the array.
      
      One drawback of this approach is that a `TrackSelectionArray`
      has to be allocated on the boundary of the `Player` interface.
      This should not be a performance issue as this only happens
      on trackSelection changes, when the user calls
      `Player.getCurrentTrackSelections` and on
      `updateLoadControlTrackSelection`.
      
      #player-to-common
      
      PiperOrigin-RevId: 353582654
      krocard committed
    • Move factory mutations out of DefaultDataSourceFactory#createMediaSource · c5a81549
      #minor-release
      
      PiperOrigin-RevId: 353394376
      ibaker committed
    • Add contract test for CronetDataSource · 0a3542e5
      PiperOrigin-RevId: 353290124
      christosts committed
  4. 22 Jan, 2021 11 commits