1. 07 Jul, 2022 4 commits
    • Add tests for extracting MP4 with large bitrates · 43eb3d0f
      Also added the test to `MP4PlaybackTest`.
      
      PiperOrigin-RevId: 459492188
      (cherry picked from commit a1665841)
      rohks committed
    • Add missing Nullable annotation · f9f6cb34
      PiperOrigin-RevId: 459485334
      (cherry picked from commit 752e82df)
      christosts committed
    • Don't block AudioTrack when waiting for previous release · d39075a2
      We wait until a previous AudioTrack has been released before
      creating a new one. This is currently done with a thread
      block operation, which may cause ANRs in the extreme case
      when someone attempts to release the player while this is
      still blocked.
      
      The problem can be avoided by just returning false from
      DefaultAudioSink.handleBuffer to try again until the previous
      AudioTrack is released.
      
      Reproduction steps to force the issue:
      1. Add Thread.sleep(10000); to the AudioTrack release thread.
      2. Add this to the demo app:
          private int positionMs = 0;
      
          Handler handler = new Handler();
          handler.post(new Runnable() {
            @Override
            public void run() {
              player.seekTo(positionMs++);
              if (positionMs == 10) {
                player.release();
              } else {
                handler.postDelayed(this, 1000);
              }
            }
      3. Observe Player release timeout exception.
      
      These steps can't be easily captured in a unit test as we can't
      artifically delay the AudioTrack release from the test.
      
      Issue: google/ExoPlayer#10057
      PiperOrigin-RevId: 459468912
      (cherry picked from commit a80dd604)
      tonihei committed
    • Merge pull request #10260 from sr1990:clearkey_parse_licenseurl · ef966415
      PiperOrigin-RevId: 459215225
      (cherry picked from commit 95218076)
      Rohit Singh committed
  2. 06 Jul, 2022 1 commit
  3. 05 Jul, 2022 1 commit
  4. 07 Jul, 2022 1 commit
  5. 01 Jul, 2022 3 commits
    • Only consider enabled tracks in ProgressiveMediaPeriod.bufferedPosition · 84280c85
      ProgressiveMediaPeriod loads all available tracks into SampleStreams
      (because it needs to read the data anyway and it allows easy activation
      of tracks without reloading). However, the SampleStreams for disabled
      tracks are not read and no one if waiting for them.
      
      The buffered position is used for user-visible state (e.g. in the UI)
      and to check how much data is already buffered to decide when to stop
      buffering (using LoadControl). Both values benefit from only
      using the actually enabled tracks to better reflect what is available
      for playback at the moment.
      
      Issue:Issue: google/ExoPlayer#10361
      PiperOrigin-RevId: 458475038
      (cherry picked from commit 577e1916)
      tonihei committed
    • Fix MP4 parser issue in reading bitrates from esds boxes. · 3d79536f
      As per MP4 spec, bitrates in esds boxes can be a 32 bit number which doesn't fits in Java int type, so now reading it as a long value. Our class for holding media format, only allows bitrates value to be an int as we don't expect the bitrates to be greater than or equal to 2^31. So we're limiting the values for bitrates to Integer.MAX_VALUE.
      
      #minor-release
      
      PiperOrigin-RevId: 458423162
      (cherry picked from commit 9e10286b)
      rohks committed
    • Fix MP4 parser issue in reading length of URL array from esds boxes. · 3709e90e
      As per MP4 spec, the length of URL array is a 8 bit number.
      
      #minor-release
      
      PiperOrigin-RevId: 458421436
      (cherry picked from commit 5095ff16)
      rohks committed
  6. 29 Jun, 2022 1 commit
  7. 28 Jun, 2022 4 commits
  8. 27 Jun, 2022 2 commits
  9. 23 Jun, 2022 1 commit
  10. 21 Jun, 2022 1 commit
    • Clear pending doSomeWork messages when sleeping for offload · de78cfa3
      The offload sleeping stops as soon as a new DO_SOME_WORK message
      is handled (because this indicates an expected change in rendering
      and we want to stop sleeping until we know it's safe to do so).
      
      Every exit path from doSomeWork needs to clear other pending
      DO_SOME_WORK messages as these requests have already been handled by
      the current method invocation. This currently doesn't happen from the
      offload sleeping return path and a previously queued DO_SOME_WORK
      message can immediately wake up the rendering loop again.
      
      Fix this by moving the message removal to the beginning of the
      doSomeWork method (as it prevents forgetting it in one of the
      exit paths later).
      
      PiperOrigin-RevId: 456259715
      (cherry picked from commit 251389d7)
      tonihei committed
  11. 20 Jun, 2022 1 commit
  12. 16 Jun, 2022 1 commit
  13. 15 Jun, 2022 2 commits
  14. 10 Jun, 2022 1 commit
  15. 07 Jun, 2022 1 commit
  16. 17 Jun, 2022 2 commits
  17. 16 Jun, 2022 6 commits
  18. 15 Jun, 2022 7 commits