Java 类com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase 实例源码

项目:K-Sonic    文件:Representation.java   
/**
 * Constructs a new instance.
 *
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param baseUrl The base URL of the representation.
 * @param segmentBase A segment base element for the representation.
 * @param inbandEventStreams The in-band event streams in the representation. May be null.
 * @param customCacheKey A custom value to be returned from {@link #getCacheKey()}, or null. This
 *     parameter is ignored if {@code segmentBase} consists of multiple segments.
 * @return The constructed instance.
 */
public static Representation newInstance(String contentId, long revisionId, Format format,
    String baseUrl, SegmentBase segmentBase, List<SchemeValuePair> inbandEventStreams,
    String customCacheKey) {
  if (segmentBase instanceof SingleSegmentBase) {
    return new SingleSegmentRepresentation(contentId, revisionId, format, baseUrl,
        (SingleSegmentBase) segmentBase, inbandEventStreams, customCacheKey, C.LENGTH_UNSET);
  } else if (segmentBase instanceof MultiSegmentBase) {
    return new MultiSegmentRepresentation(contentId, revisionId, format, baseUrl,
        (MultiSegmentBase) segmentBase, inbandEventStreams);
  } else {
    throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or "
        + "MultiSegmentBase");
  }
}
项目:videoPickPlayer    文件:Representation.java   
/**
 * Constructs a new instance.
 *
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param segmentBase A segment base element for the representation.
 * @param customCacheKey A custom value to be returned from {@link #getCacheKey()}, or null.
 * @return The constructed instance.
 */
public static Representation newInstance(String contentId, long revisionId, Format format,
    SegmentBase segmentBase, String customCacheKey) {
  if (segmentBase instanceof SingleSegmentBase) {
    return new SingleSegmentRepresentation(contentId, revisionId, format,
        (SingleSegmentBase) segmentBase, customCacheKey, C.LENGTH_UNSET);
  } else if (segmentBase instanceof MultiSegmentBase) {
    return new MultiSegmentRepresentation(contentId, revisionId, format,
        (MultiSegmentBase) segmentBase, customCacheKey);
  } else {
    throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or "
        + "MultiSegmentBase");
  }
}
项目:transistor    文件:Representation.java   
/**
 * Constructs a new instance.
 *
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param baseUrl The base URL of the representation.
 * @param segmentBase A segment base element for the representation.
 * @param inbandEventStreams The in-band event streams in the representation. May be null.
 * @param customCacheKey A custom value to be returned from {@link #getCacheKey()}, or null. This
 *     parameter is ignored if {@code segmentBase} consists of multiple segments.
 * @return The constructed instance.
 */
public static Representation newInstance(String contentId, long revisionId, Format format,
    String baseUrl, SegmentBase segmentBase, List<Descriptor> inbandEventStreams,
    String customCacheKey) {
  if (segmentBase instanceof SingleSegmentBase) {
    return new SingleSegmentRepresentation(contentId, revisionId, format, baseUrl,
        (SingleSegmentBase) segmentBase, inbandEventStreams, customCacheKey, C.LENGTH_UNSET);
  } else if (segmentBase instanceof MultiSegmentBase) {
    return new MultiSegmentRepresentation(contentId, revisionId, format, baseUrl,
        (MultiSegmentBase) segmentBase, inbandEventStreams);
  } else {
    throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or "
        + "MultiSegmentBase");
  }
}
项目:K-Sonic    文件:Representation.java   
/**
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param baseUrl The base URL of the representation.
 * @param segmentBase The segment base underlying the representation.
 * @param inbandEventStreams The in-band event streams in the representation. May be null.
 */
public MultiSegmentRepresentation(String contentId, long revisionId, Format format,
    String baseUrl, MultiSegmentBase segmentBase, List<SchemeValuePair> inbandEventStreams) {
  super(contentId, revisionId, format, baseUrl, segmentBase, inbandEventStreams);
  this.segmentBase = segmentBase;
}
项目:videoPickPlayer    文件:Representation.java   
/**
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param segmentBase The segment base underlying the representation.
 * @param customCacheKey A custom value to be returned from {@link #getCacheKey()}, or null.
 */
public MultiSegmentRepresentation(String contentId, long revisionId, Format format,
    MultiSegmentBase segmentBase, String customCacheKey) {
  super(contentId, revisionId, format, segmentBase, customCacheKey);
  this.segmentBase = segmentBase;
}
项目:transistor    文件:Representation.java   
/**
 * @param contentId Identifies the piece of content to which this representation belongs.
 * @param revisionId Identifies the revision of the content.
 * @param format The format of the representation.
 * @param baseUrl The base URL of the representation.
 * @param segmentBase The segment base underlying the representation.
 * @param inbandEventStreams The in-band event streams in the representation. May be null.
 */
public MultiSegmentRepresentation(String contentId, long revisionId, Format format,
    String baseUrl, MultiSegmentBase segmentBase, List<Descriptor> inbandEventStreams) {
  super(contentId, revisionId, format, baseUrl, segmentBase, inbandEventStreams);
  this.segmentBase = segmentBase;
}