DashManifestParser


@UnstableApi
class DashManifestParser : DefaultHandler, ParsingLoadable.Parser


A parser of media presentation description files.

Summary

Nested types

A parsed Representation element.

Public constructors

Public functions

java-static Unit

If the provided XmlPullParser is currently positioned at the start of a tag, skips forward to the end of that tag.

DashManifest!
parse(uri: Uri!, inputStream: InputStream!)

Parses an object from a response.

Protected functions

AdaptationSet!
buildAdaptationSet(
    id: Long,
    @C.TrackType contentType: Int,
    representations: (Mutable)List<Representation!>!,
    accessibilityDescriptors: (Mutable)List<Descriptor!>!,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!
)
EventMessage!
buildEvent(
    schemeIdUri: String!,
    value: String!,
    id: Long,
    durationMs: Long,
    messageData: ByteArray!
)
EventStream!
buildEventStream(
    schemeIdUri: String!,
    value: String!,
    timescale: Long,
    presentationTimesUs: LongArray!,
    events: Array<EventMessage!>!
)
Format!
buildFormat(
    id: String?,
    containerMimeType: String?,
    width: Int,
    height: Int,
    frameRate: Float,
    audioChannels: Int,
    audioSamplingRate: Int,
    bitrate: Int,
    language: String?,
    roleDescriptors: (Mutable)List<Descriptor!>!,
    accessibilityDescriptors: (Mutable)List<Descriptor!>!,
    codecs: String?,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!
)
DashManifest!
buildMediaPresentationDescription(
    availabilityStartTime: Long,
    durationMs: Long,
    minBufferTimeMs: Long,
    dynamic: Boolean,
    minUpdateTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    suggestedPresentationDelayMs: Long,
    publishTimeMs: Long,
    programInformation: ProgramInformation?,
    utcTiming: UtcTimingElement?,
    serviceDescription: ServiceDescriptionElement?,
    location: Uri?,
    periods: (Mutable)List<Period!>!
)
Period!
buildPeriod(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!,
    eventStreams: (Mutable)List<EventStream!>!,
    assetIdentifier: Descriptor?
)
RangedUri!
buildRangedUri(urlText: String!, rangeStart: Long, rangeLength: Long)
Representation!
buildRepresentation(
    representationInfo: DashManifestParser.RepresentationInfo!,
    label: String?,
    labels: (Mutable)List<Label!>!,
    extraDrmSchemeType: String?,
    extraDrmSchemeDatas: ArrayList<DrmInitData.SchemeData!>!,
    extraInbandEventStreams: ArrayList<Descriptor!>!
)
SegmentBase.SegmentList!
buildSegmentList(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    duration: Long,
    timeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>?,
    availabilityTimeOffsetUs: Long,
    segments: (Mutable)List<RangedUri!>?,
    timeShiftBufferDepthMs: Long,
    periodStartUnixTimeMs: Long
)
SegmentBase.SegmentTemplate!
buildSegmentTemplate(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    endNumber: Long,
    duration: Long,
    timeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>!,
    availabilityTimeOffsetUs: Long,
    initializationTemplate: UrlTemplate?,
    mediaTemplate: UrlTemplate?,
    timeShiftBufferDepthMs: Long,
    periodStartUnixTimeMs: Long
)
SegmentBase.SegmentTimelineElement!
buildSegmentTimelineElement(startTime: Long, duration: Long)
SegmentBase.SingleSegmentBase!
buildSingleSegmentBase(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    indexStart: Long,
    indexLength: Long
)
UtcTimingElement!
buildUtcTimingElement(schemeIdUri: String!, value: String!)
AdaptationSet!
parseAdaptationSet(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    segmentBase: SegmentBase?,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    periodStartUnixTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
)
Unit

Parses a child of an AdaptationSet element.

Int
Long
parseAvailabilityTimeOffsetUs(
    xpp: XmlPullParser!,
    parentAvailabilityTimeOffsetUs: Long
)

Parses the availabilityTimeOffset value and returns the parsed value or the parent value if it doesn't exist.

