Skip to content

Commit f52e9b8

Browse files
marcbaechingercopybara-github
authored andcommitted
Document to call BaseMediaSource methods on the playback thread
Issue: #2835 PiperOrigin-RevId: 819349989
1 parent b124547 commit f52e9b8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libraries/exoplayer/src/main/java/androidx/media3/exoplayer/source/BaseMediaSource.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,26 @@ public BaseMediaSource() {
6060
* TransferListener, PlayerId)}. This method is called at most once until the next call to {@link
6161
* #releaseSourceInternal()}.
6262
*
63+
* <p>This method is called on the playback thread.
64+
*
6365
* @param mediaTransferListener The transfer listener which should be informed of any media data
6466
* transfers. May be null if no listener is available. Note that this listener should usually
6567
* be only informed of transfers related to the media loads and not of auxiliary loads for
6668
* manifests and other data.
6769
*/
6870
protected abstract void prepareSourceInternal(@Nullable TransferListener mediaTransferListener);
6971

70-
/** Enables the source, see {@link #enable(MediaSourceCaller)}. */
72+
/** Enables the source, see {@link MediaSource#enable(MediaSourceCaller)}. */
7173
protected void enableInternal() {}
7274

73-
/** Disables the source, see {@link #disable(MediaSourceCaller)}. */
75+
/** Disables the source, see {@link MediaSource#disable(MediaSourceCaller)}. */
7476
protected void disableInternal() {}
7577

7678
/**
77-
* Releases the source, see {@link #releaseSource(MediaSourceCaller)}. This method is called
78-
* exactly once after each call to {@link #prepareSourceInternal(TransferListener)}.
79+
* Releases the source, see {@link MediaSource#releaseSource(MediaSourceCaller)}. This method is
80+
* called exactly once after each call to {@link #prepareSourceInternal(TransferListener)}.
81+
*
82+
* <p>This method is called on the playback thread.
7983
*/
8084
protected abstract void releaseSourceInternal();
8185

0 commit comments

Comments
 (0)