本文整理汇总了Java中com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase类的典型用法代码示例。如果您正苦于以下问题:Java MultiSegmentBase类的具体用法?Java MultiSegmentBase怎么用?Java MultiSegmentBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultiSegmentBase类属于com.google.android.exoplayer2.source.dash.manifest.SegmentBase包,在下文中一共展示了MultiSegmentBase类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newInstance
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* 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");
}
}
示例2: newInstance
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* 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");
}
}
示例3: newInstance
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* 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");
}
}
示例4: MultiSegmentRepresentation
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* @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;
}
示例5: MultiSegmentRepresentation
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* @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;
}
示例6: MultiSegmentRepresentation
import com.google.android.exoplayer2.source.dash.manifest.SegmentBase.MultiSegmentBase; //导入依赖的package包/类
/**
* @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;
}