1. 18 Apr, 2023 4 commits
  2. 31 Mar, 2023 2 commits
  3. 22 Mar, 2023 2 commits
  4. 14 Mar, 2023 8 commits
  5. 03 Mar, 2023 1 commit
  6. 02 Mar, 2023 13 commits
  7. 28 Feb, 2023 10 commits
    • Ensure output format is updated in sync with stream changes. · 5822d683
      MediaCodecRenderer currently has two independent paths to trigger
      events at stream changes:
       1. Detection of the last output buffer of the old stream to trigger
          onProcessedStreamChange and setting the new output stream offset.
       2. Detection of the first input buffer of the new stream to trigger
          onOutputFormatChanged.
      Both events are identical for most media. However, there are two
      problematic cases:
        A. (1) happens after (2). This may happen if the declared media
           duration is shorter than the actual last sample timestamp.
        B. (2) is too late and there are output samples between (1) and (2).
           This can happen if the new media outputs samples with a timestamp
           less than the first input timestamp.
      
      This can be made more robust by:
       - Keeping a separate formatQueue for each stream to avoid case A.
       - Force outputting the first format after a stream change to
         avoid case B.
      
      Issue: google/ExoPlayer#8594
      
      PiperOrigin-RevId: 512586838
      (cherry picked from commit 39703438)
      tonihei committed
    • Add workaround for wrong PerformancePoints on some devices. · 512ca609
      Some devices were reported to have wrong PerformancePoint sets
      that cause 60 fps to be marked as unsupported even though they
      are supported.
      
      Issue: google/ExoPlayer#10898
      
      PiperOrigin-RevId: 512580395
      (cherry picked from commit d0cbf0fc)
      tonihei committed
    • Correctly update output info if previous stream has been fully rendered · f011cc81
      The output info for a new stream is marked pending until the last
      sample of the previous stream has been processed. However, this fails
      if the previous stream has already been fully processed. We need to
      detect this case explicitly to avoid signalling the output change one
      sample too late.
      
      #minor-release
      
      PiperOrigin-RevId: 512572854
      (cherry picked from commit 7ffcc6f7)
      tonihei committed
    • Use more realistic time values for MediaCodecVideoRendererTest · abf1eb8b
      This test became flaky after https://github.com/androidx/media/commit/ab7e84fb34b7ef4b13e492e1f8918345c712ec30 because some of the
      unrealistic frame times ended up on the same release time.
      
      Using realistic numbers avoids the flakiness.
      
      PiperOrigin-RevId: 512566469
      (cherry picked from commit 0c8ce183)
      tonihei committed
    • Do not specify export flags for protected system broadcasts. · a09bb700
      Protected system broadcasts should not specify the export flag.
      Marking them as NOT_EXPORTED breaks sticky broadcasts in some
      cases.
      
      Issue: google/ExoPlayer#10970
      
      PiperOrigin-RevId: 512020154
      (cherry picked from commit 93e11792)
      tonihei committed
    • Use ArrayDeque for pending output stream changes. · 5ab4223f
      The current logic uses manual array operations to keep track of pending
      changes. Modernize this code by using an ArrayDeque and a data class.
      This also allows to extend the output stream information in the future.
      
      This also fixes a bug where a position reset accidentally assigns a pending
      stream offset instead of keeping the current one.
      
      PiperOrigin-RevId: 511787571
      (cherry picked from commit f0420124)
      tonihei committed
    • Skip rendering multiple frames on the same vsync · 58a977e0
      When rendering frames at a rate higher than the screen refresh rate,
      e.g. playing at 8x, the player is releasing multiple frames at the same
      release time (nanos) which are then dropped by the platform. The output
      buffers are available later and as a result MediaCodec cannot keep up
      decoding fast enough.
      
      This change skips releasing multiple video frames on the same vsync
      period and proactivelly drops the frame. The frame is counted as skipped
      rather than dropped to differentiate with frames dropped due to slow
      decoding.
      
      PiperOrigin-RevId: 510964976
      (cherry picked from commit ab7e84fb)
      christosts committed
    • Reduce number of calls to AudioTrack.getPlaybackHeadPosition · 0e5dad52
      This call may cause performance overhead in some situations,
      for example if the AudioTrack needs to query an offload DSP
      for the current position. We don't need to check this multiple
      times per doSomeWork iteration as the value is unlikely to
      change in any meaningful way.
      
      PiperOrigin-RevId: 510957116
      (cherry picked from commit 9eccf091)
      tonihei committed
    • Map `PLAYER_STATE_LOADING` to `STATE_BUFFERING` · 629a75ed
      #minor-release
      Issue: androidx/media#245
      PiperOrigin-RevId: 510456793
      (cherry picked from commit ba49b6b8)
      bachinger committed
    • Fix error in documentation string · 3b00561b
      The current javadoc refers to the SessionCallback#onConnected, which doesn't exist.
      
      PiperOrigin-RevId: 510261965
      (cherry picked from commit fc642eb4)
      Googler committed