mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add acquirePlaceholderSession to DrmSessionManager
Issue:#4867 PiperOrigin-RevId: 268472704
This commit is contained in:
parent
890700fa0f
commit
0cc1e5143b
1 changed files with 17 additions and 0 deletions
|
|
@ -88,6 +88,23 @@ public interface DrmSessionManager<T extends ExoMediaCrypto> {
|
||||||
*/
|
*/
|
||||||
boolean canAcquireSession(DrmInitData drmInitData);
|
boolean canAcquireSession(DrmInitData drmInitData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a {@link DrmSession} with an acquired reference that does not execute key requests.
|
||||||
|
* Returns null if placeholder sessions are not supported by this DRM session manager.
|
||||||
|
*
|
||||||
|
* <p>Placeholder {@link DrmSession DrmSessions} may be used to configure secure decoders for
|
||||||
|
* playback of clear samples, which reduces the costs of transitioning between clear and encrypted
|
||||||
|
* content periods.
|
||||||
|
*
|
||||||
|
* @param playbackLooper The looper associated with the media playback thread.
|
||||||
|
* @return The placeholder DRM session, or null if this DRM session manager does not support
|
||||||
|
* placeholder sessions.
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
default DrmSession<T> acquirePlaceholderSession(Looper playbackLooper) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link DrmSession} with an acquired reference for the specified {@link DrmInitData}.
|
* Returns a {@link DrmSession} with an acquired reference for the specified {@link DrmInitData}.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue