Loading drm/libmediadrm/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ cc_library_shared { shared_libs: [ "android.hardware.drm@1.0", "android.hardware.drm@1.1", "android.hardware.drm@1.2", "libbinder", "libhidlbase", "liblog", Loading Loading @@ -89,6 +90,7 @@ cc_library_shared { shared_libs: [ "android.hardware.drm@1.0", "android.hardware.drm@1.1", "android.hardware.drm@1.2", "libbase", "libbinder", "libhidlbase", Loading drm/libmediadrm/DrmHal.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ #include <mediadrm/DrmSessionManager.h> using drm::V1_0::KeyedVector; using drm::V1_0::KeyStatusType; using drm::V1_0::KeyRequestType; using drm::V1_0::KeyType; using drm::V1_0::KeyValue; Loading @@ -51,6 +50,7 @@ using drm::V1_1::HdcpLevel; using drm::V1_1::SecureStopRelease; using drm::V1_1::SecurityLevel; using drm::V1_2::KeySetId; using drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::hardware::hidl_array; using ::android::hardware::hidl_string; Loading Loading @@ -517,6 +517,17 @@ Return<void> DrmHal::sendExpirationUpdate(const hidl_vec<uint8_t>& sessionId, } Return<void> DrmHal::sendKeysChange(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus_V1_0>& keyStatusList_V1_0, bool hasNewUsableKey) { std::vector<KeyStatus> keyStatusVec; for (const auto &keyStatus_V1_0 : keyStatusList_V1_0) { keyStatusVec.push_back({keyStatus_V1_0.keyId, static_cast<KeyStatusType>(keyStatus_V1_0.type)}); } hidl_vec<KeyStatus> keyStatusList_V1_2(keyStatusVec); return sendKeysChange_1_2(sessionId, keyStatusList_V1_2, hasNewUsableKey); } Return<void> DrmHal::sendKeysChange_1_2(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) { mEventLock.lock(); Loading Loading @@ -546,6 +557,9 @@ Return<void> DrmHal::sendKeysChange(const hidl_vec<uint8_t>& sessionId, case KeyStatusType::STATUSPENDING: type = DrmPlugin::kKeyStatusType_StatusPending; break; case KeyStatusType::USABLEINFUTURE: type = DrmPlugin::kKeyStatusType_UsableInFuture; break; case KeyStatusType::INTERNALERROR: default: type = DrmPlugin::kKeyStatusType_InternalError; Loading drm/libmediadrm/DrmMetrics.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ using ::android::drm_metrics::DrmFrameworkMetrics; using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; using ::android::hardware::drm::V1_0::EventType; using ::android::hardware::drm::V1_0::KeyStatusType; using ::android::hardware::drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::os::PersistableBundle; Loading drm/libmediadrm/tests/DrmMetrics_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ using ::android::drm_metrics::DrmFrameworkMetrics; using ::android::hardware::hidl_vec; using ::android::hardware::drm::V1_0::EventType; using ::android::hardware::drm::V1_0::KeyStatusType; using ::android::hardware::drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_0::Status; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::os::PersistableBundle; Loading drm/mediadrm/plugins/clearkey/hidl/InitDataParser.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -51,16 +51,16 @@ Status InitDataParser::parse(const std::vector<uint8_t>& initData, // Build a list of the key IDs std::vector<const uint8_t*> keyIds; if (mimeType == kIsoBmffVideoMimeType || mimeType == kIsoBmffAudioMimeType || mimeType == kCencInitDataFormat) { if (mimeType == kIsoBmffVideoMimeType.c_str() || mimeType == kIsoBmffAudioMimeType.c_str() || mimeType == kCencInitDataFormat.c_str()) { Status res = parsePssh(initData, &keyIds); if (res != Status::OK) { return res; } } else if (mimeType == kWebmVideoMimeType || mimeType == kWebmAudioMimeType || mimeType == kWebmInitDataFormat) { } else if (mimeType == kWebmVideoMimeType.c_str() || mimeType == kWebmAudioMimeType.c_str() || mimeType == kWebmInitDataFormat.c_str()) { // WebM "init data" is just a single key ID if (initData.size() != kKeyIdSize) { return Status::ERROR_DRM_CANNOT_HANDLE; Loading Loading
drm/libmediadrm/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ cc_library_shared { shared_libs: [ "android.hardware.drm@1.0", "android.hardware.drm@1.1", "android.hardware.drm@1.2", "libbinder", "libhidlbase", "liblog", Loading Loading @@ -89,6 +90,7 @@ cc_library_shared { shared_libs: [ "android.hardware.drm@1.0", "android.hardware.drm@1.1", "android.hardware.drm@1.2", "libbase", "libbinder", "libhidlbase", Loading
drm/libmediadrm/DrmHal.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ #include <mediadrm/DrmSessionManager.h> using drm::V1_0::KeyedVector; using drm::V1_0::KeyStatusType; using drm::V1_0::KeyRequestType; using drm::V1_0::KeyType; using drm::V1_0::KeyValue; Loading @@ -51,6 +50,7 @@ using drm::V1_1::HdcpLevel; using drm::V1_1::SecureStopRelease; using drm::V1_1::SecurityLevel; using drm::V1_2::KeySetId; using drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::hardware::hidl_array; using ::android::hardware::hidl_string; Loading Loading @@ -517,6 +517,17 @@ Return<void> DrmHal::sendExpirationUpdate(const hidl_vec<uint8_t>& sessionId, } Return<void> DrmHal::sendKeysChange(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus_V1_0>& keyStatusList_V1_0, bool hasNewUsableKey) { std::vector<KeyStatus> keyStatusVec; for (const auto &keyStatus_V1_0 : keyStatusList_V1_0) { keyStatusVec.push_back({keyStatus_V1_0.keyId, static_cast<KeyStatusType>(keyStatus_V1_0.type)}); } hidl_vec<KeyStatus> keyStatusList_V1_2(keyStatusVec); return sendKeysChange_1_2(sessionId, keyStatusList_V1_2, hasNewUsableKey); } Return<void> DrmHal::sendKeysChange_1_2(const hidl_vec<uint8_t>& sessionId, const hidl_vec<KeyStatus>& keyStatusList, bool hasNewUsableKey) { mEventLock.lock(); Loading Loading @@ -546,6 +557,9 @@ Return<void> DrmHal::sendKeysChange(const hidl_vec<uint8_t>& sessionId, case KeyStatusType::STATUSPENDING: type = DrmPlugin::kKeyStatusType_StatusPending; break; case KeyStatusType::USABLEINFUTURE: type = DrmPlugin::kKeyStatusType_UsableInFuture; break; case KeyStatusType::INTERNALERROR: default: type = DrmPlugin::kKeyStatusType_InternalError; Loading
drm/libmediadrm/DrmMetrics.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ using ::android::drm_metrics::DrmFrameworkMetrics; using ::android::hardware::hidl_string; using ::android::hardware::hidl_vec; using ::android::hardware::drm::V1_0::EventType; using ::android::hardware::drm::V1_0::KeyStatusType; using ::android::hardware::drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::os::PersistableBundle; Loading
drm/libmediadrm/tests/DrmMetrics_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ using ::android::drm_metrics::DrmFrameworkMetrics; using ::android::hardware::hidl_vec; using ::android::hardware::drm::V1_0::EventType; using ::android::hardware::drm::V1_0::KeyStatusType; using ::android::hardware::drm::V1_2::KeyStatusType; using ::android::hardware::drm::V1_0::Status; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::os::PersistableBundle; Loading
drm/mediadrm/plugins/clearkey/hidl/InitDataParser.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -51,16 +51,16 @@ Status InitDataParser::parse(const std::vector<uint8_t>& initData, // Build a list of the key IDs std::vector<const uint8_t*> keyIds; if (mimeType == kIsoBmffVideoMimeType || mimeType == kIsoBmffAudioMimeType || mimeType == kCencInitDataFormat) { if (mimeType == kIsoBmffVideoMimeType.c_str() || mimeType == kIsoBmffAudioMimeType.c_str() || mimeType == kCencInitDataFormat.c_str()) { Status res = parsePssh(initData, &keyIds); if (res != Status::OK) { return res; } } else if (mimeType == kWebmVideoMimeType || mimeType == kWebmAudioMimeType || mimeType == kWebmInitDataFormat) { } else if (mimeType == kWebmVideoMimeType.c_str() || mimeType == kWebmAudioMimeType.c_str() || mimeType == kWebmInitDataFormat.c_str()) { // WebM "init data" is just a single key ID if (initData.size() != kKeyIdSize) { return Status::ERROR_DRM_CANNOT_HANDLE; Loading