Clarify some threading requirements.

PiperOrigin-RevId: 512079471
This commit is contained in:
kimvde 2023-02-24 16:40:51 +00:00 committed by tonihei
parent 0134d7b048
commit 0afe5923d8
2 changed files with 3 additions and 3 deletions

View File

@ -92,8 +92,8 @@ public interface AssetLoader {
* <p>Must be called once per {@linkplain #onTrackCount(int) declared} track.
*
* <p>Must be called from the thread that will be used to call the returned {@link
* SampleConsumer}'s methods. This thread is generally different from the one used to access the
* {@link AssetLoader} methods.
* SampleConsumer}'s methods. This thread must be the same for all the tracks added, and is
* generally different from the one used to access the {@link AssetLoader} methods.
*
* @param format The {@link Format} of the input media (prior to video slow motion flattening or
* to decoding).

View File

@ -146,7 +146,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*
* <p>There can't be more than one {@link OnMediaItemChangedListener} for the same track type.
*
* <p>Can be called from any thread.
* <p>Must always be called from the same thread. This thread can be any thread.
*
* @param onMediaItemChangedListener The {@link OnMediaItemChangedListener}.
* @param trackType The {@link C.TrackType} for which to listen to {@link MediaItem} change