• Home
  • Raw
  • Download

Lines Matching refs:mObj

47     AMediaDrm *mObj;  member
53 DrmListener(AMediaDrm *obj, AMediaDrmEventListener listener) : mObj(obj), in DrmListener()
56 DrmListener(AMediaDrm *obj, AMediaDrmExpirationUpdateListener listener) : mObj(obj), in DrmListener()
59 DrmListener(AMediaDrm *obj, AMediaDrmKeysChangeListener listener) : mObj(obj), in DrmListener()
118 (*mExpirationUpdateListener)(mObj, &sessionId, expiryTimeInMS); in notify()
155 (*mKeysChangeListener)(mObj, &sessionId, keysStatus.array(), numKeys, hasNewUsableKey); in notify()
189 (*mEventListener)(mObj, &sessionId, ndkEventType, extra, data, dataSize); in notify()
329 AMediaDrm *mObj = new AMediaDrm(); in AMediaDrm_createByUUID() local
330 mObj->mDrm = CreateDrmFromUUID(uuid); in AMediaDrm_createByUUID()
332 mObj->mListener.clear(); in AMediaDrm_createByUUID()
333 return mObj; in AMediaDrm_createByUUID()
337 void AMediaDrm_release(AMediaDrm *mObj) { in AMediaDrm_release() argument
338 if (mObj->mDrm != NULL) { in AMediaDrm_release()
339 mObj->mDrm->setListener(NULL); in AMediaDrm_release()
340 mObj->mDrm->destroyPlugin(); in AMediaDrm_release()
341 mObj->mDrm.clear(); in AMediaDrm_release()
343 delete mObj; in AMediaDrm_release()
347 media_status_t AMediaDrm_setOnEventListener(AMediaDrm *mObj, AMediaDrmEventListener listener) { in AMediaDrm_setOnEventListener() argument
348 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_setOnEventListener()
352 if (mObj->mListener.get()) { in AMediaDrm_setOnEventListener()
353 mObj->mListener->setEventListener(listener); in AMediaDrm_setOnEventListener()
355 mObj->mListener = new DrmListener(mObj, listener); in AMediaDrm_setOnEventListener()
357 mObj->mDrm->setListener(mObj->mListener); in AMediaDrm_setOnEventListener()
362 media_status_t AMediaDrm_setOnExpirationUpdateListener(AMediaDrm *mObj, in AMediaDrm_setOnExpirationUpdateListener() argument
364 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_setOnExpirationUpdateListener()
368 if (mObj->mListener.get()) { in AMediaDrm_setOnExpirationUpdateListener()
369 mObj->mListener->setExpirationUpdateListener(listener); in AMediaDrm_setOnExpirationUpdateListener()
371 mObj->mListener = new DrmListener(mObj, listener); in AMediaDrm_setOnExpirationUpdateListener()
373 mObj->mDrm->setListener(mObj->mListener); in AMediaDrm_setOnExpirationUpdateListener()
378 media_status_t AMediaDrm_setOnKeysChangeListener(AMediaDrm *mObj, in AMediaDrm_setOnKeysChangeListener() argument
380 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_setOnKeysChangeListener()
384 if (mObj->mListener.get()) { in AMediaDrm_setOnKeysChangeListener()
385 mObj->mListener->setKeysChangeListener(listener); in AMediaDrm_setOnKeysChangeListener()
387 mObj->mListener = new DrmListener(mObj, listener); in AMediaDrm_setOnKeysChangeListener()
389 mObj->mDrm->setListener(mObj->mListener); in AMediaDrm_setOnKeysChangeListener()
393 static bool findId(AMediaDrm *mObj, const AMediaDrmByteArray &id, List<idvec_t>::iterator &iter) { in findId() argument
394 for (iter = mObj->mIds.begin(); iter != mObj->mIds.end(); ++iter) { in findId()
403 media_status_t AMediaDrm_openSession(AMediaDrm *mObj, AMediaDrmSessionId *sessionId) { in AMediaDrm_openSession() argument
404 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_openSession()
411 status_t status = mObj->mDrm->openSession(DrmPlugin::kSecurityLevelMax, session); in AMediaDrm_openSession()
413 mObj->mIds.push_front(session); in AMediaDrm_openSession()
414 List<idvec_t>::iterator iter = mObj->mIds.begin(); in AMediaDrm_openSession()
422 media_status_t AMediaDrm_closeSession(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId) { in AMediaDrm_closeSession() argument
423 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_closeSession()
431 if (!findId(mObj, *sessionId, iter)) { in AMediaDrm_closeSession()
434 mObj->mDrm->closeSession(*iter); in AMediaDrm_closeSession()
435 mObj->mIds.erase(iter); in AMediaDrm_closeSession()
440 media_status_t AMediaDrm_getKeyRequest(AMediaDrm *mObj, const AMediaDrmScope *scope, in AMediaDrm_getKeyRequest() argument
445 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_getKeyRequest()
453 if (!findId(mObj, *scope, iter)) { in AMediaDrm_getKeyRequest()
480 mObj->mKeyRequest.clear(); in AMediaDrm_getKeyRequest()
481 status_t status = mObj->mDrm->getKeyRequest(*iter, mdInit, String8(mimeType), in AMediaDrm_getKeyRequest()
482 mdKeyType, mdOptionalParameters, mObj->mKeyRequest, defaultUrl, in AMediaDrm_getKeyRequest()
487 *keyRequest = mObj->mKeyRequest.array(); in AMediaDrm_getKeyRequest()
488 *keyRequestSize = mObj->mKeyRequest.size(); in AMediaDrm_getKeyRequest()
494 media_status_t AMediaDrm_provideKeyResponse(AMediaDrm *mObj, const AMediaDrmScope *scope, in AMediaDrm_provideKeyResponse() argument
497 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_provideKeyResponse()
505 if (!findId(mObj, *scope, iter)) { in AMediaDrm_provideKeyResponse()
512 status_t status = mObj->mDrm->provideKeyResponse(*iter, mdResponse, mdKeySetId); in AMediaDrm_provideKeyResponse()
514 mObj->mIds.push_front(mdKeySetId); in AMediaDrm_provideKeyResponse()
515 List<idvec_t>::iterator iter = mObj->mIds.begin(); in AMediaDrm_provideKeyResponse()
526 media_status_t AMediaDrm_restoreKeys(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_restoreKeys() argument
529 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_restoreKeys()
536 if (!findId(mObj, *sessionId, iter)) { in AMediaDrm_restoreKeys()
541 return translateStatus(mObj->mDrm->restoreKeys(*iter, keySet)); in AMediaDrm_restoreKeys()
545 media_status_t AMediaDrm_removeKeys(AMediaDrm *mObj, const AMediaDrmSessionId *keySetId) { in AMediaDrm_removeKeys() argument
546 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_removeKeys()
554 if (!findId(mObj, *keySetId, iter)) { in AMediaDrm_removeKeys()
557 status = mObj->mDrm->removeKeys(keySet); in AMediaDrm_removeKeys()
559 status = mObj->mDrm->removeKeys(*iter); in AMediaDrm_removeKeys()
560 mObj->mIds.erase(iter); in AMediaDrm_removeKeys()
566 media_status_t AMediaDrm_queryKeyStatus(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_queryKeyStatus() argument
569 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_queryKeyStatus()
576 if (!findId(mObj, *sessionId, iter)) { in AMediaDrm_queryKeyStatus()
580 status_t status = mObj->mDrm->queryKeyStatus(*iter, mObj->mQueryResults); in AMediaDrm_queryKeyStatus()
586 if (mObj->mQueryResults.size() > *numPairs) { in AMediaDrm_queryKeyStatus()
587 *numPairs = mObj->mQueryResults.size(); in AMediaDrm_queryKeyStatus()
591 for (size_t i = 0; i < mObj->mQueryResults.size(); i++) { in AMediaDrm_queryKeyStatus()
592 keyValuePairs[i].mKey = mObj->mQueryResults.keyAt(i).string(); in AMediaDrm_queryKeyStatus()
593 keyValuePairs[i].mValue = mObj->mQueryResults.valueAt(i).string(); in AMediaDrm_queryKeyStatus()
595 *numPairs = mObj->mQueryResults.size(); in AMediaDrm_queryKeyStatus()
600 media_status_t AMediaDrm_getProvisionRequest(AMediaDrm *mObj, const uint8_t **provisionRequest, in AMediaDrm_getProvisionRequest() argument
602 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_getProvisionRequest()
609 status_t status = mObj->mDrm->getProvisionRequest(String8(""), String8(""), in AMediaDrm_getProvisionRequest()
610 mObj->mProvisionRequest, mObj->mProvisionUrl); in AMediaDrm_getProvisionRequest()
614 *provisionRequest = mObj->mProvisionRequest.array(); in AMediaDrm_getProvisionRequest()
615 *provisionRequestSize = mObj->mProvisionRequest.size(); in AMediaDrm_getProvisionRequest()
616 *serverUrl = mObj->mProvisionUrl.string(); in AMediaDrm_getProvisionRequest()
622 media_status_t AMediaDrm_provideProvisionResponse(AMediaDrm *mObj, in AMediaDrm_provideProvisionResponse() argument
624 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_provideProvisionResponse()
635 return translateStatus(mObj->mDrm->provideProvisionResponse(mdResponse, unused, unused)); in AMediaDrm_provideProvisionResponse()
639 media_status_t AMediaDrm_getSecureStops(AMediaDrm *mObj, in AMediaDrm_getSecureStops() argument
642 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_getSecureStops()
648 status_t status = mObj->mDrm->getSecureStops(mObj->mSecureStops); in AMediaDrm_getSecureStops()
653 if (*numSecureStops < mObj->mSecureStops.size()) { in AMediaDrm_getSecureStops()
656 List<Vector<uint8_t> >::iterator iter = mObj->mSecureStops.begin(); in AMediaDrm_getSecureStops()
658 while (iter != mObj->mSecureStops.end()) { in AMediaDrm_getSecureStops()
664 *numSecureStops = mObj->mSecureStops.size(); in AMediaDrm_getSecureStops()
669 media_status_t AMediaDrm_releaseSecureStops(AMediaDrm *mObj, in AMediaDrm_releaseSecureStops() argument
672 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_releaseSecureStops()
681 return translateStatus(mObj->mDrm->releaseSecureStops(release)); in AMediaDrm_releaseSecureStops()
686 media_status_t AMediaDrm_getPropertyString(AMediaDrm *mObj, const char *propertyName, in AMediaDrm_getPropertyString() argument
689 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_getPropertyString()
696 status_t status = mObj->mDrm->getPropertyString(String8(propertyName), in AMediaDrm_getPropertyString()
697 mObj->mPropertyString); in AMediaDrm_getPropertyString()
700 *propertyValue = mObj->mPropertyString.string(); in AMediaDrm_getPropertyString()
708 media_status_t AMediaDrm_getPropertyByteArray(AMediaDrm *mObj, in AMediaDrm_getPropertyByteArray() argument
710 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_getPropertyByteArray()
717 status_t status = mObj->mDrm->getPropertyByteArray(String8(propertyName), in AMediaDrm_getPropertyByteArray()
718 mObj->mPropertyByteArray); in AMediaDrm_getPropertyByteArray()
721 propertyValue->ptr = mObj->mPropertyByteArray.array(); in AMediaDrm_getPropertyByteArray()
722 propertyValue->length = mObj->mPropertyByteArray.size(); in AMediaDrm_getPropertyByteArray()
731 media_status_t AMediaDrm_setPropertyString(AMediaDrm *mObj, in AMediaDrm_setPropertyString() argument
733 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_setPropertyString()
737 return translateStatus(mObj->mDrm->setPropertyString(String8(propertyName), in AMediaDrm_setPropertyString()
742 media_status_t AMediaDrm_setPropertyByteArray(AMediaDrm *mObj, in AMediaDrm_setPropertyByteArray() argument
748 return translateStatus(mObj->mDrm->setPropertyByteArray(String8(propertyName), in AMediaDrm_setPropertyByteArray()
753 static media_status_t encrypt_decrypt_common(AMediaDrm *mObj, in encrypt_decrypt_common() argument
758 if (!mObj || mObj->mDrm == NULL) { in encrypt_decrypt_common()
762 if (!findId(mObj, sessionId, iter)) { in encrypt_decrypt_common()
766 status_t status = mObj->mDrm->setCipherAlgorithm(*iter, String8(cipherAlgorithm)); in encrypt_decrypt_common()
784 status = mObj->mDrm->encrypt(*iter, keyIdVec, inputVec, ivVec, outputVec); in encrypt_decrypt_common()
786 status = mObj->mDrm->decrypt(*iter, keyIdVec, inputVec, ivVec, outputVec); in encrypt_decrypt_common()
795 media_status_t AMediaDrm_encrypt(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_encrypt() argument
801 return encrypt_decrypt_common(mObj, *sessionId, cipherAlgorithm, keyId, iv, in AMediaDrm_encrypt()
806 media_status_t AMediaDrm_decrypt(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_decrypt() argument
812 return encrypt_decrypt_common(mObj, *sessionId, cipherAlgorithm, keyId, iv, in AMediaDrm_decrypt()
817 media_status_t AMediaDrm_sign(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_sign() argument
821 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_sign()
828 if (!findId(mObj, *sessionId, iter)) { in AMediaDrm_sign()
832 status_t status = mObj->mDrm->setMacAlgorithm(*iter, String8(macAlgorithm)); in AMediaDrm_sign()
845 status = mObj->mDrm->sign(*iter, keyIdVec, messageVec, signatureVec); in AMediaDrm_sign()
856 media_status_t AMediaDrm_verify(AMediaDrm *mObj, const AMediaDrmSessionId *sessionId, in AMediaDrm_verify() argument
860 if (!mObj || mObj->mDrm == NULL) { in AMediaDrm_verify()
867 if (!findId(mObj, *sessionId, iter)) { in AMediaDrm_verify()
871 status_t status = mObj->mDrm->setMacAlgorithm(*iter, String8(macAlgorithm)); in AMediaDrm_verify()
887 status = mObj->mDrm->verify(*iter, keyIdVec, messageVec, signatureVec, match); in AMediaDrm_verify()