media/libraries
tonihei 80be30f511 Clarify and correct allowed multi-threading for some Player methods
Some Player methods like getting the Looper and adding listeners
were always allowed to be called from any thread, but this is
undocumented. This change makes the threading rules of these
methods more explicit.

Removing listeners was never meant to be called from another thread
and we also don't support it safely because final callbacks may
be triggered from the wrong thread. To find potential issues, we
can assert the correct thread when releasing listeners.

Finally, there is a potential race condition when calling addListener
from a different thread at the same time as release, which may lead to
a registered listener that could receive callbacks after the player is
released.

PiperOrigin-RevId: 493843981
(cherry picked from commit 927b2d6a43)
2023-01-25 18:17:14 +00:00
..
cast Add javadoc links to README files 2023-01-25 18:01:21 +00:00
common Clarify and correct allowed multi-threading for some Player methods 2023-01-25 18:17:14 +00:00
database Add javadoc links to README files 2023-01-25 18:01:21 +00:00
datasource Add javadoc links to README files 2023-01-25 18:01:21 +00:00
datasource_cronet Add javadoc links to README files 2023-01-25 18:01:21 +00:00
datasource_okhttp Add javadoc links to README files 2023-01-25 18:01:21 +00:00
datasource_rtmp Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder_av1 Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder_ffmpeg Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder_flac Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder_opus Add javadoc links to README files 2023-01-25 18:01:21 +00:00
decoder_vp9 Add javadoc links to README files 2023-01-25 18:01:21 +00:00
effect Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer Clarify and correct allowed multi-threading for some Player methods 2023-01-25 18:17:14 +00:00
exoplayer_dash Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer_hls Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer_ima Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer_rtsp Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer_smoothstreaming Add javadoc links to README files 2023-01-25 18:01:21 +00:00
exoplayer_workmanager Add javadoc links to README files 2023-01-25 18:01:21 +00:00
extractor Add javadoc links to README files 2023-01-25 18:01:21 +00:00
session Clarify and correct allowed multi-threading for some Player methods 2023-01-25 18:17:14 +00:00
test_data Merge pull request #10750 from Stronger197:subrip_utf_16 2023-01-25 17:50:39 +00:00
test_exoplayer_playback Fix instrumentation tests not working via Gradle 2022-09-20 15:25:38 +00:00
test_session_common Migrate BROWSER_ROOT_HINTS_KEY_ROOT_CHILDREN_SUPPORTED_FLAGS to Media3 2023-01-25 17:38:34 +00:00
test_session_current Clarify and correct allowed multi-threading for some Player methods 2023-01-25 18:17:14 +00:00
test_utils Add javadoc links to README files 2023-01-25 18:01:21 +00:00
test_utils_robolectric Remove debug timeout multiplier. 2023-01-25 18:17:14 +00:00
transformer Add javadoc links to README files 2023-01-25 18:01:21 +00:00
ui Add javadoc links to README files 2023-01-25 18:01:21 +00:00
ui_leanback Listen to playWhenReady changes in LeanbackPlayerAdapter 2022-07-11 15:49:33 +00:00