Commit db7e9a54 by arnaudberry Committed by Oliver Woodman

Make it possible to extend DashManifestParser to parse revision-id.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175554723
parent d50f7317
......@@ -496,7 +496,7 @@ public class DashManifestParser extends DefaultHandler
segmentBase = segmentBase != null ? segmentBase : new SingleSegmentBase();
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,
......@@ -543,7 +543,7 @@ public class DashManifestParser extends DefaultHandler
}
ArrayList<Descriptor> inbandEventStreams = representationInfo.inbandEventStreams;
inbandEventStreams.addAll(extraInbandEventStreams);
return Representation.newInstance(contentId, Representation.REVISION_ID_DEFAULT, format,
return Representation.newInstance(contentId, representationInfo.revisionId, format,
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 String baseUrl;
......@@ -1139,16 +1140,18 @@ public class DashManifestParser extends DefaultHandler
public final String drmSchemeType;
public final ArrayList<SchemeData> drmSchemeDatas;
public final ArrayList<Descriptor> inbandEventStreams;
public final long revisionId;
public RepresentationInfo(Format format, String baseUrl, SegmentBase segmentBase,
String drmSchemeType, ArrayList<SchemeData> drmSchemeDatas,
ArrayList<Descriptor> inbandEventStreams) {
ArrayList<Descriptor> inbandEventStreams, long revisionId) {
this.format = format;
this.baseUrl = baseUrl;
this.segmentBase = segmentBase;
this.drmSchemeType = drmSchemeType;
this.drmSchemeDatas = drmSchemeDatas;
this.inbandEventStreams = inbandEventStreams;
this.revisionId = revisionId;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment