Add prepare and release to DrmSessionManager

The added methods will manage ExoMediaDrms instances.

Issue:#4721
PiperOrigin-RevId: 270335916
This commit is contained in:
aquilescanta 2019-09-20 21:17:53 +01:00 committed by Oliver Woodman
parent 1feb03db2d
commit 7fc9c848c6

View File

@ -78,6 +78,21 @@ public interface DrmSessionManager<T extends ExoMediaCrypto> {
*/ */
int FLAG_PLAY_CLEAR_SAMPLES_WITHOUT_KEYS = 1; int FLAG_PLAY_CLEAR_SAMPLES_WITHOUT_KEYS = 1;
/**
* Acquires any required resources.
*
* <p>{@link #release()} must be called to ensure the acquired resources are released. After
* releasing, an instance may be re-prepared.
*/
default void prepare() {
// Do nothing.
}
/** Releases any acquired resources. */
default void release() {
// Do nothing.
}
/** /**
* Returns whether the manager is capable of acquiring a session for the given * Returns whether the manager is capable of acquiring a session for the given
* {@link DrmInitData}. * {@link DrmInitData}.