media/library
tonihei d39075a216 Don't block AudioTrack when waiting for previous release
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 a80dd60449)
2022-07-07 10:22:56 +00:00
..
all Fix minimum API level issue 2022-02-08 11:03:36 +00:00
common Merge pull request #10260 from sr1990:clearkey_parse_licenseurl 2022-07-07 18:12:15 +00:00
core Don't block AudioTrack when waiting for previous release 2022-07-07 10:22:56 +00:00
dash Merge pull request #10260 from sr1990:clearkey_parse_licenseurl 2022-07-07 18:12:15 +00:00
database Reformat some javadoc 2022-02-18 15:02:33 +00:00
datasource Disable transcoding when reading content URIs 2022-05-06 15:54:21 +01:00
decoder Expect PresentationTime Discontinuity During Stream Transitions 2022-04-26 14:25:46 +01:00
extractor Fix MP4 parser issue in reading bitrates from esds boxes. 2022-07-01 09:52:45 +00:00
hls Fix bug: playback is frozen with HLS chunkless preparation 2022-06-09 18:08:16 +00:00
rtsp Merge pull request #63 from ittiam-systems:rtp-h263 2022-06-16 11:41:28 +00:00
smoothstreaming Rollback of e705999cf3 2022-05-23 17:12:22 +01:00
transformer Skip BitrateAnalysisTest if device is incapable. 2022-05-30 17:57:29 +00:00
ui Ensure TalkBack announces the selected playback speed in the UI menu 2022-06-29 16:10:11 +00:00
README.md Update to androidx.media3 2021-10-27 09:12:46 +01:00

ExoPlayer library

The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.