本文整理汇总了Java中com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement类的典型用法代码示例。如果您正苦于以下问题:Java SegmentTimelineElement类的具体用法?Java SegmentTimelineElement怎么用?Java SegmentTimelineElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SegmentTimelineElement类属于com.google.android.exoplayer.dash.mpd.SegmentBase包,在下文中一共展示了SegmentTimelineElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseSegmentTimeline
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected List<SegmentTimelineElement> parseSegmentTimeline(XmlPullParser xpp)
throws XmlPullParserException, IOException {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<>();
long elapsedTime = 0;
do {
xpp.next();
if (isStartTag(xpp, "S")) {
elapsedTime = parseLong(xpp, "t", elapsedTime);
long duration = parseLong(xpp, "d");
int count = 1 + parseInt(xpp, "r", 0);
for (int i = 0; i < count; i++) {
segmentTimeline.add(buildSegmentTimelineElement(elapsedTime, duration));
elapsedTime += duration;
}
}
} while (!isEndTag(xpp, "SegmentTimeline"));
return segmentTimeline;
}
开发者ID:XueyanLiu,项目名称:miku,代码行数:19,代码来源:MediaPresentationDescriptionParser.java
示例2: parseSegmentTimeline
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected List<SegmentTimelineElement> parseSegmentTimeline(XmlPullParser xpp)
throws XmlPullParserException, IOException {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<>();
long elapsedTime = 0;
do {
xpp.next();
if (ParserUtil.isStartTag(xpp, "S")) {
elapsedTime = parseLong(xpp, "t", elapsedTime);
long duration = parseLong(xpp, "d");
int count = 1 + parseInt(xpp, "r", 0);
for (int i = 0; i < count; i++) {
segmentTimeline.add(buildSegmentTimelineElement(elapsedTime, duration));
elapsedTime += duration;
}
}
} while (!ParserUtil.isEndTag(xpp, "SegmentTimeline"));
return segmentTimeline;
}
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:19,代码来源:MediaPresentationDescriptionParser.java
示例3: buildSegmentTimelineRepresentation
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
private static Representation buildSegmentTimelineRepresentation(long timelineDurationMs,
long timelineStartTimeMs) {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<>();
List<RangedUri> mediaSegments = new ArrayList<>();
long segmentStartTimeMs = timelineStartTimeMs;
long byteStart = 0;
// Create all but the last segment with LIVE_SEGMENT_DURATION_MS.
int segmentCount = (int) Util.ceilDivide(timelineDurationMs, LIVE_SEGMENT_DURATION_MS);
for (int i = 0; i < segmentCount - 1; i++) {
segmentTimeline.add(new SegmentTimelineElement(segmentStartTimeMs, LIVE_SEGMENT_DURATION_MS));
mediaSegments.add(new RangedUri("", "", byteStart, 500L));
segmentStartTimeMs += LIVE_SEGMENT_DURATION_MS;
byteStart += 500;
}
// The final segment duration is calculated so that the total duration is timelineDurationMs.
long finalSegmentDurationMs = (timelineStartTimeMs + timelineDurationMs) - segmentStartTimeMs;
segmentTimeline.add(new SegmentTimelineElement(segmentStartTimeMs, finalSegmentDurationMs));
mediaSegments.add(new RangedUri("", "", byteStart, 500L));
segmentStartTimeMs += finalSegmentDurationMs;
byteStart += 500;
// Construct the list.
MultiSegmentBase segmentBase = new SegmentList(null, 1000, 0, 0, 0, segmentTimeline,
mediaSegments);
return Representation.newInstance(null, 0, REGULAR_VIDEO, segmentBase);
}
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:26,代码来源:DashChunkSourceTest.java
示例4: parseSegmentTimeline
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected List<SegmentTimelineElement> parseSegmentTimeline(XmlPullParser xpp)
throws XmlPullParserException, IOException {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<SegmentTimelineElement>();
long elapsedTime = 0;
do {
xpp.next();
if (isStartTag(xpp, "S")) {
elapsedTime = parseLong(xpp, "t", elapsedTime);
long duration = parseLong(xpp, "d");
int count = 1 + parseInt(xpp, "r", 0);
for (int i = 0; i < count; i++) {
segmentTimeline.add(buildSegmentTimelineElement(elapsedTime, duration));
elapsedTime += duration;
}
}
} while (!isEndTag(xpp, "SegmentTimeline"));
return segmentTimeline;
}
开发者ID:Weco,项目名称:android-exoplayer,代码行数:19,代码来源:MediaPresentationDescriptionParser.java
示例5: parseSegmentTimeline
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
private List<SegmentTimelineElement> parseSegmentTimeline(XmlPullParser xpp)
throws XmlPullParserException, IOException {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<SegmentTimelineElement>();
long elapsedTime = 0;
do {
xpp.next();
if (isStartTag(xpp, "S")) {
elapsedTime = parseLong(xpp, "t", elapsedTime);
long duration = parseLong(xpp, "d");
int count = 1 + parseInt(xpp, "r", 0);
for (int i = 0; i < count; i++) {
segmentTimeline.add(new SegmentTimelineElement(elapsedTime, duration));
elapsedTime += duration;
}
}
} while (!isEndTag(xpp, "SegmentTimeline"));
return segmentTimeline;
}
开发者ID:edx,项目名称:edx-app-android,代码行数:19,代码来源:MediaPresentationDescriptionParser.java
示例6: generateSegmentTimelineRepresentation
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
private static Representation generateSegmentTimelineRepresentation(long segmentStartMs,
long periodStartMs, long duration) {
List<SegmentTimelineElement> segmentTimeline = new ArrayList<>();
List<RangedUri> mediaSegments = new ArrayList<>();
long segmentStartTimeMs = segmentStartMs;
long byteStart = 0;
for (int i = 0; i < (duration / LIVE_SEGMENT_DURATION_MS); i++) {
segmentTimeline.add(new SegmentTimelineElement(segmentStartTimeMs, LIVE_SEGMENT_DURATION_MS));
mediaSegments.add(new RangedUri("", "", byteStart, 500L));
segmentStartTimeMs += LIVE_SEGMENT_DURATION_MS;
byteStart += 500;
}
int startNumber = (int) ((periodStartMs + segmentStartMs) / LIVE_SEGMENT_DURATION_MS);
MultiSegmentBase segmentBase = new SegmentList(null, 1000, 0,
TrackRenderer.UNKNOWN_TIME_US, startNumber, TrackRenderer.UNKNOWN_TIME_US, segmentTimeline,
mediaSegments);
return Representation.newInstance(periodStartMs, TrackRenderer.UNKNOWN_TIME_US, null, 0,
REGULAR_VIDEO, segmentBase);
}
开发者ID:raphanda,项目名称:ExoPlayer,代码行数:21,代码来源:DashChunkSourceTest.java
示例7: parseSegmentList
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentList parseSegmentList(XmlPullParser xpp, String baseUrl, SegmentList parent,
long periodDurationMs) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
List<RangedUri> segments = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
} else if (isStartTag(xpp, "SegmentURL")) {
if (segments == null) {
segments = new ArrayList<>();
}
segments.add(parseSegmentUrl(xpp, baseUrl));
}
} while (!isEndTag(xpp, "SegmentList"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
segments = segments != null ? segments : parent.mediaSegments;
}
return buildSegmentList(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, segments);
}
开发者ID:XueyanLiu,项目名称:miku,代码行数:37,代码来源:MediaPresentationDescriptionParser.java
示例8: parseSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate parseSegmentTemplate(XmlPullParser xpp, String baseUrl,
SegmentTemplate parent, long periodDurationMs) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
UrlTemplate mediaTemplate = parseUrlTemplate(xpp, "media",
parent != null ? parent.mediaTemplate : null);
UrlTemplate initializationTemplate = parseUrlTemplate(xpp, "initialization",
parent != null ? parent.initializationTemplate : null);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
}
} while (!isEndTag(xpp, "SegmentTemplate"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
}
return buildSegmentTemplate(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:XueyanLiu,项目名称:miku,代码行数:34,代码来源:MediaPresentationDescriptionParser.java
示例9: buildSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate buildSegmentTemplate(RangedUri initialization, long timescale,
long presentationTimeOffset, long periodDurationMs, int startNumber, long duration,
List<SegmentTimelineElement> timeline, UrlTemplate initializationTemplate,
UrlTemplate mediaTemplate, String baseUrl) {
return new SegmentTemplate(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:XueyanLiu,项目名称:miku,代码行数:8,代码来源:MediaPresentationDescriptionParser.java
示例10: parseSegmentList
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentList parseSegmentList(XmlPullParser xpp, String baseUrl, SegmentList parent)
throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
List<RangedUri> segments = null;
do {
xpp.next();
if (ParserUtil.isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (ParserUtil.isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
} else if (ParserUtil.isStartTag(xpp, "SegmentURL")) {
if (segments == null) {
segments = new ArrayList<>();
}
segments.add(parseSegmentUrl(xpp, baseUrl));
}
} while (!ParserUtil.isEndTag(xpp, "SegmentList"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
segments = segments != null ? segments : parent.mediaSegments;
}
return buildSegmentList(initialization, timescale, presentationTimeOffset,
startNumber, duration, timeline, segments);
}
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:37,代码来源:MediaPresentationDescriptionParser.java
示例11: parseSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate parseSegmentTemplate(XmlPullParser xpp, String baseUrl,
SegmentTemplate parent) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
UrlTemplate mediaTemplate = parseUrlTemplate(xpp, "media",
parent != null ? parent.mediaTemplate : null);
UrlTemplate initializationTemplate = parseUrlTemplate(xpp, "initialization",
parent != null ? parent.initializationTemplate : null);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
do {
xpp.next();
if (ParserUtil.isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (ParserUtil.isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
}
} while (!ParserUtil.isEndTag(xpp, "SegmentTemplate"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
}
return buildSegmentTemplate(initialization, timescale, presentationTimeOffset,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:34,代码来源:MediaPresentationDescriptionParser.java
示例12: buildSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate buildSegmentTemplate(RangedUri initialization, long timescale,
long presentationTimeOffset, int startNumber, long duration,
List<SegmentTimelineElement> timeline, UrlTemplate initializationTemplate,
UrlTemplate mediaTemplate, String baseUrl) {
return new SegmentTemplate(initialization, timescale, presentationTimeOffset,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:asifkhan11,项目名称:ExoPlayer-Demo,代码行数:8,代码来源:MediaPresentationDescriptionParser.java
示例13: parseSegmentList
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentList parseSegmentList(XmlPullParser xpp, Uri baseUrl, SegmentList parent,
long periodDuration) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
List<RangedUri> segments = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
} else if (isStartTag(xpp, "SegmentURL")) {
if (segments == null) {
segments = new ArrayList<RangedUri>();
}
segments.add(parseSegmentUrl(xpp, baseUrl));
}
} while (!isEndTag(xpp, "SegmentList"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
segments = segments != null ? segments : parent.mediaSegments;
}
return buildSegmentList(initialization, timescale, presentationTimeOffset, periodDuration,
startNumber, duration, timeline, segments);
}
开发者ID:Weco,项目名称:android-exoplayer,代码行数:37,代码来源:MediaPresentationDescriptionParser.java
示例14: parseSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate parseSegmentTemplate(XmlPullParser xpp, Uri baseUrl,
SegmentTemplate parent, long periodDuration) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
UrlTemplate mediaTemplate = parseUrlTemplate(xpp, "media",
parent != null ? parent.mediaTemplate : null);
UrlTemplate initializationTemplate = parseUrlTemplate(xpp, "initialization",
parent != null ? parent.initializationTemplate : null);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
}
} while (!isEndTag(xpp, "SegmentTemplate"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
}
return buildSegmentTemplate(initialization, timescale, presentationTimeOffset, periodDuration,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:Weco,项目名称:android-exoplayer,代码行数:34,代码来源:MediaPresentationDescriptionParser.java
示例15: buildSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate buildSegmentTemplate(RangedUri initialization, long timescale,
long presentationTimeOffset, long periodDuration, int startNumber, long duration,
List<SegmentTimelineElement> timeline, UrlTemplate initializationTemplate,
UrlTemplate mediaTemplate, Uri baseUrl) {
return new SegmentTemplate(initialization, timescale, presentationTimeOffset, periodDuration,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:Weco,项目名称:android-exoplayer,代码行数:8,代码来源:MediaPresentationDescriptionParser.java
示例16: parseSegmentList
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentList parseSegmentList(XmlPullParser xpp, Uri baseUrl, SegmentList parent,
long periodDurationMs) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
List<RangedUri> segments = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
} else if (isStartTag(xpp, "SegmentURL")) {
if (segments == null) {
segments = new ArrayList<RangedUri>();
}
segments.add(parseSegmentUrl(xpp, baseUrl));
}
} while (!isEndTag(xpp, "SegmentList"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
segments = segments != null ? segments : parent.mediaSegments;
}
return buildSegmentList(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, segments);
}
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:37,代码来源:MediaPresentationDescriptionParser.java
示例17: parseSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate parseSegmentTemplate(XmlPullParser xpp, Uri baseUrl,
SegmentTemplate parent, long periodDurationMs) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 1);
UrlTemplate mediaTemplate = parseUrlTemplate(xpp, "media",
parent != null ? parent.mediaTemplate : null);
UrlTemplate initializationTemplate = parseUrlTemplate(xpp, "initialization",
parent != null ? parent.initializationTemplate : null);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
}
} while (!isEndTag(xpp, "SegmentTemplate"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
}
return buildSegmentTemplate(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:34,代码来源:MediaPresentationDescriptionParser.java
示例18: buildSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
protected SegmentTemplate buildSegmentTemplate(RangedUri initialization, long timescale,
long presentationTimeOffset, long periodDurationMs, int startNumber, long duration,
List<SegmentTimelineElement> timeline, UrlTemplate initializationTemplate,
UrlTemplate mediaTemplate, Uri baseUrl) {
return new SegmentTemplate(initialization, timescale, presentationTimeOffset, periodDurationMs,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:8,代码来源:MediaPresentationDescriptionParser.java
示例19: parseSegmentList
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
private SegmentList parseSegmentList(XmlPullParser xpp, Uri baseUrl, SegmentList parent,
long periodDuration) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 0);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
List<RangedUri> segments = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
} else if (isStartTag(xpp, "SegmentURL")) {
if (segments == null) {
segments = new ArrayList<RangedUri>();
}
segments.add(parseSegmentUrl(xpp, baseUrl));
}
} while (!isEndTag(xpp, "SegmentList"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
segments = segments != null ? segments : parent.mediaSegments;
}
return new SegmentList(initialization, timescale, presentationTimeOffset, periodDuration,
startNumber, duration, timeline, segments);
}
开发者ID:edx,项目名称:edx-app-android,代码行数:37,代码来源:MediaPresentationDescriptionParser.java
示例20: parseSegmentTemplate
import com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement; //导入依赖的package包/类
private SegmentTemplate parseSegmentTemplate(XmlPullParser xpp, Uri baseUrl,
SegmentTemplate parent, long periodDuration) throws XmlPullParserException, IOException {
long timescale = parseLong(xpp, "timescale", parent != null ? parent.timescale : 1);
long presentationTimeOffset = parseLong(xpp, "presentationTimeOffset",
parent != null ? parent.presentationTimeOffset : 0);
long duration = parseLong(xpp, "duration", parent != null ? parent.duration : -1);
int startNumber = parseInt(xpp, "startNumber", parent != null ? parent.startNumber : 0);
UrlTemplate mediaTemplate = parseUrlTemplate(xpp, "media",
parent != null ? parent.mediaTemplate : null);
UrlTemplate initializationTemplate = parseUrlTemplate(xpp, "initialization",
parent != null ? parent.initializationTemplate : null);
RangedUri initialization = null;
List<SegmentTimelineElement> timeline = null;
do {
xpp.next();
if (isStartTag(xpp, "Initialization")) {
initialization = parseInitialization(xpp, baseUrl);
} else if (isStartTag(xpp, "SegmentTimeline")) {
timeline = parseSegmentTimeline(xpp);
}
} while (!isEndTag(xpp, "SegmentTemplate"));
if (parent != null) {
initialization = initialization != null ? initialization : parent.initialization;
timeline = timeline != null ? timeline : parent.segmentTimeline;
}
return new SegmentTemplate(initialization, timescale, presentationTimeOffset, periodDuration,
startNumber, duration, timeline, initializationTemplate, mediaTemplate, baseUrl);
}
开发者ID:edx,项目名称:edx-app-android,代码行数:34,代码来源:MediaPresentationDescriptionParser.java
注:本文中的com.google.android.exoplayer.dash.mpd.SegmentBase.SegmentTimelineElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论