(Mutable)List<BaseUrl!>!
parseBaseUrl(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    dvbProfileDeclared: Boolean
)

Parses a BaseURL element.

java-static Int
parseCea608AccessibilityChannel(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
)
java-static Int
parseCea708AccessibilityChannel(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
)
Pair<@NullableType String!, @NullableType DrmInitData.SchemeData!>!

Parses a ContentProtection element.

Int
java-static Long
parseDateTime(xpp: XmlPullParser!, name: String!, defaultValue: Long)
java-static Descriptor!

Parses a Descriptor from an element.

java-static Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dolby.com,2014:dash:audio_channel_configuration:2011" as defined by table E.5 in ETSI TS 102 366, or by the legacy schemeIdUri "urn:dolby:dash:audio_channel_configuration:2011".

java-static Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dts.com,2014:dash:audio_channel_configuration:2012" as defined by Annex G (3.2) in ETSI TS 102 114 V1.6.1, or by the legacy schemeIdUri "urn:dts:dash:audio_channel_configuration:2012".

java-static Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dts.com,2018:uhd:audio_channel_configuration" as defined by table B-5 in ETSI TS 103 491 v1.2.1.

java-static Long
parseDuration(xpp: XmlPullParser!, name: String!, defaultValue: Long)
java-static String!
parseEac3SupplementalProperties(
    supplementalProperties: (Mutable)List<Descriptor!>!
)
Pair<Long!, EventMessage!>!
parseEvent(
    xpp: XmlPullParser!,
    schemeIdUri: String!,
    value: String!,
    timescale: Long,
    presentationTimeOffset: Long,
    scratchOutputStream: ByteArrayOutputStream!
)

Parses a single Event node in the manifest.

ByteArray<Byte>!
parseEventObject(
    xpp: XmlPullParser!,
    scratchOutputStream: ByteArrayOutputStream!
)

Parses an event object.

EventStream!

Parses a single EventStream node in the manifest.

java-static Float
parseFloat(xpp: XmlPullParser!, name: String!, defaultValue: Float)
java-static Float
parseFrameRate(xpp: XmlPullParser!, defaultValue: Float)
RangedUri!
java-static Int
parseInt(xpp: XmlPullParser!, name: String!, defaultValue: Int)
Label!

Parses a Label element.

java-static Long
java-static Long
parseLong(xpp: XmlPullParser!, name: String!, defaultValue: Long)
DashManifest!
parseMediaPresentationDescription(
    xpp: XmlPullParser!,
    documentBaseUri: Uri!
)
java-static Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "urn:mpeg:mpegB:cicp:ChannelConfiguration", as defined by ISO 23001-8 clause 8.1.

Pair<Period!, Long!>!
parsePeriod(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    defaultStartMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    availabilityStartTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
)
Array<String!>!
parseProfiles(
    xpp: XmlPullParser!,
    attributeName: String!,
    defaultValue: Array<String!>!
)
ProgramInformation!
RangedUri!
parseRangedUrl(
    xpp: XmlPullParser!,
    urlAttribute: String!,
    rangeAttribute: String!
)
DashManifestParser.RepresentationInfo!
parseRepresentation(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    adaptationSetMimeType: String?,
    adaptationSetCodecs: String?,
    adaptationSetWidth: Int,
    adaptationSetHeight: Int,
    adaptationSetFrameRate: Float,
    adaptationSetAudioChannels: Int,
    adaptationSetAudioSamplingRate: Int,
    adaptationSetLanguage: String?,
    adaptationSetRoleDescriptors: (Mutable)List<Descriptor!>!,
    adaptationSetAccessibilityDescriptors: (Mutable)List<Descriptor!>!,
    adaptationSetEssentialProperties: (Mutable)List<Descriptor!>!,
    adaptationSetSupplementalProperties: (Mutable)List<Descriptor!>!,
    segmentBase: SegmentBase?,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
)
Int
Int
Int
@C.RoleFlags
parseRoleFlagsFromProperties(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
)
Int
SegmentBase.SingleSegmentBase!
SegmentBase.SegmentList!
parseSegmentList(
    xpp: XmlPullParser!,
    parent: SegmentBase.SegmentList?,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long
)
SegmentBase.SegmentTemplate!
parseSegmentTemplate(
    xpp: XmlPullParser!,
    parent: SegmentBase.SegmentTemplate?,
    adaptationSetSupplementalProperties: (Mutable)List<Descriptor!>!,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long
)
(Mutable)List<SegmentBase.SegmentTimelineElement!>!
parseSegmentTimeline(
    xpp: XmlPullParser!,
    timescale: Long,
    periodDurationMs: Long
)
RangedUri!
Int
Int
ServiceDescriptionElement!
java-static String!
parseString(xpp: XmlPullParser!, name: String!, defaultValue: String!)
java-static String!
parseText(xpp: XmlPullParser!, label: String!)
Pair<Int!, Int!>?
parseTileCountFromProperties(
    essentialProperties: (Mutable)List<Descriptor!>!
)

Parses given descriptors for thumbnail tile information.

Int
UrlTemplate?
parseUrlTemplate(
    xpp: XmlPullParser!,
    name: String!,
    defaultValue: UrlTemplate?
)
UtcTimingElement!

Inherited functions

From org.xml.sax.helpers.DefaultHandler
Unit
characters(ch: CharArray!, start: Int, length: Int)
Unit
Unit
endElement(uri: String!, localName: String!, qName: String!)
Unit
Unit
Unit
Unit
ignorableWhitespace(ch: CharArray!, start: Int, length: Int)
Unit
notationDecl(name: String!, publicId: String!, systemId: String!)
Unit
processingInstruction(target: String!, data: String!)
InputSource!
resolveEntity(publicId: String!, systemId: String!)
Unit
Unit
Unit
Unit
startElement(
    uri: String!,
    localName: String!,
    qName: String!,
    attributes: Attributes!
)
Unit
startPrefixMapping(prefix: String!, uri: String!)
Unit
unparsedEntityDecl(
    name: String!,
    publicId: String!,
    systemId: String!,
    notationName: String!
)
Unit

Public constructors

DashManifestParser

DashManifestParser()

Public functions

maybeSkipTag

java-static fun maybeSkipTag(xpp: XmlPullParser!): Unit

If the provided XmlPullParser is currently positioned at the start of a tag, skips forward to the end of that tag.

Parameters
xpp: XmlPullParser!

The XmlPullParser.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the stream.

java.io.IOException

If an error occurs reading the stream.

parse

fun parse(uri: Uri!, inputStream: InputStream!): DashManifest!

Parses an object from a response.

Parameters
uri: Uri!

The source Uri of the response, after any redirection.

inputStream: InputStream!

An InputStream from which the response data can be read.

Returns
DashManifest!

The parsed object.

Throws
androidx.media3.common.ParserException

If an error occurs parsing the data.

java.io.IOException

If an error occurs reading data from the stream.

Protected functions

buildAdaptationSet

protected fun buildAdaptationSet(
    id: Long,
    @C.TrackType contentType: Int,
    representations: (Mutable)List<Representation!>!,
    accessibilityDescriptors: (Mutable)List<Descriptor!>!,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!
): AdaptationSet!

buildEvent

protected fun buildEvent(
    schemeIdUri: String!,
    value: String!,
    id: Long,
    durationMs: Long,
    messageData: ByteArray!
): EventMessage!

buildEventStream

protected fun buildEventStream(
    schemeIdUri: String!,
    value: String!,
    timescale: Long,
    presentationTimesUs: LongArray!,
    events: Array<EventMessage!>!
): EventStream!

buildFormat

protected fun buildFormat(
    id: String?,
    containerMimeType: String?,
    width: Int,
    height: Int,
    frameRate: Float,
    audioChannels: Int,
    audioSamplingRate: Int,
    bitrate: Int,
    language: String?,
    roleDescriptors: (Mutable)List<Descriptor!>!,
    accessibilityDescriptors: (Mutable)List<Descriptor!>!,
    codecs: String?,
    essentialProperties: (Mutable)List<Descriptor!>!,
    supplementalProperties: (Mutable)List<Descriptor!>!
): Format!

