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
cfd13ce6
authored
May 14, 2022
by
sr1990
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
[DASH][ClearKey] Parse ClearKey license URL in MPD.
parent
6ac1306e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
library/common/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
library/common/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java
View file @
cfd13ce6
...
...
@@ -263,7 +263,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
*/
public
final
UUID
uuid
;
/** The URL of the server to which license requests should be made. May be null if unknown. */
@Nullable
public
final
String
licenseServerUrl
;
@Nullable
public
String
licenseServerUrl
;
/** The mimeType of {@link #data}. */
public
final
String
mimeType
;
/** The initialization data. May be null for scheme support checks only. */
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java
View file @
cfd13ce6
...
...
@@ -429,6 +429,15 @@ public class DashManifestParser extends DefaultHandler
drmSchemeType
=
contentProtection
.
first
;
}
if
(
contentProtection
.
second
!=
null
)
{
// In case of clear key, update the licence server url of
// previously parsed common encryption drmSchemeData.
if
(
drmSchemeType
!=
null
&&
drmSchemeType
==
"clearkey"
)
{
for
(
int
i
=
0
;
i
<
drmSchemeDatas
.
size
();
i
++)
{
if
(
drmSchemeDatas
.
get
(
i
).
uuid
==
C
.
COMMON_PSSH_UUID
&&
drmSchemeDatas
.
get
(
i
).
licenseServerUrl
==
null
)
drmSchemeDatas
.
get
(
i
).
licenseServerUrl
=
contentProtection
.
second
.
licenseServerUrl
;
}
}
drmSchemeDatas
.
add
(
contentProtection
.
second
);
}
}
else
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"ContentComponent"
))
{
...
...
@@ -597,6 +606,10 @@ public class DashManifestParser extends DefaultHandler
case
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
:
uuid
=
C
.
WIDEVINE_UUID
;
break
;
case
"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"
:
uuid
=
C
.
CLEARKEY_UUID
;
schemeType
=
"clearkey"
;
break
;
default
:
break
;
}
...
...
@@ -604,7 +617,10 @@ public class DashManifestParser extends DefaultHandler
do
{
xpp
.
next
();
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"ms:laurl"
))
{
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"clearkey:Laurl"
)
&&
xpp
.
next
()
==
XmlPullParser
.
TEXT
)
{
licenseServerUrl
=
xpp
.
getText
();
}
else
if
(
XmlPullParserUtil
.
isStartTag
(
xpp
,
"ms:laurl"
))
{
licenseServerUrl
=
xpp
.
getAttributeValue
(
null
,
"licenseUrl"
);
}
else
if
(
data
==
null
&&
XmlPullParserUtil
.
isStartTagIgnorePrefix
(
xpp
,
"pssh"
)
...
...
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