com.google.android.exoplayer2.drm.DefaultDrmSessionManager.Mode Java Examples
The following examples show how to use
com.google.android.exoplayer2.drm.DefaultDrmSessionManager.Mode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OfflineLicenseHelper.java From MediaSDK with Apache License 2.0 | 5 votes |
private byte[] blockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { drmSessionManager.prepare(); DrmSession<T> drmSession = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = drmSession.getError(); byte[] keySetId = drmSession.getOfflineLicenseKeySetId(); drmSession.release(); drmSessionManager.release(); if (error != null) { throw error; } return Assertions.checkNotNull(keySetId); }
Example #2
Source File: OfflineLicenseHelper.java From MediaSDK with Apache License 2.0 | 5 votes |
private DrmSession<T> openBlockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> drmSession = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return drmSession; }
Example #3
Source File: OfflineLicenseHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private byte[] blockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { DrmSession<T> drmSession = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = drmSession.getError(); byte[] keySetId = drmSession.getOfflineLicenseKeySetId(); drmSessionManager.releaseSession(drmSession); if (error != null) { throw error; } return keySetId; }
Example #4
Source File: OfflineLicenseHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private DrmSession<T> openBlockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> drmSession = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return drmSession; }
Example #5
Source File: OfflineLicenseHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private byte[] blockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { DrmSession<T> drmSession = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = drmSession.getError(); byte[] keySetId = drmSession.getOfflineLicenseKeySetId(); drmSessionManager.releaseSession(drmSession); if (error != null) { throw error; } return keySetId; }
Example #6
Source File: OfflineLicenseHelper.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private DrmSession<T> openBlockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> drmSession = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return drmSession; }
Example #7
Source File: OfflineLicenseHelper.java From K-Sonic with MIT License | 5 votes |
private void blockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { DrmSession<T> session = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = session.getError(); if (error != null) { throw error; } drmSessionManager.releaseSession(session); }
Example #8
Source File: OfflineLicenseHelper.java From K-Sonic with MIT License | 5 votes |
private DrmSession<T> openBlockingKeyRequest(@Mode int licenseMode, byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> session = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return session; }
Example #9
Source File: OfflineLicenseHelper.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private byte[] blockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { DrmSession<T> drmSession = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = drmSession.getError(); byte[] keySetId = drmSession.getOfflineLicenseKeySetId(); drmSessionManager.releaseSession(drmSession); if (error != null) { throw error; } return Assertions.checkNotNull(keySetId); }
Example #10
Source File: OfflineLicenseHelper.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private DrmSession<T> openBlockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> drmSession = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return drmSession; }
Example #11
Source File: OfflineLicenseHelper.java From Telegram with GNU General Public License v2.0 | 5 votes |
private byte[] blockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) throws DrmSessionException { DrmSession<T> drmSession = openBlockingKeyRequest(licenseMode, offlineLicenseKeySetId, drmInitData); DrmSessionException error = drmSession.getError(); byte[] keySetId = drmSession.getOfflineLicenseKeySetId(); drmSessionManager.releaseSession(drmSession); if (error != null) { throw error; } return Assertions.checkNotNull(keySetId); }
Example #12
Source File: OfflineLicenseHelper.java From Telegram with GNU General Public License v2.0 | 5 votes |
private DrmSession<T> openBlockingKeyRequest( @Mode int licenseMode, @Nullable byte[] offlineLicenseKeySetId, DrmInitData drmInitData) { drmSessionManager.setMode(licenseMode, offlineLicenseKeySetId); conditionVariable.close(); DrmSession<T> drmSession = drmSessionManager.acquireSession(handlerThread.getLooper(), drmInitData); // Block current thread until key loading is finished conditionVariable.block(); return drmSession; }