Commit 49f4fe78 by Oliver Woodman

Rename URL->URI for manifest fetching

parent ded10605
......@@ -58,7 +58,7 @@ public class MediaPresentationDescription implements RedirectingManifest {
}
@Override
public String getNextManifestUrl() {
public String getNextManifestUri() {
return location;
}
......
......@@ -86,15 +86,15 @@ public class ManifestFetcher<T> implements Loader.Callback {
/**
* Interface for manifests that are able to specify that subsequent loads should use a different
* URL.
* URI.
*/
public interface RedirectingManifest {
/**
* Returns the URL from which subsequent manifests should be requested, or null to continue
* using the current URL.
* Returns the URI from which subsequent manifests should be requested, or null to continue
* using the current URI.
*/
public String getNextManifestUrl();
public String getNextManifestUri();
}
......@@ -103,7 +103,7 @@ public class ManifestFetcher<T> implements Loader.Callback {
private final Handler eventHandler;
private final EventListener eventListener;
/* package */ volatile String manifestUrl;
/* package */ volatile String manifestUri;
private int enabledCount;
private Loader loader;
......@@ -117,27 +117,27 @@ public class ManifestFetcher<T> implements Loader.Callback {
private volatile long manifestLoadTimestamp;
/**
* @param manifestUrl The manifest location.
* @param manifestUri The manifest location.
* @param uriDataSource The {@link UriDataSource} to use when loading the manifest.
* @param parser A parser to parse the loaded manifest data.
*/
public ManifestFetcher(String manifestUrl, UriDataSource uriDataSource,
public ManifestFetcher(String manifestUri, UriDataSource uriDataSource,
UriLoadable.Parser<T> parser) {
this(manifestUrl, uriDataSource, parser, null, null);
this(manifestUri, uriDataSource, parser, null, null);
}
/**
* @param manifestUrl The manifest location.
* @param manifestUri The manifest location.
* @param uriDataSource The {@link UriDataSource} to use when loading the manifest.
* @param parser A parser to parse the loaded manifest data.
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
*/
public ManifestFetcher(String manifestUrl, UriDataSource uriDataSource,
public ManifestFetcher(String manifestUri, UriDataSource uriDataSource,
UriLoadable.Parser<T> parser, Handler eventHandler, EventListener eventListener) {
this.parser = parser;
this.manifestUrl = manifestUrl;
this.manifestUri = manifestUri;
this.uriDataSource = uriDataSource;
this.eventHandler = eventHandler;
this.eventListener = eventListener;
......@@ -146,10 +146,10 @@ public class ManifestFetcher<T> implements Loader.Callback {
/**
* Updates the manifest location.
*
* @param manifestUrl The manifest location.
* @param manifestUri The manifest location.
*/
public void updateManifestUrl(String manifestUrl) {
this.manifestUrl = manifestUrl;
public void updateManifestUri(String manifestUri) {
this.manifestUri = manifestUri;
}
/**
......@@ -161,7 +161,7 @@ public class ManifestFetcher<T> implements Loader.Callback {
*/
public void singleLoad(Looper callbackLooper, final ManifestCallback<T> callback) {
SingleFetchHelper fetchHelper = new SingleFetchHelper(
new UriLoadable<>(manifestUrl, uriDataSource, parser), callbackLooper, callback);
new UriLoadable<>(manifestUri, uriDataSource, parser), callbackLooper, callback);
fetchHelper.startLoading();
}
......@@ -234,7 +234,7 @@ public class ManifestFetcher<T> implements Loader.Callback {
loader = new Loader("manifestLoader");
}
if (!loader.isLoading()) {
currentLoadable = new UriLoadable<>(manifestUrl, uriDataSource, parser);
currentLoadable = new UriLoadable<>(manifestUri, uriDataSource, parser);
loader.startLoading(currentLoadable, this);
notifyManifestRefreshStarted();
}
......@@ -254,9 +254,9 @@ public class ManifestFetcher<T> implements Loader.Callback {
if (manifest instanceof RedirectingManifest) {
RedirectingManifest redirectingManifest = (RedirectingManifest) manifest;
String nextLocation = redirectingManifest.getNextManifestUrl();
String nextLocation = redirectingManifest.getNextManifestUri();
if (!TextUtils.isEmpty(nextLocation)) {
manifestUrl = nextLocation;
manifestUri = nextLocation;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment