Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c25a3af0
authored
Apr 26, 2022
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #10214 from cedricxperi:dev-v2
PiperOrigin-RevId: 444585404
parents
1eadde52
55637565
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
5 deletions
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
View file @
c25a3af0
...
...
@@ -75,7 +75,7 @@ public class DashManifestParser extends DefaultHandler
Pattern
.
compile
(
"([1-9]|[1-5][0-9]|6[0-3])=.*"
);
/**
* Maps the value attribute of an Audio
Element
Configuration with schemeIdUri
* Maps the value attribute of an Audio
Channel
Configuration with schemeIdUri
* "urn:mpeg:mpegB:cicp:ChannelConfiguration", as defined by ISO 23001-8 clause 8.1, to a channel
* count.
*/
...
...
@@ -1463,6 +1463,13 @@ public class DashManifestParser extends DefaultHandler
case
"urn:mpeg:mpegB:cicp:ChannelConfiguration"
:
audioChannels
=
parseMpegChannelConfiguration
(
xpp
);
break
;
case
"tag:dts.com,2014:dash:audio_channel_configuration:2012"
:
case
"urn:dts:dash:audio_channel_configuration:2012"
:
audioChannels
=
parseDtsChannelConfiguration
(
xpp
);
break
;
case
"tag:dts.com,2018:uhd:audio_channel_configuration"
:
audioChannels
=
parseDtsxChannelConfiguration
(
xpp
);
break
;
case
"tag:dolby.com,2014:dash:audio_channel_configuration:2011"
:
case
"urn:dolby:dash:audio_channel_configuration:2011"
:
audioChannels
=
parseDolbyChannelConfiguration
(
xpp
);
...
...
@@ -1866,7 +1873,7 @@ public class DashManifestParser extends DefaultHandler
}
/**
* Parses the number of channels from the value attribute of an Audio
Element
Configuration with
* Parses the number of channels from the value attribute of an Audio
Channel
Configuration with
* schemeIdUri "urn:mpeg:mpegB:cicp:ChannelConfiguration", as defined by ISO 23001-8 clause 8.1.
*
* @param xpp The parser from which to read.
...
...
@@ -1881,9 +1888,42 @@ public class DashManifestParser extends DefaultHandler
}
/**
* Parses the number of channels from the value attribute of an AudioElementConfiguration with
* schemeIdUri "tag:dolby.com,2014:dash:audio_channel_configuration:2011", as defined by table E.5
* in ETSI TS 102 366, or the legacy schemeIdUri
* 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".
*
* @param xpp The parser from which to read.
* @return The parsed number of channels, or {@link Format#NO_VALUE} if the channel count could
* not be parsed.
*/
protected
static
int
parseDtsChannelConfiguration
(
XmlPullParser
xpp
)
{
int
channelCount
=
parseInt
(
xpp
,
"value"
,
Format
.
NO_VALUE
);
return
0
<
channelCount
&&
channelCount
<
33
?
channelCount
:
Format
.
NO_VALUE
;
}
/**
* 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.
*
* @param xpp The parser from which to read.
* @return The parsed number of channels, or {@link Format#NO_VALUE} if the channel count could
* not be parsed.
*/
protected
static
int
parseDtsxChannelConfiguration
(
XmlPullParser
xpp
)
{
@Nullable
String
value
=
xpp
.
getAttributeValue
(
null
,
"value"
);
if
(
value
==
null
)
{
return
Format
.
NO_VALUE
;
}
int
channelCount
=
Integer
.
bitCount
(
Integer
.
parseInt
(
value
,
/* radix= */
16
));
return
channelCount
==
0
?
Format
.
NO_VALUE
:
channelCount
;
}
/**
* 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".
*
* @param xpp The parser from which to read.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment