Java 类com.google.android.exoplayer.util.UriUtil 实例源码

项目:miku    文件:HlsChunkSource.java   
private MediaPlaylistChunk newMediaPlaylistChunk(int variantIndex) {
  Uri mediaPlaylistUri = UriUtil.resolveToUri(baseUri, variants[variantIndex].url);
  DataSpec dataSpec = new DataSpec(mediaPlaylistUri, 0, C.LENGTH_UNBOUNDED, null,
      DataSpec.FLAG_ALLOW_GZIP);
  return new MediaPlaylistChunk(dataSource, dataSpec, scratchSpace, playlistParser, variantIndex,
      mediaPlaylistUri.toString());
}
项目:miku    文件:SmoothStreamingManifest.java   
/**
 * Builds a uri for requesting the specified chunk of the specified track.
 *
 * @param track The index of the track for which to build the URL.
 * @param chunkIndex The index of the chunk for which to build the URL.
 * @return The request uri.
 */
public Uri buildRequestUri(int track, int chunkIndex) {
  Assertions.checkState(tracks != null);
  Assertions.checkState(chunkStartTimes != null);
  Assertions.checkState(chunkIndex < chunkStartTimes.size());
  String chunkUrl = chunkTemplate
      .replace(URL_PLACEHOLDER_BITRATE, Integer.toString(tracks[track].format.bitrate))
      .replace(URL_PLACEHOLDER_START_TIME, chunkStartTimes.get(chunkIndex).toString());
  return UriUtil.resolveToUri(baseUri, chunkUrl);
}
项目:ExoPlayer-Demo    文件:HlsChunkSource.java   
private MediaPlaylistChunk newMediaPlaylistChunk(int variantIndex) {
  Uri mediaPlaylistUri = UriUtil.resolveToUri(baseUri, variants[variantIndex].url);
  DataSpec dataSpec = new DataSpec(mediaPlaylistUri, 0, C.LENGTH_UNBOUNDED, null,
      DataSpec.FLAG_ALLOW_GZIP);
  return new MediaPlaylistChunk(dataSource, dataSpec, scratchSpace, playlistParser, variantIndex,
      mediaPlaylistUri.toString());
}
项目:ExoPlayer-Demo    文件:SmoothStreamingManifest.java   
/**
 * Builds a uri for requesting the specified chunk of the specified track.
 *
 * @param track The index of the track for which to build the URL.
 * @param chunkIndex The index of the chunk for which to build the URL.
 * @return The request uri.
 */
public Uri buildRequestUri(int track, int chunkIndex) {
  Assertions.checkState(tracks != null);
  Assertions.checkState(chunkStartTimes != null);
  Assertions.checkState(chunkIndex < chunkStartTimes.size());
  String chunkUrl = chunkTemplate
      .replace(URL_PLACEHOLDER_BITRATE, Integer.toString(tracks[track].format.bitrate))
      .replace(URL_PLACEHOLDER_START_TIME, chunkStartTimes.get(chunkIndex).toString());
  return UriUtil.resolveToUri(baseUri, chunkUrl);
}
项目:ExoPlayer    文件:HlsChunkSource.java   
private MediaPlaylistChunk newMediaPlaylistChunk(int variantIndex) {
  Uri mediaPlaylistUri = UriUtil.resolveToUri(baseUri, variants[variantIndex].url);
  DataSpec dataSpec = new DataSpec(mediaPlaylistUri, 0, C.LENGTH_UNBOUNDED, null,
      DataSpec.FLAG_ALLOW_GZIP);
  return new MediaPlaylistChunk(dataSource, dataSpec, scratchSpace, playlistParser, variantIndex,
      mediaPlaylistUri.toString());
}
项目:ExoPlayer    文件:SmoothStreamingManifest.java   
/**
 * Builds a uri for requesting the specified chunk of the specified track.
 *
 * @param track The index of the track for which to build the URL.
 * @param chunkIndex The index of the chunk for which to build the URL.
 * @return The request uri.
 */
public Uri buildRequestUri(int track, int chunkIndex) {
  Assertions.checkState(tracks != null);
  Assertions.checkState(chunkStartTimes != null);
  Assertions.checkState(chunkIndex < chunkStartTimes.size());
  String chunkUrl = chunkTemplate
      .replace(URL_PLACEHOLDER_BITRATE, Integer.toString(tracks[track].format.bitrate))
      .replace(URL_PLACEHOLDER_START_TIME, chunkStartTimes.get(chunkIndex).toString());
  return UriUtil.resolveToUri(baseUri, chunkUrl);
}
项目:miku    文件:MediaPresentationDescriptionParser.java   
protected static String parseBaseUrl(XmlPullParser xpp, String parentBaseUrl)
    throws XmlPullParserException, IOException {
  xpp.next();
  return UriUtil.resolve(parentBaseUrl, xpp.getText());
}
项目:ExoPlayer-Demo    文件:MediaPresentationDescriptionParser.java   
protected static String parseBaseUrl(XmlPullParser xpp, String parentBaseUrl)
    throws XmlPullParserException, IOException {
  xpp.next();
  return UriUtil.resolve(parentBaseUrl, xpp.getText());
}
项目:ExoPlayer    文件:MediaPresentationDescriptionParser.java   
protected static String parseBaseUrl(XmlPullParser xpp, String parentBaseUrl)
    throws XmlPullParserException, IOException {
  xpp.next();
  return UriUtil.resolve(parentBaseUrl, xpp.getText());
}
项目:miku    文件:RangedUri.java   
/**
 * Returns the {@link Uri} represented by the instance.
 *
 * @return The {@link Uri} represented by the instance.
 */
public Uri getUri() {
  return UriUtil.resolveToUri(baseUri, referenceUri);
}
项目:miku    文件:RangedUri.java   
/**
 * Returns the uri represented by the instance as a string.
 *
 * @return The uri represented by the instance.
 */
public String getUriString() {
  return UriUtil.resolve(baseUri, referenceUri);
}
项目:ExoPlayer-Demo    文件:RangedUri.java   
/**
 * Returns the {@link Uri} represented by the instance.
 *
 * @return The {@link Uri} represented by the instance.
 */
public Uri getUri() {
  return UriUtil.resolveToUri(baseUri, referenceUri);
}
项目:ExoPlayer-Demo    文件:RangedUri.java   
/**
 * Returns the uri represented by the instance as a string.
 *
 * @return The uri represented by the instance.
 */
public String getUriString() {
  return UriUtil.resolve(baseUri, referenceUri);
}
项目:ExoPlayer    文件:RangedUri.java   
/**
 * Returns the {@link Uri} represented by the instance.
 *
 * @return The {@link Uri} represented by the instance.
 */
public Uri getUri() {
  return UriUtil.resolveToUri(baseUri, referenceUri);
}
项目:ExoPlayer    文件:RangedUri.java   
/**
 * Returns the uri represented by the instance as a string.
 *
 * @return The uri represented by the instance.
 */
public String getUriString() {
  return UriUtil.resolve(baseUri, referenceUri);
}