buildMediaPresentationDescription

protected fun buildMediaPresentationDescription(
    availabilityStartTime: Long,
    durationMs: Long,
    minBufferTimeMs: Long,
    dynamic: Boolean,
    minUpdateTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    suggestedPresentationDelayMs: Long,
    publishTimeMs: Long,
    programInformation: ProgramInformation?,
    utcTiming: UtcTimingElement?,
    serviceDescription: ServiceDescriptionElement?,
    location: Uri?,
    periods: (Mutable)List<Period!>!
): DashManifest!

buildPeriod

protected fun buildPeriod(
    id: String?,
    startMs: Long,
    adaptationSets: (Mutable)List<AdaptationSet!>!,
    eventStreams: (Mutable)List<EventStream!>!,
    assetIdentifier: Descriptor?
): Period!

buildRangedUri

protected fun buildRangedUri(urlText: String!, rangeStart: Long, rangeLength: Long): RangedUri!

buildRepresentation

protected fun buildRepresentation(
    representationInfo: DashManifestParser.RepresentationInfo!,
    label: String?,
    labels: (Mutable)List<Label!>!,
    extraDrmSchemeType: String?,
    extraDrmSchemeDatas: ArrayList<DrmInitData.SchemeData!>!,
    extraInbandEventStreams: ArrayList<Descriptor!>!
): Representation!

buildSegmentList

protected fun buildSegmentList(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    duration: Long,
    timeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>?,
    availabilityTimeOffsetUs: Long,
    segments: (Mutable)List<RangedUri!>?,
    timeShiftBufferDepthMs: Long,
    periodStartUnixTimeMs: Long
): SegmentBase.SegmentList!

buildSegmentTemplate

protected fun buildSegmentTemplate(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    startNumber: Long,
    endNumber: Long,
    duration: Long,
    timeline: (Mutable)List<SegmentBase.SegmentTimelineElement!>!,
    availabilityTimeOffsetUs: Long,
    initializationTemplate: UrlTemplate?,
    mediaTemplate: UrlTemplate?,
    timeShiftBufferDepthMs: Long,
    periodStartUnixTimeMs: Long
): SegmentBase.SegmentTemplate!

buildSegmentTimelineElement

protected fun buildSegmentTimelineElement(startTime: Long, duration: Long): SegmentBase.SegmentTimelineElement!

buildSingleSegmentBase

protected fun buildSingleSegmentBase(
    initialization: RangedUri!,
    timescale: Long,
    presentationTimeOffset: Long,
    indexStart: Long,
    indexLength: Long
): SegmentBase.SingleSegmentBase!

buildUtcTimingElement

protected fun buildUtcTimingElement(schemeIdUri: String!, value: String!): UtcTimingElement!

parseAdaptationSet

protected fun parseAdaptationSet(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    segmentBase: SegmentBase?,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    periodStartUnixTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
): AdaptationSet!

parseAdaptationSetChild

protected fun parseAdaptationSetChild(xpp: XmlPullParser!): Unit

Parses a child of an AdaptationSet element.

Called for child elements that are not specifically parsed elsewhere.

Parameters
xpp: XmlPullParser!

The XmlPullParser from which the child should be parsed.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the element.

java.io.IOException

If an error occurs reading the element.

parseAudioChannelConfiguration

protected fun parseAudioChannelConfiguration(xpp: XmlPullParser!): Int

parseAvailabilityTimeOffsetUs

protected fun parseAvailabilityTimeOffsetUs(
    xpp: XmlPullParser!,
    parentAvailabilityTimeOffsetUs: Long
): Long

Parses the availabilityTimeOffset value and returns the parsed value or the parent value if it doesn't exist.

Parameters
xpp: XmlPullParser!

The parser from which to read.

parentAvailabilityTimeOffsetUs: Long

The availability time offset of a parent element in microseconds.

Returns
Long

