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
3fcae684
authored
Jun 13, 2019
by
aquilescanta
Committed by
Toni
Jun 14, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add flags to DrmSessionManager
PiperOrigin-RevId: 253006112
parent
cc337a3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionManager.java
library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionManager.java
View file @
3fcae684
...
...
@@ -16,13 +16,37 @@
package
com
.
google
.
android
.
exoplayer2
.
drm
;
import
android.os.Looper
;
import
androidx.annotation.IntDef
;
import
com.google.android.exoplayer2.drm.DrmInitData.SchemeData
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
/**
* Manages a DRM session.
*/
public
interface
DrmSessionManager
<
T
extends
ExoMediaCrypto
>
{
/** Flags that control the handling of DRM protected content. */
@Documented
@Retention
(
RetentionPolicy
.
SOURCE
)
@IntDef
(
flag
=
true
,
value
=
{
FLAG_PLAY_CLEAR_SAMPLES_WITHOUT_KEYS
})
@interface
Flags
{}
/**
* When this flag is set, clear samples of an encrypted region may be rendered when no keys are
* available.
*
* <p>Encrypted media may contain clear (un-encrypted) regions. For example a media file may start
* with a short clear region so as to allow playback to begin in parallel with key acquisition.
* When this flag is set, consumers of sample data are permitted to access the clear regions of
* encrypted media files when the associated {@link DrmSession} has not yet obtained the keys
* necessary for the encrypted regions of the media.
*/
int
FLAG_PLAY_CLEAR_SAMPLES_WITHOUT_KEYS
=
1
;
/**
* Returns whether the manager is capable of acquiring a session for the given
* {@link DrmInitData}.
...
...
@@ -45,4 +69,10 @@ public interface DrmSessionManager<T extends ExoMediaCrypto> {
* @return The DRM session.
*/
DrmSession
<
T
>
acquireSession
(
Looper
playbackLooper
,
DrmInitData
drmInitData
);
/** Returns flags that control the handling of DRM protected content. */
@Flags
default
int
getFlags
()
{
return
0
;
}
}
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