mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Make it possible to extend DashManifestParser to parse revision-id.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175554723
This commit is contained in:
parent
d50f7317a2
commit
db7e9a548c
1 changed files with 7 additions and 4 deletions
|
|
@ -496,7 +496,7 @@ public class DashManifestParser extends DefaultHandler
|
||||||
segmentBase = segmentBase != null ? segmentBase : new SingleSegmentBase();
|
segmentBase = segmentBase != null ? segmentBase : new SingleSegmentBase();
|
||||||
|
|
||||||
return new RepresentationInfo(format, baseUrl, segmentBase, drmSchemeType, drmSchemeDatas,
|
return new RepresentationInfo(format, baseUrl, segmentBase, drmSchemeType, drmSchemeDatas,
|
||||||
inbandEventStreams);
|
inbandEventStreams, Representation.REVISION_ID_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Format buildFormat(String id, String containerMimeType, int width, int height,
|
protected Format buildFormat(String id, String containerMimeType, int width, int height,
|
||||||
|
|
@ -543,7 +543,7 @@ public class DashManifestParser extends DefaultHandler
|
||||||
}
|
}
|
||||||
ArrayList<Descriptor> inbandEventStreams = representationInfo.inbandEventStreams;
|
ArrayList<Descriptor> inbandEventStreams = representationInfo.inbandEventStreams;
|
||||||
inbandEventStreams.addAll(extraInbandEventStreams);
|
inbandEventStreams.addAll(extraInbandEventStreams);
|
||||||
return Representation.newInstance(contentId, Representation.REVISION_ID_DEFAULT, format,
|
return Representation.newInstance(contentId, representationInfo.revisionId, format,
|
||||||
representationInfo.baseUrl, representationInfo.segmentBase, inbandEventStreams);
|
representationInfo.baseUrl, representationInfo.segmentBase, inbandEventStreams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1131,7 +1131,8 @@ public class DashManifestParser extends DefaultHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class RepresentationInfo {
|
/** A parsed Representation element. */
|
||||||
|
protected static final class RepresentationInfo {
|
||||||
|
|
||||||
public final Format format;
|
public final Format format;
|
||||||
public final String baseUrl;
|
public final String baseUrl;
|
||||||
|
|
@ -1139,16 +1140,18 @@ public class DashManifestParser extends DefaultHandler
|
||||||
public final String drmSchemeType;
|
public final String drmSchemeType;
|
||||||
public final ArrayList<SchemeData> drmSchemeDatas;
|
public final ArrayList<SchemeData> drmSchemeDatas;
|
||||||
public final ArrayList<Descriptor> inbandEventStreams;
|
public final ArrayList<Descriptor> inbandEventStreams;
|
||||||
|
public final long revisionId;
|
||||||
|
|
||||||
public RepresentationInfo(Format format, String baseUrl, SegmentBase segmentBase,
|
public RepresentationInfo(Format format, String baseUrl, SegmentBase segmentBase,
|
||||||
String drmSchemeType, ArrayList<SchemeData> drmSchemeDatas,
|
String drmSchemeType, ArrayList<SchemeData> drmSchemeDatas,
|
||||||
ArrayList<Descriptor> inbandEventStreams) {
|
ArrayList<Descriptor> inbandEventStreams, long revisionId) {
|
||||||
this.format = format;
|
this.format = format;
|
||||||
this.baseUrl = baseUrl;
|
this.baseUrl = baseUrl;
|
||||||
this.segmentBase = segmentBase;
|
this.segmentBase = segmentBase;
|
||||||
this.drmSchemeType = drmSchemeType;
|
this.drmSchemeType = drmSchemeType;
|
||||||
this.drmSchemeDatas = drmSchemeDatas;
|
this.drmSchemeDatas = drmSchemeDatas;
|
||||||
this.inbandEventStreams = inbandEventStreams;
|
this.inbandEventStreams = inbandEventStreams;
|
||||||
|
this.revisionId = revisionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue