media/libraries
tonihei dee80788e4 Use Futures for MediaSession command queue instead of Runnables
Some commands may be asynchronous and subsequent commands need to
wait for them to complete before running. This change updates the
queue to use (and listen to) Futures instead of calling Runnables
directly. The commands are currently still added as Runanbles
though, so this change is a no-op.

Also moves the permission check in MediaSessionImpl to before
queueing the command because the permission should be check at
the time of calling the method.

When executing the comamnds in the queue, we need to be careful
to avoid recursion in the same thread (which happens when both
the Future is immediate and running on the correct thread already).
To avoid recursion, we detect this case and loop the commands
instead.

Issue: androidx/media#85
PiperOrigin-RevId: 461827264
2022-07-21 12:44:16 +00:00
..
cast Don't set the tag in CastTimeline 2022-07-13 17:41:37 +00:00
common HDR: Use FP16 color representation for texture processors. 2022-07-21 12:42:32 +00:00
database Mark all non-public IntDefs as only TYPE_USE 2022-02-21 16:56:36 +00:00
datasource Remove InvalidResponseCodeException#headerFields from the stable API 2022-05-26 11:51:27 +00:00
datasource_cronet Add @deprecated javadoc to all @Deprecated @Override methods 2022-05-31 13:51:49 +00:00
datasource_okhttp Workaround for OkHttp Interrupt issues. 2022-05-09 10:59:41 +01:00
datasource_rtmp Remove references to deprecated DefaultDataSourceFactory from dev guide 2022-03-24 15:13:09 +00:00
decoder Expect PresentationTime Discontinuity During Stream Transitions 2022-04-26 14:21:36 +01:00
decoder_av1 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_ffmpeg Remove FfmpegVideoRenderer from 2.18.0 release 2022-05-30 17:58:14 +00:00
decoder_flac Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
decoder_opus Ignore decoding test cases when library not available 2022-05-31 15:33:33 +00:00
decoder_vp9 Make sure native library loads use correct class loader 2022-02-22 11:25:44 +00:00
exoplayer Fix setDataSourceFactory handling in DefaultMediaSourceFactory 2022-07-13 17:48:16 +00:00
exoplayer_dash Fix setDataSourceFactory handling in DefaultMediaSourceFactory 2022-07-13 17:48:16 +00:00
exoplayer_hls Fix setDataSourceFactory handling in DefaultMediaSourceFactory 2022-07-13 17:48:16 +00:00
exoplayer_ima Simplify DefaultMediaSourceFactory instantiation in a test 2022-05-30 16:32:59 +00:00
exoplayer_rtsp Fix two typos in RtpVp8Reader and test 2022-07-13 17:43:29 +00:00
exoplayer_smoothstreaming Fix setDataSourceFactory handling in DefaultMediaSourceFactory 2022-07-13 17:48:16 +00:00
exoplayer_workmanager Reformat some javadoc 2022-02-18 14:54:02 +00:00
extractor Ignore reserved bit in parsing NAL unit type 2022-07-13 17:38:02 +00:00
session Use Futures for MediaSession command queue instead of Runnables 2022-07-21 12:44:16 +00:00
test_data HDR: Throw when unexpected color transfer encountered. 2022-07-21 12:41:33 +00:00
test_exoplayer_playback Move TrackGroupArray back to ExoPlayer 2022-03-17 13:08:56 +00:00
test_session_common Implement getCurrentTracks in MediaController 2022-07-21 12:40:39 +00:00
test_session_current Implement getCurrentTracks in MediaController 2022-07-21 12:40:39 +00:00
test_utils Add method to check if tunneling is enabled. 2022-07-13 17:36:42 +00:00
test_utils_robolectric Add timestamp to Metadata 2022-07-04 19:36:57 +00:00
transformer HDR: Use FP16 color representation for texture processors. 2022-07-21 12:42:32 +00:00
ui Use the current overrides of the player as preset 2022-07-21 12:39:46 +00:00
ui_leanback Listen to playWhenReady changes in LeanbackPlayerAdapter 2022-07-12 15:07:10 +00:00