Class ErrorStateDrmSession
- java.lang.Object
-
- com.google.android.exoplayer2.drm.ErrorStateDrmSession
-
- All Implemented Interfaces:
DrmSession
@Deprecated public final class ErrorStateDrmSession extends Object implements DrmSession
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.ADrmSession
that's in a terminal error state.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.drm.DrmSession
DrmSession.DrmSessionException, DrmSession.State
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.drm.DrmSession
STATE_ERROR, STATE_OPENED, STATE_OPENED_WITH_KEYS, STATE_OPENING, STATE_RELEASED
-
-
Constructor Summary
Constructors Constructor Description ErrorStateDrmSession(DrmSession.DrmSessionException error)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
acquire(DrmSessionEventListener.EventDispatcher eventDispatcher)
Deprecated.Increments the reference count.CryptoConfig
getCryptoConfig()
Deprecated.Returns aCryptoConfig
for the open session, or null if called before the session has been opened or after it's been released.DrmSession.DrmSessionException
getError()
Deprecated.Returns the cause of the error state, or null ifDrmSession.getState()
is notDrmSession.STATE_ERROR
.byte[]
getOfflineLicenseKeySetId()
Deprecated.Returns the key set id of the offline license loaded into this session, or null if there isn't one.UUID
getSchemeUuid()
Deprecated.Returns the DRM scheme UUID for this session.int
getState()
Deprecated.Returns the current state of the session, which is one ofDrmSession.STATE_ERROR
,DrmSession.STATE_RELEASED
,DrmSession.STATE_OPENING
,DrmSession.STATE_OPENED
andDrmSession.STATE_OPENED_WITH_KEYS
.boolean
playClearSamplesWithoutKeys()
Deprecated.Returns whether this session allows playback of clear samples prior to keys being loaded.Map<String,String>
queryKeyStatus()
Deprecated.Returns a map describing the key status for the session, or null if called before the session has been opened or after it's been released.void
release(DrmSessionEventListener.EventDispatcher eventDispatcher)
Deprecated.Decrements the reference count.boolean
requiresSecureDecoder(String mimeType)
Deprecated.Returns whether this session requires use of a secure decoder for the given MIME type.
-
-
-
Constructor Detail
-
ErrorStateDrmSession
public ErrorStateDrmSession(DrmSession.DrmSessionException error)
Deprecated.
-
-
Method Detail
-
getState
public int getState()
Deprecated.Description copied from interface:DrmSession
Returns the current state of the session, which is one ofDrmSession.STATE_ERROR
,DrmSession.STATE_RELEASED
,DrmSession.STATE_OPENING
,DrmSession.STATE_OPENED
andDrmSession.STATE_OPENED_WITH_KEYS
.- Specified by:
getState
in interfaceDrmSession
-
playClearSamplesWithoutKeys
public boolean playClearSamplesWithoutKeys()
Deprecated.Description copied from interface:DrmSession
Returns whether this session allows playback of clear samples prior to keys being loaded.- Specified by:
playClearSamplesWithoutKeys
in interfaceDrmSession
-
getError
@Nullable public DrmSession.DrmSessionException getError()
Deprecated.Description copied from interface:DrmSession
Returns the cause of the error state, or null ifDrmSession.getState()
is notDrmSession.STATE_ERROR
.- Specified by:
getError
in interfaceDrmSession
-
getSchemeUuid
public final UUID getSchemeUuid()
Deprecated.Description copied from interface:DrmSession
Returns the DRM scheme UUID for this session.- Specified by:
getSchemeUuid
in interfaceDrmSession
-
getCryptoConfig
@Nullable public CryptoConfig getCryptoConfig()
Deprecated.Description copied from interface:DrmSession
Returns aCryptoConfig
for the open session, or null if called before the session has been opened or after it's been released.- Specified by:
getCryptoConfig
in interfaceDrmSession
-
queryKeyStatus
@Nullable public Map<String,String> queryKeyStatus()
Deprecated.Description copied from interface:DrmSession
Returns a map describing the key status for the session, or null if called before the session has been opened or after it's been released.Since DRM license policies vary by vendor, the specific status field names are determined by each DRM vendor. Refer to your DRM provider documentation for definitions of the field names for a particular DRM engine plugin.
- Specified by:
queryKeyStatus
in interfaceDrmSession
- Returns:
- A map describing the key status for the session, or null if called before the session has been opened or after it's been released.
- See Also:
MediaDrm.queryKeyStatus(byte[])
-
getOfflineLicenseKeySetId
@Nullable public byte[] getOfflineLicenseKeySetId()
Deprecated.Description copied from interface:DrmSession
Returns the key set id of the offline license loaded into this session, or null if there isn't one.- Specified by:
getOfflineLicenseKeySetId
in interfaceDrmSession
-
requiresSecureDecoder
public boolean requiresSecureDecoder(String mimeType)
Deprecated.Description copied from interface:DrmSession
Returns whether this session requires use of a secure decoder for the given MIME type. Assumes a license policy that requires the highest level of security supported by the session.The session must be in
state
DrmSession.STATE_OPENED
orDrmSession.STATE_OPENED_WITH_KEYS
.- Specified by:
requiresSecureDecoder
in interfaceDrmSession
-
acquire
public void acquire(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher)
Deprecated.Description copied from interface:DrmSession
Increments the reference count. When the caller no longer needs to use the instance, it must callDrmSession.release(DrmSessionEventListener.EventDispatcher)
to decrement the reference count.- Specified by:
acquire
in interfaceDrmSession
- Parameters:
eventDispatcher
- TheDrmSessionEventListener.EventDispatcher
used to route DRM-related events dispatched from this session, or null if no event handling is needed.
-
release
public void release(@Nullable DrmSessionEventListener.EventDispatcher eventDispatcher)
Deprecated.Description copied from interface:DrmSession
Decrements the reference count. If the reference count drops to 0 underlying resources are released, and the instance cannot be re-used.- Specified by:
release
in interfaceDrmSession
- Parameters:
eventDispatcher
- TheDrmSessionEventListener.EventDispatcher
to disconnect when the session is released (the same instance (possibly null) that was passed by the caller toDrmSession.acquire(DrmSessionEventListener.EventDispatcher)
).
-
-