mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Keep replaced manifest uri in DashMediaSource after release.
This is only allowed for user-replaced manifest uris. If the manifest itself forwards to another manifest, we keep the original manifest in case the forwarding changes. Also removed the initialManifest as it can be simplified by using the sideloadedManifest indicator. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=183376209
This commit is contained in:
parent
d418204e26
commit
e6d25a9cb6
@ -266,8 +266,6 @@ public final class DashMediaSource implements MediaSource {
|
|||||||
|
|
||||||
private static final String TAG = "DashMediaSource";
|
private static final String TAG = "DashMediaSource";
|
||||||
|
|
||||||
private final Uri initialManifestUri;
|
|
||||||
private final DashManifest initialManifest;
|
|
||||||
private final boolean sideloadedManifest;
|
private final boolean sideloadedManifest;
|
||||||
private final DataSource.Factory manifestDataSourceFactory;
|
private final DataSource.Factory manifestDataSourceFactory;
|
||||||
private final DashChunkSource.Factory chunkSourceFactory;
|
private final DashChunkSource.Factory chunkSourceFactory;
|
||||||
@ -291,6 +289,7 @@ public final class DashMediaSource implements MediaSource {
|
|||||||
private IOException manifestFatalError;
|
private IOException manifestFatalError;
|
||||||
private Handler handler;
|
private Handler handler;
|
||||||
|
|
||||||
|
private Uri initialManifestUri;
|
||||||
private Uri manifestUri;
|
private Uri manifestUri;
|
||||||
private DashManifest manifest;
|
private DashManifest manifest;
|
||||||
private boolean manifestLoadPending;
|
private boolean manifestLoadPending;
|
||||||
@ -444,7 +443,6 @@ public final class DashMediaSource implements MediaSource {
|
|||||||
Handler eventHandler,
|
Handler eventHandler,
|
||||||
MediaSourceEventListener eventListener) {
|
MediaSourceEventListener eventListener) {
|
||||||
this.initialManifestUri = manifestUri;
|
this.initialManifestUri = manifestUri;
|
||||||
this.initialManifest = manifest;
|
|
||||||
this.manifest = manifest;
|
this.manifest = manifest;
|
||||||
this.manifestUri = manifestUri;
|
this.manifestUri = manifestUri;
|
||||||
this.manifestDataSourceFactory = manifestDataSourceFactory;
|
this.manifestDataSourceFactory = manifestDataSourceFactory;
|
||||||
@ -491,6 +489,7 @@ public final class DashMediaSource implements MediaSource {
|
|||||||
public void replaceManifestUri(Uri manifestUri) {
|
public void replaceManifestUri(Uri manifestUri) {
|
||||||
synchronized (manifestUriLock) {
|
synchronized (manifestUriLock) {
|
||||||
this.manifestUri = manifestUri;
|
this.manifestUri = manifestUri;
|
||||||
|
this.initialManifestUri = manifestUri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,7 +552,7 @@ public final class DashMediaSource implements MediaSource {
|
|||||||
}
|
}
|
||||||
manifestLoadStartTimestampMs = 0;
|
manifestLoadStartTimestampMs = 0;
|
||||||
manifestLoadEndTimestampMs = 0;
|
manifestLoadEndTimestampMs = 0;
|
||||||
manifest = initialManifest;
|
manifest = sideloadedManifest ? manifest : null;
|
||||||
manifestUri = initialManifestUri;
|
manifestUri = initialManifestUri;
|
||||||
manifestFatalError = null;
|
manifestFatalError = null;
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user