summaryrefslogtreecommitdiffstats
path: root/drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp')
-rw-r--r--drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp b/drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp
index 757219484c..50acc1dab5 100644
--- a/drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp
+++ b/drm/mediacas/plugins/clearkey/ClearKeyCasPlugin.cpp
@@ -121,7 +121,7 @@ status_t ClearKeyCasPlugin::closeSession(const CasSessionId &sessionId) {
std::shared_ptr<ClearKeyCasSession> session =
ClearKeySessionLibrary::get()->findSession(sessionId);
if (session.get() == nullptr) {
- return ERROR_DRM_SESSION_NOT_OPENED;
+ return ERROR_CAS_SESSION_NOT_OPENED;
}
ClearKeySessionLibrary::get()->destroySession(sessionId);
@@ -135,7 +135,7 @@ status_t ClearKeyCasPlugin::setSessionPrivateData(
std::shared_ptr<ClearKeyCasSession> session =
ClearKeySessionLibrary::get()->findSession(sessionId);
if (session.get() == nullptr) {
- return ERROR_DRM_SESSION_NOT_OPENED;
+ return ERROR_CAS_SESSION_NOT_OPENED;
}
return OK;
}
@@ -146,7 +146,7 @@ status_t ClearKeyCasPlugin::processEcm(
std::shared_ptr<ClearKeyCasSession> session =
ClearKeySessionLibrary::get()->findSession(sessionId);
if (session.get() == nullptr) {
- return ERROR_DRM_SESSION_NOT_OPENED;
+ return ERROR_CAS_SESSION_NOT_OPENED;
}
Mutex::Autolock lock(mKeyFetcherLock);
@@ -293,7 +293,7 @@ const static size_t kUserKeyLength = 16;
status_t ClearKeyCasSession::updateECM(
KeyFetcher *keyFetcher, void *ecm, size_t size) {
if (keyFetcher == nullptr) {
- return ERROR_DRM_NOT_PROVISIONED;
+ return ERROR_CAS_NOT_PROVISIONED;
}
if (size < kEcmHeaderLength) {
@@ -344,7 +344,7 @@ ssize_t ClearKeyCasSession::decrypt(
size_t numSubSamples, const DescramblerPlugin::SubSample *subSamples,
const void *srcPtr, void *dstPtr, AString * /* errorDetailMsg */) {
if (secure) {
- return ERROR_DRM_CANNOT_HANDLE;
+ return ERROR_CAS_CANNOT_HANDLE;
}
AES_KEY contentKey;
@@ -356,7 +356,7 @@ ssize_t ClearKeyCasSession::decrypt(
int32_t keyIndex = (scramblingControl & 1);
if (!mKeyInfo[keyIndex].valid) {
ALOGE("decrypt: key %d is invalid", keyIndex);
- return ERROR_DRM_DECRYPT;
+ return ERROR_CAS_DECRYPT;
}
contentKey = mKeyInfo[keyIndex].contentKey;
}
@@ -420,7 +420,7 @@ status_t ClearKeyDescramblerPlugin::setMediaCasSession(
if (session.get() == nullptr) {
ALOGE("ClearKeyDescramblerPlugin: session not found");
- return ERROR_DRM_SESSION_NOT_OPENED;
+ return ERROR_CAS_SESSION_NOT_OPENED;
}
std::atomic_store(&mCASSession, session);
@@ -448,7 +448,7 @@ ssize_t ClearKeyDescramblerPlugin::descramble(
if (session.get() == nullptr) {
ALOGE("Uninitialized CAS session!");
- return ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED;
+ return ERROR_CAS_DECRYPT_UNIT_NOT_INITIALIZED;
}
return session->decrypt(