mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove deprecated Downloader constructors
PiperOrigin-RevId: 371307278
This commit is contained in:
parent
8c7d6447c0
commit
67fc1f0c0a
@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.offline;
|
package com.google.android.exoplayer2.offline;
|
||||||
|
|
||||||
import android.net.Uri;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.MediaItem;
|
import com.google.android.exoplayer2.MediaItem;
|
||||||
@ -45,14 +44,6 @@ public final class ProgressiveDownloader implements Downloader {
|
|||||||
private volatile @MonotonicNonNull RunnableFutureTask<Void, IOException> downloadRunnable;
|
private volatile @MonotonicNonNull RunnableFutureTask<Void, IOException> downloadRunnable;
|
||||||
private volatile boolean isCanceled;
|
private volatile boolean isCanceled;
|
||||||
|
|
||||||
/** @deprecated Use {@link #ProgressiveDownloader(MediaItem, CacheDataSource.Factory)} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public ProgressiveDownloader(
|
|
||||||
Uri uri, @Nullable String customCacheKey, CacheDataSource.Factory cacheDataSourceFactory) {
|
|
||||||
this(uri, customCacheKey, cacheDataSourceFactory, Runnable::run);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
@ -65,22 +56,6 @@ public final class ProgressiveDownloader implements Downloader {
|
|||||||
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #ProgressiveDownloader(MediaItem, CacheDataSource.Factory, Executor)}
|
|
||||||
* instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public ProgressiveDownloader(
|
|
||||||
Uri uri,
|
|
||||||
@Nullable String customCacheKey,
|
|
||||||
CacheDataSource.Factory cacheDataSourceFactory,
|
|
||||||
Executor executor) {
|
|
||||||
this(
|
|
||||||
new MediaItem.Builder().setUri(uri).setCustomCacheKey(customCacheKey).build(),
|
|
||||||
cacheDataSourceFactory,
|
|
||||||
executor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
|
@ -15,14 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.exoplayer2.source.dash.offline;
|
package com.google.android.exoplayer2.source.dash.offline;
|
||||||
|
|
||||||
import android.net.Uri;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.MediaItem;
|
import com.google.android.exoplayer2.MediaItem;
|
||||||
import com.google.android.exoplayer2.extractor.ChunkIndex;
|
import com.google.android.exoplayer2.extractor.ChunkIndex;
|
||||||
import com.google.android.exoplayer2.offline.DownloadException;
|
import com.google.android.exoplayer2.offline.DownloadException;
|
||||||
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
||||||
import com.google.android.exoplayer2.offline.StreamKey;
|
|
||||||
import com.google.android.exoplayer2.source.dash.DashSegmentIndex;
|
import com.google.android.exoplayer2.source.dash.DashSegmentIndex;
|
||||||
import com.google.android.exoplayer2.source.dash.DashUtil;
|
import com.google.android.exoplayer2.source.dash.DashUtil;
|
||||||
import com.google.android.exoplayer2.source.dash.DashWrappingSegmentIndex;
|
import com.google.android.exoplayer2.source.dash.DashWrappingSegmentIndex;
|
||||||
@ -72,14 +70,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
|
|||||||
*/
|
*/
|
||||||
public final class DashDownloader extends SegmentDownloader<DashManifest> {
|
public final class DashDownloader extends SegmentDownloader<DashManifest> {
|
||||||
|
|
||||||
/** @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory)} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public DashDownloader(
|
|
||||||
Uri manifestUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
|
|
||||||
this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
@ -91,21 +81,6 @@ public final class DashDownloader extends SegmentDownloader<DashManifest> {
|
|||||||
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #DashDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public DashDownloader(
|
|
||||||
Uri manifestUri,
|
|
||||||
List<StreamKey> streamKeys,
|
|
||||||
CacheDataSource.Factory cacheDataSourceFactory,
|
|
||||||
Executor executor) {
|
|
||||||
this(
|
|
||||||
new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(),
|
|
||||||
cacheDataSourceFactory,
|
|
||||||
executor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
|
@ -19,7 +19,6 @@ import android.net.Uri;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.MediaItem;
|
import com.google.android.exoplayer2.MediaItem;
|
||||||
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
||||||
import com.google.android.exoplayer2.offline.StreamKey;
|
|
||||||
import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist;
|
import com.google.android.exoplayer2.source.hls.playlist.HlsMasterPlaylist;
|
||||||
import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist;
|
import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist;
|
||||||
import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylist;
|
import com.google.android.exoplayer2.source.hls.playlist.HlsPlaylist;
|
||||||
@ -65,14 +64,6 @@ import java.util.concurrent.Executor;
|
|||||||
*/
|
*/
|
||||||
public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
|
public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
|
||||||
|
|
||||||
/** @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory)} instead. */
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public HlsDownloader(
|
|
||||||
Uri playlistUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
|
|
||||||
this(playlistUri, streamKeys, cacheDataSourceFactory, Runnable::run);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
@ -84,21 +75,6 @@ public final class HlsDownloader extends SegmentDownloader<HlsPlaylist> {
|
|||||||
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #HlsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public HlsDownloader(
|
|
||||||
Uri playlistUri,
|
|
||||||
List<StreamKey> streamKeys,
|
|
||||||
CacheDataSource.Factory cacheDataSourceFactory,
|
|
||||||
Executor executor) {
|
|
||||||
this(
|
|
||||||
new MediaItem.Builder().setUri(playlistUri).setStreamKeys(streamKeys).build(),
|
|
||||||
cacheDataSourceFactory,
|
|
||||||
executor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*
|
*
|
||||||
|
@ -17,10 +17,8 @@ package com.google.android.exoplayer2.source.smoothstreaming.offline;
|
|||||||
|
|
||||||
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
||||||
|
|
||||||
import android.net.Uri;
|
|
||||||
import com.google.android.exoplayer2.MediaItem;
|
import com.google.android.exoplayer2.MediaItem;
|
||||||
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
import com.google.android.exoplayer2.offline.SegmentDownloader;
|
||||||
import com.google.android.exoplayer2.offline.StreamKey;
|
|
||||||
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest;
|
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest;
|
||||||
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement;
|
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifest.StreamElement;
|
||||||
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifestParser;
|
import com.google.android.exoplayer2.source.smoothstreaming.manifest.SsManifestParser;
|
||||||
@ -61,16 +59,6 @@ import java.util.concurrent.Executor;
|
|||||||
*/
|
*/
|
||||||
public final class SsDownloader extends SegmentDownloader<SsManifest> {
|
public final class SsDownloader extends SegmentDownloader<SsManifest> {
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
|
||||||
public SsDownloader(
|
|
||||||
Uri manifestUri, List<StreamKey> streamKeys, CacheDataSource.Factory cacheDataSourceFactory) {
|
|
||||||
this(manifestUri, streamKeys, cacheDataSourceFactory, Runnable::run);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instance.
|
* Creates an instance.
|
||||||
*
|
*
|
||||||
@ -82,21 +70,6 @@ public final class SsDownloader extends SegmentDownloader<SsManifest> {
|
|||||||
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
this(mediaItem, cacheDataSourceFactory, Runnable::run);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Use {@link #SsDownloader(MediaItem, CacheDataSource.Factory, Executor)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public SsDownloader(
|
|
||||||
Uri manifestUri,
|
|
||||||
List<StreamKey> streamKeys,
|
|
||||||
CacheDataSource.Factory cacheDataSourceFactory,
|
|
||||||
Executor executor) {
|
|
||||||
this(
|
|
||||||
new MediaItem.Builder().setUri(manifestUri).setStreamKeys(streamKeys).build(),
|
|
||||||
cacheDataSourceFactory,
|
|
||||||
executor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instance.
|
* Creates an instance.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user