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
3bb08e58
authored
Feb 23, 2017
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Cleanup of CENC support
parent
7e02e58e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
22 deletions
library/src/main/java/com/google/android/exoplayer2/C.java
library/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
library/src/main/java/com/google/android/exoplayer2/C.java
View file @
3bb08e58
...
@@ -444,14 +444,15 @@ public final class C {
...
@@ -444,14 +444,15 @@ public final class C {
public
static
final
UUID
UUID_NIL
=
new
UUID
(
0L
,
0L
);
public
static
final
UUID
UUID_NIL
=
new
UUID
(
0L
,
0L
);
/**
/**
* UUID for the PSSH box and MPEG-DASH Content Protection.
* UUID for the
* <a href="https://w3c.github.io/encrypted-media/format-registry/initdata/cenc.html">W3C</a>.
* <a href="https://w3c.github.io/encrypted-media/format-registry/initdata/cenc.html">CENC DRM
* scheme</a>.
*/
*/
public
static
final
UUID
CENC_UUID
=
new
UUID
(
0x1077EFECC0B24D02
L
,
0xACE33C1E52E2FB4B
L
);
public
static
final
UUID
CENC_UUID
=
new
UUID
(
0x1077EFECC0B24D02
L
,
0xACE33C1E52E2FB4B
L
);
/**
/**
* UUID for the Widevine DRM scheme.
* UUID for the Widevine DRM scheme.
* <p>
</p>
* <p>
* Widevine is supported on Android devices running Android 4.3 (API Level 18) and up.
* Widevine is supported on Android devices running Android 4.3 (API Level 18) and up.
*/
*/
public
static
final
UUID
WIDEVINE_UUID
=
new
UUID
(
0xEDEF8BA979D64ACE
L
,
0xA3C827DCD51D21ED
L
);
public
static
final
UUID
WIDEVINE_UUID
=
new
UUID
(
0xEDEF8BA979D64ACE
L
,
0xA3C827DCD51D21ED
L
);
...
...
library/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
View file @
3bb08e58
...
@@ -103,12 +103,8 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
...
@@ -103,12 +103,8 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
/** Releases an existing offline license. */
/** Releases an existing offline license. */
public
static
final
int
MODE_RELEASE
=
3
;
public
static
final
int
MODE_RELEASE
=
3
;
/**
* The format to use when ClearKey encryption.
*/
private
static
final
String
CENC_INIT_DATA_FORMAT
=
"cenc"
;
private
static
final
String
TAG
=
"OfflineDrmSessionMngr"
;
private
static
final
String
TAG
=
"OfflineDrmSessionMngr"
;
private
static
final
String
CENC_SCHEME_MIME_TYPE
=
"cenc"
;
private
static
final
int
MSG_PROVISION
=
0
;
private
static
final
int
MSG_PROVISION
=
0
;
private
static
final
int
MSG_KEYS
=
1
;
private
static
final
int
MSG_KEYS
=
1
;
...
@@ -345,20 +341,11 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
...
@@ -345,20 +341,11 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto> implements DrmSe
schemeInitData
=
psshData
;
schemeInitData
=
psshData
;
}
}
}
}
if
(
C
.
CENC_UUID
.
equals
(
uuid
))
{
if
(
Util
.
SDK_INT
<
26
&&
C
.
CENC_UUID
.
equals
(
uuid
)
// If "video/mp4" and "audio/mp4" are not supported as CENC schema, change it to "cenc".
&&
(
MimeTypes
.
VIDEO_MP4
.
equals
(
schemeMimeType
)
// Before 7.1.x in API 25, "video/mp4" and "audio/mp4" are not supported.
||
MimeTypes
.
AUDIO_MP4
.
equals
(
schemeMimeType
)))
{
if
(
MimeTypes
.
VIDEO_MP4
.
equals
(
schemeMimeType
)
||
MimeTypes
.
AUDIO_MP4
.
equals
(
// Prior to API level 26 the CDM only accepted "cenc" as the scheme mime type.
schemeMimeType
))
{
schemeMimeType
=
CENC_SCHEME_MIME_TYPE
;
if
(
Util
.
SDK_INT
>=
26
)
{
// Nothing to do.
}
else
if
(
Util
.
SDK_INT
==
25
&&
!
MediaDrm
.
isCryptoSchemeSupported
(
uuid
,
schemeMimeType
))
{
schemeMimeType
=
CENC_INIT_DATA_FORMAT
;
}
else
if
(
Util
.
SDK_INT
<=
24
)
{
schemeMimeType
=
CENC_INIT_DATA_FORMAT
;
}
}
}
}
}
}
state
=
STATE_OPENING
;
state
=
STATE_OPENING
;
...
...
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