The parsed availabilityTimeOffset in microseconds.

parseBaseUrl

protected fun parseBaseUrl(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    dvbProfileDeclared: Boolean
): (Mutable)List<BaseUrl!>!

Parses a BaseURL element.

Parameters
xpp: XmlPullParser!

The parser from which to read.

parentBaseUrls: (Mutable)List<BaseUrl!>!

The parent base URLs for resolving the parsed URLs.

dvbProfileDeclared: Boolean

Whether the dvb profile is declared.

Returns
(Mutable)List<BaseUrl!>!

The list of parsed and resolved URLs.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the element.

java.io.IOException

If an error occurs reading the element.

parseCea608AccessibilityChannel

protected java-static fun parseCea608AccessibilityChannel(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
): Int

parseCea708AccessibilityChannel

protected java-static fun parseCea708AccessibilityChannel(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
): Int

parseContentProtection

protected fun parseContentProtection(xpp: XmlPullParser!): Pair<@NullableType String!, @NullableType DrmInitData.SchemeData!>!

Parses a ContentProtection element.

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Pair<@NullableType String!, @NullableType DrmInitData.SchemeData!>!

The scheme type and/or SchemeData parsed from the ContentProtection element. Either or both may be null, depending on the ContentProtection element being parsed.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the element.

java.io.IOException

If an error occurs reading the element.

parseContentType

@C.TrackType
protected fun parseContentType(xpp: XmlPullParser!): Int

parseDateTime

protected java-static fun parseDateTime(xpp: XmlPullParser!, name: String!, defaultValue: Long): Long

parseDescriptor

protected java-static fun parseDescriptor(xpp: XmlPullParser!, tag: String!): Descriptor!

Parses a Descriptor from an element.

Parameters
xpp: XmlPullParser!

The parser from which to read.

tag: String!

The tag of the element being parsed.

Returns
Descriptor!

The parsed Descriptor.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the element.

java.io.IOException

If an error occurs reading the element.

parseDolbyChannelConfiguration

protected java-static fun parseDolbyChannelConfiguration(xpp: XmlPullParser!): Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dolby.com,2014:dash:audio_channel_configuration:2011" as defined by table E.5 in ETSI TS 102 366, or by the legacy schemeIdUri "urn:dolby:dash:audio_channel_configuration:2011".

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Int

The parsed number of channels, or NO_VALUE if the channel count could not be parsed.

parseDtsChannelConfiguration

protected java-static fun parseDtsChannelConfiguration(xpp: XmlPullParser!): Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dts.com,2014:dash:audio_channel_configuration:2012" as defined by Annex G (3.2) in ETSI TS 102 114 V1.6.1, or by the legacy schemeIdUri "urn:dts:dash:audio_channel_configuration:2012".

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Int

The parsed number of channels, or NO_VALUE if the channel count could not be parsed.

parseDtsxChannelConfiguration

protected java-static fun parseDtsxChannelConfiguration(xpp: XmlPullParser!): Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "tag:dts.com,2018:uhd:audio_channel_configuration" as defined by table B-5 in ETSI TS 103 491 v1.2.1.

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Int

The parsed number of channels, or NO_VALUE if the channel count could not be parsed.

parseDuration

protected java-static fun parseDuration(xpp: XmlPullParser!, name: String!, defaultValue: Long): Long

parseEac3SupplementalProperties

protected java-static fun parseEac3SupplementalProperties(
    supplementalProperties: (Mutable)List<Descriptor!>!
): String!

parseEvent

protected fun parseEvent(
    xpp: XmlPullParser!,
    schemeIdUri: String!,
    value: String!,
    timescale: Long,
    presentationTimeOffset: Long,
    scratchOutputStream: ByteArrayOutputStream!
): Pair<Long!, EventMessage!>!

Parses a single Event node in the manifest.

Parameters
xpp: XmlPullParser!

The current xml parser.

schemeIdUri: String!

The schemeIdUri of the parent EventStream.

value: String!

The schemeIdUri of the parent EventStream.

timescale: Long

The timescale of the parent EventStream.

