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
55637565
authored
Apr 23, 2022
by
Cedric Tio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Issue #10159 : DASH DTS Digital Surround Passthrough Fails in recent Exoplayer Versions
parent
8e57d371
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 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 @
55637565
...
@@ -1463,6 +1463,13 @@ public class DashManifestParser extends DefaultHandler
...
@@ -1463,6 +1463,13 @@ public class DashManifestParser extends DefaultHandler
case
"urn:mpeg:mpegB:cicp:ChannelConfiguration"
:
case
"urn:mpeg:mpegB:cicp:ChannelConfiguration"
:
audioChannels
=
parseMpegChannelConfiguration
(
xpp
);
audioChannels
=
parseMpegChannelConfiguration
(
xpp
);
break
;
break
;
case
"urn:dts:dash:audio_channel_configuration:2012"
:
case
"tag:dts.com,2014: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
"tag:dolby.com,2014:dash:audio_channel_configuration:2011"
:
case
"urn:dolby:dash:audio_channel_configuration:2011"
:
case
"urn:dolby:dash:audio_channel_configuration:2011"
:
audioChannels
=
parseDolbyChannelConfiguration
(
xpp
);
audioChannels
=
parseDolbyChannelConfiguration
(
xpp
);
...
@@ -1882,6 +1889,58 @@ public class DashManifestParser extends DefaultHandler
...
@@ -1882,6 +1889,58 @@ public class DashManifestParser extends DefaultHandler
/**
/**
* Parses the number of channels from the value attribute of an AudioElementConfiguration with
* Parses the number of channels from the value attribute of an AudioElementConfiguration with
* schemeIdUri as defined by Annex G (3.2) in ETSI TS 102 114 V1.6.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
parseDtsChannelConfiguration
(
XmlPullParser
xpp
)
{
@Nullable
String
value
=
xpp
.
getAttributeValue
(
null
,
"value"
);
if
(
value
==
null
)
{
return
Format
.
NO_VALUE
;
}
else
{
int
channelCount
=
Integer
.
decode
(
value
);
if
((
channelCount
>
0
)
&&
(
channelCount
<
33
))
{
return
channelCount
;
}
else
{
return
Format
.
NO_VALUE
;
}
}
}
/**
* Parses the number of channels from the value attribute of an AudioElementConfiguration with
* schemeIdUri 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
channelMask
=
Integer
.
parseInt
(
value
,
16
);
if
(
channelMask
==
0
)
{
return
Format
.
NO_VALUE
;
}
else
{
// Determines Channel Count by summing the number of bits
// set in the channelMask.
int
channelCount
;
// c accumulates the total bits set in v
for
(
channelCount
=
0
;
channelMask
>
0
;
channelMask
>>=
1
)
{
channelCount
+=
channelMask
&
1
;
}
return
channelCount
;
}
}
/**
* 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
* 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
* in ETSI TS 102 366, or the legacy schemeIdUri
* "urn:dolby:dash:audio_channel_configuration:2011".
* "urn:dolby:dash:audio_channel_configuration:2011".
...
...
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