mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08: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
bff221b85e
commit
877c89a0e1
@ -488,7 +488,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,
|
||||||
@ -535,7 +535,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -986,7 +986,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;
|
||||||
@ -994,16 +995,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…
x
Reference in New Issue
Block a user