ExoPlayer: Remove deprecated methods.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=112736771
This commit is contained in:
parent
d804446b34
commit
7bf8080950
@ -273,42 +273,6 @@ public interface ExoPlayer {
|
|||||||
*/
|
*/
|
||||||
public void prepare(TrackRenderer... renderers);
|
public void prepare(TrackRenderer... renderers);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether the renderer at the given index has media to play.
|
|
||||||
* <p>
|
|
||||||
* Always returns false whilst the player is in the {@link #STATE_PREPARING} state.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@code getTrackCount(rendererIndex) > 0}.
|
|
||||||
* @param rendererIndex The index of the renderer.
|
|
||||||
* @return True if the renderer has media to play, false otherwise.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public boolean getRendererHasMedia(int rendererIndex);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets whether the renderer at the given index is enabled.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@code setSelectedTrack(rendererIndex, trackIndex)}. Passing
|
|
||||||
* {@link #TRACK_DEFAULT} as {@code trackIndex} is equivalent to enabling the renderer with
|
|
||||||
* this method. Passing {@link #TRACK_DISABLED} is equivalent to disabling the renderer.
|
|
||||||
* @param rendererIndex The index of the renderer.
|
|
||||||
* @param enabled Whether the renderer at the given index should be enabled.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void setRendererEnabled(int rendererIndex, boolean enabled);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the renderer at the given index is enabled.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@code getSelectedTrack(rendererIndex)}. A non-negative return value from that
|
|
||||||
* method is equivalent to this method returning true. A negative return value is equivalent
|
|
||||||
* to this method returning false.
|
|
||||||
* @param rendererIndex The index of the renderer.
|
|
||||||
* @return Whether the renderer is enabled.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public boolean getRendererEnabled(int rendererIndex);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of tracks exposed by the specified renderer.
|
* Returns the number of tracks exposed by the specified renderer.
|
||||||
*
|
*
|
||||||
|
@ -96,24 +96,6 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||||||
internalPlayer.prepare(renderers);
|
internalPlayer.prepare(renderers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public boolean getRendererHasMedia(int rendererIndex) {
|
|
||||||
return getTrackCount(rendererIndex) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public void setRendererEnabled(int rendererIndex, boolean enabled) {
|
|
||||||
setSelectedTrack(rendererIndex, enabled ? ExoPlayer.TRACK_DEFAULT : ExoPlayer.TRACK_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public boolean getRendererEnabled(int rendererIndex) {
|
|
||||||
return getSelectedTrack(rendererIndex) >= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getTrackCount(int rendererIndex) {
|
public int getTrackCount(int rendererIndex) {
|
||||||
return trackFormats[rendererIndex] != null ? trackFormats[rendererIndex].length : 0;
|
return trackFormats[rendererIndex] != null ? trackFormats[rendererIndex].length : 0;
|
||||||
|
@ -27,7 +27,6 @@ import com.google.android.exoplayer.drm.DrmInitData;
|
|||||||
import com.google.android.exoplayer.upstream.Allocator;
|
import com.google.android.exoplayer.upstream.Allocator;
|
||||||
import com.google.android.exoplayer.upstream.DataSource;
|
import com.google.android.exoplayer.upstream.DataSource;
|
||||||
import com.google.android.exoplayer.upstream.DataSpec;
|
import com.google.android.exoplayer.upstream.DataSpec;
|
||||||
import com.google.android.exoplayer.upstream.DefaultAllocator;
|
|
||||||
import com.google.android.exoplayer.upstream.Loader;
|
import com.google.android.exoplayer.upstream.Loader;
|
||||||
import com.google.android.exoplayer.upstream.Loader.Loadable;
|
import com.google.android.exoplayer.upstream.Loader.Loadable;
|
||||||
import com.google.android.exoplayer.util.Assertions;
|
import com.google.android.exoplayer.util.Assertions;
|
||||||
@ -203,20 +202,6 @@ public final class ExtractorSampleSource implements SampleSource, SampleSourceRe
|
|||||||
private int extractedSampleCount;
|
private int extractedSampleCount;
|
||||||
private int extractedSampleCountAtStartOfLoad;
|
private int extractedSampleCountAtStartOfLoad;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uri The {@link Uri} of the media stream.
|
|
||||||
* @param dataSource A data source to read the media stream.
|
|
||||||
* @param requestedBufferSize The requested total buffer size for storing sample data, in bytes.
|
|
||||||
* The actual allocated size may exceed the value passed in if the implementation requires it.
|
|
||||||
* @param extractors {@link Extractor}s to extract the media stream, in order of decreasing
|
|
||||||
* priority. If omitted, the default extractors will be used.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public ExtractorSampleSource(Uri uri, DataSource dataSource, int requestedBufferSize,
|
|
||||||
Extractor... extractors) {
|
|
||||||
this(uri, dataSource, new DefaultAllocator(64 * 1024), requestedBufferSize, extractors);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param uri The {@link Uri} of the media stream.
|
* @param uri The {@link Uri} of the media stream.
|
||||||
* @param dataSource A data source to read the media stream.
|
* @param dataSource A data source to read the media stream.
|
||||||
@ -232,23 +217,6 @@ public final class ExtractorSampleSource implements SampleSource, SampleSourceRe
|
|||||||
extractors);
|
extractors);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uri The {@link Uri} of the media stream.
|
|
||||||
* @param dataSource A data source to read the media stream.
|
|
||||||
* @param requestedBufferSize The requested total buffer size for storing sample data, in bytes.
|
|
||||||
* The actual allocated size may exceed the value passed in if the implementation requires it.
|
|
||||||
* @param minLoadableRetryCount The minimum number of times that the sample source will retry
|
|
||||||
* if a loading error occurs.
|
|
||||||
* @param extractors {@link Extractor}s to extract the media stream, in order of decreasing
|
|
||||||
* priority. If omitted, the default extractors will be used.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public ExtractorSampleSource(Uri uri, DataSource dataSource, int requestedBufferSize,
|
|
||||||
int minLoadableRetryCount, Extractor... extractors) {
|
|
||||||
this(uri, dataSource, new DefaultAllocator(64 * 1024), requestedBufferSize,
|
|
||||||
minLoadableRetryCount, extractors);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param uri The {@link Uri} of the media stream.
|
* @param uri The {@link Uri} of the media stream.
|
||||||
* @param dataSource A data source to read the media stream.
|
* @param dataSource A data source to read the media stream.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user