Deprecate FixedTrackSelecion.Factory.

The only use of track selection factories is as adaptive track selection factories
in the DefaultTrackSelector. Using the fixed track selection factory here is dangerous
as it will throw if more than one track is selected.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213637500
This commit is contained in:
tonihei 2018-09-19 09:07:10 -07:00 committed by Oliver Woodman
parent 64b50ff9e6
commit 5c1829f063

View file

@ -27,8 +27,12 @@ import com.google.android.exoplayer2.util.Assertions;
public final class FixedTrackSelection extends BaseTrackSelection {
/**
* Factory for {@link FixedTrackSelection} instances.
* @deprecated Don't use as adaptive track selection factory as it will throw when multiple tracks
* are selected. If you would like to disable adaptive selection in {@link
* DefaultTrackSelector}, enable the {@link
* DefaultTrackSelector.Parameters#forceHighestSupportedBitrate} flag instead.
*/
@Deprecated
public static final class Factory implements TrackSelection.Factory {
private final int reason;