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
18e1c3eb
authored
Oct 30, 2019
by
aquilescanta
Committed by
Oliver Woodman
Nov 05, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Rename the option allowPlaceholderSessions to preferSecureDecoders
PiperOrigin-RevId: 277477784
parent
aeefb79a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java
View file @
18e1c3eb
...
...
@@ -59,7 +59,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
private
UUID
uuid
;
private
ExoMediaDrm
.
Provider
<
ExoMediaCrypto
>
exoMediaDrmProvider
;
private
boolean
multiSession
;
private
boolean
allowPlaceholderSession
s
;
private
boolean
preferSecureDecoder
s
;
@Flags
private
int
flags
;
private
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
...
...
@@ -72,7 +72,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
* <li>{@link #setUuidAndExoMediaDrmProvider ExoMediaDrm.Provider}: {@link
* FrameworkMediaDrm#DEFAULT_PROVIDER}.
* <li>{@link #setMultiSession multiSession}: Not allowed by default.
* <li>{@link #set
AllowPlaceholderSessions allowPlaceholderSession
}: Not allowed by default.
* <li>{@link #set
PreferSecureDecoders preferSecureDecoders
}: Not allowed by default.
* <li>{@link #setPlayClearSamplesWithoutKeys playClearSamplesWithoutKeys}: Not allowed by
* default.
* <li>{@link #setLoadErrorHandlingPolicy LoadErrorHandlingPolicy}: {@link
...
...
@@ -85,7 +85,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
uuid
=
C
.
WIDEVINE_UUID
;
exoMediaDrmProvider
=
(
ExoMediaDrm
.
Provider
)
FrameworkMediaDrm
.
DEFAULT_PROVIDER
;
multiSession
=
false
;
allowPlaceholderSession
s
=
false
;
preferSecureDecoder
s
=
false
;
flags
=
0
;
loadErrorHandlingPolicy
=
new
DefaultLoadErrorHandlingPolicy
();
}
...
...
@@ -133,16 +133,14 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
}
/**
* Sets whether this session manager
is allowed to acquire placeholder sessions
.
* Sets whether this session manager
should hint the use of secure decoders for clear content
.
*
* <p>Placeholder sessions allow the use of secure renderers to play clear content.
*
* @param allowPlaceholderSessions Whether this session manager is allowed to acquire
* placeholder sessions.
* @param preferSecureDecoders Whether this session manager should hint the use of secure
* decoders for clear content.
* @return This builder.
*/
public
Builder
set
AllowPlaceholderSessions
(
boolean
allowPlaceholderSession
s
)
{
this
.
allowPlaceholderSessions
=
allowPlaceholderSession
s
;
public
Builder
set
PreferSecureDecoders
(
boolean
preferSecureDecoder
s
)
{
this
.
preferSecureDecoders
=
preferSecureDecoder
s
;
return
this
;
}
...
...
@@ -184,7 +182,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
mediaDrmCallback
,
keyRequestParameters
,
multiSession
,
allowPlaceholderSession
s
,
preferSecureDecoder
s
,
flags
,
loadErrorHandlingPolicy
);
}
...
...
@@ -236,7 +234,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
@Nullable
private
final
HashMap
<
String
,
String
>
optionalKeyRequestParameters
;
private
final
EventDispatcher
<
DefaultDrmSessionEventListener
>
eventDispatcher
;
private
final
boolean
multiSession
;
private
final
boolean
allowPlaceholderSession
s
;
private
final
boolean
preferSecureDecoder
s
;
@Flags
private
final
int
flags
;
private
final
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
;
...
...
@@ -328,7 +326,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
callback
,
optionalKeyRequestParameters
,
multiSession
,
/*
allowPlaceholderSession
s= */
false
,
/*
preferSecureDecoder
s= */
false
,
/* flags= */
0
,
new
DefaultLoadErrorHandlingPolicy
(
initialDrmRequestRetryCount
));
}
...
...
@@ -339,7 +337,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
MediaDrmCallback
callback
,
@Nullable
HashMap
<
String
,
String
>
optionalKeyRequestParameters
,
boolean
multiSession
,
boolean
allowPlaceholderSession
s
,
boolean
preferSecureDecoder
s
,
@Flags
int
flags
,
LoadErrorHandlingPolicy
loadErrorHandlingPolicy
)
{
Assertions
.
checkNotNull
(
uuid
);
...
...
@@ -350,7 +348,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
this
.
optionalKeyRequestParameters
=
optionalKeyRequestParameters
;
this
.
eventDispatcher
=
new
EventDispatcher
<>();
this
.
multiSession
=
multiSession
;
this
.
allowPlaceholderSessions
=
allowPlaceholderSession
s
;
this
.
preferSecureDecoders
=
preferSecureDecoder
s
;
this
.
flags
=
flags
;
this
.
loadErrorHandlingPolicy
=
loadErrorHandlingPolicy
;
mode
=
MODE_PLAYBACK
;
...
...
@@ -470,7 +468,7 @@ public class DefaultDrmSessionManager<T extends ExoMediaCrypto>
FrameworkMediaCrypto
.
class
.
equals
(
exoMediaDrm
.
getExoMediaCryptoType
())
&&
FrameworkMediaCrypto
.
WORKAROUND_DEVICE_NEEDS_KEYS_TO_CONFIGURE_CODEC
;
if
(
avoidPlaceholderDrmSessions
||
!
allowPlaceholderSession
s
||
!
preferSecureDecoder
s
||
exoMediaDrm
.
getExoMediaCryptoType
()
==
null
)
{
return
null
;
}
...
...
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