presentationTimeOffset: Long

The unscaled presentation time offset of the parent EventStream.

scratchOutputStream: ByteArrayOutputStream!

A ByteArrayOutputStream that is used when parsing event objects.

Returns
Pair<Long!, EventMessage!>!

A pair containing the node's presentation timestamp in microseconds and the parsed EventMessage.

Throws
org.xmlpull.v1.XmlPullParserException

If there is any error parsing this node.

java.io.IOException

If there is any error reading from the underlying input stream.

parseEventObject

protected fun parseEventObject(
    xpp: XmlPullParser!,
    scratchOutputStream: ByteArrayOutputStream!
): ByteArray<Byte>!

Parses an event object.

Parameters
xpp: XmlPullParser!

The current xml parser.

scratchOutputStream: ByteArrayOutputStream!

A ByteArrayOutputStream that's used when parsing the object.

Returns
ByteArray<Byte>!

The serialized byte array.

Throws
org.xmlpull.v1.XmlPullParserException

If there is any error parsing this node.

java.io.IOException

If there is any error reading from the underlying input stream.

parseEventStream

protected fun parseEventStream(xpp: XmlPullParser!): EventStream!

Parses a single EventStream node in the manifest.

Parameters
xpp: XmlPullParser!

The current xml parser.

Returns
EventStream!

The EventStream parsed from this EventStream node.

Throws
org.xmlpull.v1.XmlPullParserException

If there is any error parsing this node.

java.io.IOException

If there is any error reading from the underlying input stream.

parseFloat

protected java-static fun parseFloat(xpp: XmlPullParser!, name: String!, defaultValue: Float): Float

parseFrameRate

protected java-static fun parseFrameRate(xpp: XmlPullParser!, defaultValue: Float): Float

parseInitialization

protected fun parseInitialization(xpp: XmlPullParser!): RangedUri!

parseInt

protected java-static fun parseInt(xpp: XmlPullParser!, name: String!, defaultValue: Int): Int

parseLabel

protected fun parseLabel(xpp: XmlPullParser!): Label!

Parses a Label element.

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Label!

The parsed label.

Throws
org.xmlpull.v1.XmlPullParserException

If an error occurs parsing the element.

java.io.IOException

If an error occurs reading the element.

parseLastSegmentNumberSupplementalProperty

protected java-static fun parseLastSegmentNumberSupplementalProperty(
    supplementalProperties: (Mutable)List<Descriptor!>!
): Long

parseLong

protected java-static fun parseLong(xpp: XmlPullParser!, name: String!, defaultValue: Long): Long

parseMediaPresentationDescription

protected fun parseMediaPresentationDescription(
    xpp: XmlPullParser!,
    documentBaseUri: Uri!
): DashManifest!

parseMpegChannelConfiguration

protected java-static fun parseMpegChannelConfiguration(xpp: XmlPullParser!): Int

Parses the number of channels from the value attribute of an AudioChannelConfiguration with schemeIdUri "urn:mpeg:mpegB:cicp:ChannelConfiguration", as defined by ISO 23001-8 clause 8.1.

Parameters
xpp: XmlPullParser!

The parser from which to read.

Returns
Int

The parsed number of channels, or NO_VALUE if the channel count could not be parsed.

parsePeriod

protected fun parsePeriod(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    defaultStartMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    availabilityStartTimeMs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
): Pair<Period!, Long!>!

parseProfiles

protected fun parseProfiles(
    xpp: XmlPullParser!,
    attributeName: String!,
    defaultValue: Array<String!>!
): Array<String!>!

parseRangedUrl

protected fun parseRangedUrl(
    xpp: XmlPullParser!,
    urlAttribute: String!,
    rangeAttribute: String!
): RangedUri!

parseRepresentation

