Deprecate ConcatenatingMediaSource

There is no known use case left that needs to be solved by this
class. All other use cases are better solved by alternative
approaches (Player playlist methods or ConcatenatingMediaSource2).

PiperOrigin-RevId: 563713384
This commit is contained in:
tonihei 2023-09-08 04:31:57 -07:00 committed by Copybara-Service
parent 866d62dd34
commit 6cff4a2638
2 changed files with 11 additions and 5 deletions

View File

@ -47,10 +47,16 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* Concatenates multiple {@link MediaSource}s. The list of {@link MediaSource}s can be modified * Concatenates multiple {@link MediaSource} instances. The list of {@link MediaSource} instances
* during playback. It is valid for the same {@link MediaSource} instance to be present more than * can be modified during playback. It is valid for the same {@link MediaSource} instance to be
* once in the concatenation. Access to this class is thread-safe. * present more than once in the concatenation. Access to this class is thread-safe.
*
* @deprecated Use playlist modification methods like {@link
* androidx.media3.common.Player#addMediaItem} instead. To combine multiple sources together as
* one item or for further wrapping in other {@link MediaSource} instances, use {@link
* ConcatenatingMediaSource2} instead.
*/ */
@Deprecated
@UnstableApi @UnstableApi
public final class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> { public final class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHolder> {

View File

@ -35,8 +35,8 @@ import java.util.Map;
* instead of this class. To add a {@link MediaSource} a specific number of times to the * instead of this class. To add a {@link MediaSource} a specific number of times to the
* playlist, use {@link ExoPlayer#addMediaSource} in a loop with the same {@link MediaSource}. * playlist, use {@link ExoPlayer#addMediaSource} in a loop with the same {@link MediaSource}.
* To combine repeated {@link MediaSource} instances into one {@link MediaSource}, for example * To combine repeated {@link MediaSource} instances into one {@link MediaSource}, for example
* to further wrap it in another {@link MediaSource}, use {@link ConcatenatingMediaSource} with * to further wrap it in another {@link MediaSource}, use {@link ConcatenatingMediaSource2} with
* the same {@link MediaSource} {@link ConcatenatingMediaSource#addMediaSource added} multiple * the same {@link MediaSource} {@link ConcatenatingMediaSource2.Builder#add added} multiple
* times. * times.
*/ */
@Deprecated @Deprecated