com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest Java Examples
The following examples show how to use
com.google.android.exoplayer2.drm.ExoMediaDrm.ProvisionRequest.
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: DefaultDrmSession.java From Telegram with GNU General Public License v2.0 | 6 votes |
@Override @SuppressWarnings("unchecked") public void handleMessage(Message msg) { Object request = msg.obj; Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) request); break; case MSG_KEYS: response = callback.executeKeyRequest(uuid, (KeyRequest) request); break; default: throw new RuntimeException(); } } catch (Exception e) { if (maybeRetryRequest(msg)) { return; } response = e; } postResponseHandler.obtainMessage(msg.what, Pair.create(request, response)).sendToTarget(); }
Example #2
Source File: DefaultDrmSession.java From MediaSDK with Apache License 2.0 | 6 votes |
@Override public void handleMessage(Message msg) { RequestTask requestTask = (RequestTask) msg.obj; Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) requestTask.request); break; case MSG_KEYS: response = callback.executeKeyRequest(uuid, (KeyRequest) requestTask.request); break; default: throw new RuntimeException(); } } catch (Exception e) { if (maybeRetryRequest(msg, e)) { return; } response = e; } responseHandler .obtainMessage(msg.what, Pair.create(requestTask.request, response)) .sendToTarget(); }
Example #3
Source File: DefaultDrmSession.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
@Override @SuppressWarnings("unchecked") public void handleMessage(Message msg) { Object request = msg.obj; Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) request); break; case MSG_KEYS: response = callback.executeKeyRequest(uuid, (KeyRequest) request); break; default: throw new RuntimeException(); } } catch (Exception e) { if (maybeRetryRequest(msg)) { return; } response = e; } postResponseHandler.obtainMessage(msg.what, Pair.create(request, response)).sendToTarget(); }
Example #4
Source File: DefaultDrmSessionManager.java From K-Sonic with MIT License | 6 votes |
@Override public void handleMessage(Message msg) { Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) msg.obj); break; case MSG_KEYS: response = callback.executeKeyRequest(uuid, (KeyRequest) msg.obj); break; default: throw new RuntimeException(); } } catch (Exception e) { response = e; } postResponseHandler.obtainMessage(msg.what, response).sendToTarget(); }
Example #5
Source File: DefaultDrmSession.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override @SuppressWarnings("unchecked") public void handleMessage(Message msg) { Object request = msg.obj; Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) request); break; case MSG_KEYS: Pair<KeyRequest, String> keyRequest = (Pair<KeyRequest, String>) request; KeyRequest mediaDrmKeyRequest = keyRequest.first; String licenseServerUrl = keyRequest.second; response = callback.executeKeyRequest(uuid, mediaDrmKeyRequest, licenseServerUrl); break; default: throw new RuntimeException(); } } catch (Exception e) { if (maybeRetryRequest(msg)) { return; } response = e; } postResponseHandler.obtainMessage(msg.what, Pair.create(request, response)).sendToTarget(); }
Example #6
Source File: DefaultDrmSessionManager.java From K-Sonic with MIT License | 5 votes |
private void postProvisionRequest() { if (provisioningInProgress) { return; } provisioningInProgress = true; ProvisionRequest request = mediaDrm.getProvisionRequest(); postRequestHandler.obtainMessage(MSG_PROVISION, request).sendToTarget(); }
Example #7
Source File: DefaultDrmSession.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override @SuppressWarnings("unchecked") public void handleMessage(Message msg) { Object request = msg.obj; Object response; try { switch (msg.what) { case MSG_PROVISION: response = callback.executeProvisionRequest(uuid, (ProvisionRequest) request); break; case MSG_KEYS: Pair<KeyRequest, String> keyRequest = (Pair<KeyRequest, String>) request; KeyRequest mediaDrmKeyRequest = keyRequest.first; String licenseServerUrl = keyRequest.second; response = callback.executeKeyRequest(uuid, mediaDrmKeyRequest, licenseServerUrl); break; default: throw new RuntimeException(); } } catch (Exception e) { if (maybeRetryRequest(msg)) { return; } response = e; } postResponseHandler.obtainMessage(msg.what, Pair.create(request, response)).sendToTarget(); }
Example #8
Source File: HttpMediaDrmCallback.java From K-Sonic with MIT License | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + new String(request.getData()); return executePost(dataSourceFactory, url, new byte[0], null); }
Example #9
Source File: LocalMediaDrmCallback.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { throw new UnsupportedOperationException(); }
Example #10
Source File: HttpMediaDrmCallback.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData()); return executePost(dataSourceFactory, url, Util.EMPTY_BYTE_ARRAY, null); }
Example #11
Source File: LocalMediaDrmCallback.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { throw new UnsupportedOperationException(); }
Example #12
Source File: HttpMediaDrmCallback.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData()); return executePost(dataSourceFactory, url, Util.EMPTY_BYTE_ARRAY, null); }
Example #13
Source File: HttpMediaDrmCallback.java From MediaSDK with Apache License 2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData()); return executePost(dataSourceFactory, url, /* httpBody= */ null, /* requestProperties= */ null); }
Example #14
Source File: LocalMediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { throw new UnsupportedOperationException(); }
Example #15
Source File: HttpMediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData()); return executePost(dataSourceFactory, url, new byte[0], null); }
Example #16
Source File: LocalMediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { throw new UnsupportedOperationException(); }
Example #17
Source File: HttpMediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { String url = request.getDefaultUrl() + "&signedRequest=" + Util.fromUtf8Bytes(request.getData()); return executePost(dataSourceFactory, url, new byte[0], null); }
Example #18
Source File: LocalMediaDrmCallback.java From MediaSDK with Apache License 2.0 | 4 votes |
@Override public byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws IOException { throw new UnsupportedOperationException(); }
Example #19
Source File: MediaDrmCallback.java From K-Sonic with MIT License | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;
Example #20
Source File: MediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;
Example #21
Source File: MediaDrmCallback.java From TelePlus-Android with GNU General Public License v2.0 | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;
Example #22
Source File: MediaDrmCallback.java From Telegram-FOSS with GNU General Public License v2.0 | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;
Example #23
Source File: MediaDrmCallback.java From MediaSDK with Apache License 2.0 | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;
Example #24
Source File: MediaDrmCallback.java From Telegram with GNU General Public License v2.0 | 2 votes |
/** * Executes a provisioning request. * * @param uuid The UUID of the content protection scheme. * @param request The request. * @return The response data. * @throws Exception If an error occurred executing the request. */ byte[] executeProvisionRequest(UUID uuid, ProvisionRequest request) throws Exception;