protected fun parseRepresentation(
    xpp: XmlPullParser!,
    parentBaseUrls: (Mutable)List<BaseUrl!>!,
    adaptationSetMimeType: String?,
    adaptationSetCodecs: String?,
    adaptationSetWidth: Int,
    adaptationSetHeight: Int,
    adaptationSetFrameRate: Float,
    adaptationSetAudioChannels: Int,
    adaptationSetAudioSamplingRate: Int,
    adaptationSetLanguage: String?,
    adaptationSetRoleDescriptors: (Mutable)List<Descriptor!>!,
    adaptationSetAccessibilityDescriptors: (Mutable)List<Descriptor!>!,
    adaptationSetEssentialProperties: (Mutable)List<Descriptor!>!,
    adaptationSetSupplementalProperties: (Mutable)List<Descriptor!>!,
    segmentBase: SegmentBase?,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long,
    dvbProfileDeclared: Boolean
): DashManifestParser.RepresentationInfo!

parseRoleFlagsFromAccessibilityDescriptors

@C.RoleFlags
protected fun parseRoleFlagsFromAccessibilityDescriptors(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
): Int

parseRoleFlagsFromDashRoleScheme

@C.RoleFlags
protected fun parseRoleFlagsFromDashRoleScheme(value: String?): Int

parseRoleFlagsFromProperties

@C.RoleFlags
protected fun parseRoleFlagsFromProperties(
    accessibilityDescriptors: (Mutable)List<Descriptor!>!
): Int

parseRoleFlagsFromRoleDescriptors

@C.RoleFlags
protected fun parseRoleFlagsFromRoleDescriptors(
    roleDescriptors: (Mutable)List<Descriptor!>!
): Int

parseSegmentList

protected fun parseSegmentList(
    xpp: XmlPullParser!,
    parent: SegmentBase.SegmentList?,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long
): SegmentBase.SegmentList!

parseSegmentTemplate

protected fun parseSegmentTemplate(
    xpp: XmlPullParser!,
    parent: SegmentBase.SegmentTemplate?,
    adaptationSetSupplementalProperties: (Mutable)List<Descriptor!>!,
    periodStartUnixTimeMs: Long,
    periodDurationMs: Long,
    baseUrlAvailabilityTimeOffsetUs: Long,
    segmentBaseAvailabilityTimeOffsetUs: Long,
    timeShiftBufferDepthMs: Long
): SegmentBase.SegmentTemplate!

parseSegmentTimeline

protected fun parseSegmentTimeline(
    xpp: XmlPullParser!,
    timescale: Long,
    periodDurationMs: Long
): (Mutable)List<SegmentBase.SegmentTimelineElement!>!

parseSegmentUrl

protected fun parseSegmentUrl(xpp: XmlPullParser!): RangedUri!

parseSelectionFlagsFromDashRoleScheme

@C.SelectionFlags
protected fun parseSelectionFlagsFromDashRoleScheme(value: String?): Int

parseSelectionFlagsFromRoleDescriptors

@C.SelectionFlags
protected fun parseSelectionFlagsFromRoleDescriptors(
    roleDescriptors: (Mutable)List<Descriptor!>!
): Int

parseString

protected java-static fun parseString(xpp: XmlPullParser!, name: String!, defaultValue: String!): String!

parseText

protected java-static fun parseText(xpp: XmlPullParser!, label: String!): String!

parseTileCountFromProperties

protected fun parseTileCountFromProperties(
    essentialProperties: (Mutable)List<Descriptor!>!
): Pair<Int!, Int!>?

Parses given descriptors for thumbnail tile information.

Parameters
essentialProperties: (Mutable)List<Descriptor!>!

List of descriptors that contain thumbnail tile information.

Returns
Pair<Int!, Int!>?

A pair of Integer values, where the first is the count of horizontal tiles and the second is the count of vertical tiles, or null if no thumbnail tile information is found.

parseTvaAudioPurposeCsValue

@C.RoleFlags
protected fun parseTvaAudioPurposeCsValue(value: String?): Int

parseUrlTemplate

protected fun parseUrlTemplate(
    xpp: XmlPullParser!,
    name: String!,
    defaultValue: UrlTemplate?
): UrlTemplate?

parseUtcTiming

protected fun parseUtcTiming(xpp: XmlPullParser!): UtcTimingElement!