Loading drm/mediadrm/plugins/clearkey/aidl/DrmPlugin.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "DrmPlugin.h" #include "Session.h" #include "Utils.h" #include "AidlClearKeryProperties.h" namespace { const std::string kKeySetIdPrefix("ckid"); Loading Loading @@ -81,12 +82,13 @@ DrmPlugin::DrmPlugin(SessionLibrary* sessionLibrary) void DrmPlugin::initProperties() { mStringProperties.clear(); mStringProperties[kVendorKey] = kVendorValue; mStringProperties[kVendorKey] = kAidlVendorValue; mStringProperties[kVersionKey] = kVersionValue; mStringProperties[kPluginDescriptionKey] = kPluginDescriptionValue; mStringProperties[kAlgorithmsKey] = kAlgorithmsValue; mStringProperties[kListenerTestSupportKey] = kListenerTestSupportValue; mStringProperties[kDrmErrorTestKey] = kDrmErrorTestValue; mStringProperties[kPluginDescriptionKey] = kAidlPluginDescriptionValue; mStringProperties[kAlgorithmsKey] = kAidlAlgorithmsValue; mStringProperties[kListenerTestSupportKey] = kAidlListenerTestSupportValue; mStringProperties[kDrmErrorTestKey] = kAidlDrmErrorTestValue; mStringProperties[kAidlVersionKey] = kAidlVersionValue; std::vector<uint8_t> valueVector; valueVector.clear(); Loading Loading @@ -377,6 +379,8 @@ void DrmPlugin::installSecureStop(const std::vector<uint8_t>& sessionId) { value = mStringProperties[kListenerTestSupportKey]; } else if (name == kDrmErrorTestKey) { value = mStringProperties[kDrmErrorTestKey]; } else if (name == kAidlVersionKey) { value = mStringProperties[kAidlVersionValue]; } else { ALOGE("App requested unknown string property %s", name.c_str()); status = Status::ERROR_DRM_CANNOT_HANDLE; Loading drm/mediadrm/plugins/clearkey/aidl/include/AidlClearKeryProperties.h 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef AIDL_CLEARKEY_PROPERTIES_H #define AIDL_CLEARKEY_PROPERTIES_H #include <string> namespace clearkeydrm { static const std::string kAidlVendorValue("Google"); static const std::string kAidlVersionValue("1.0"); static const std::string kAidlPluginDescriptionValue("ClearKey CDM"); static const std::string kAidlAlgorithmsValue(""); static const std::string kAidlListenerTestSupportValue("true"); static const std::string kAidlDrmErrorTestValue(""); static const std::string kAidlResourceContentionValue("resourceContention"); static const std::string kAidlLostStateValue("lostState"); static const std::string kAidlFrameTooLargeValue("frameTooLarge"); static const std::string kAidlInvalidStateValue("invalidState"); } // namespace clearkeydrm #endif No newline at end of file drm/mediadrm/plugins/clearkey/common/include/clearkeydrm/ClearKeyDrmProperties.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ static const std::string kResourceContentionValue("resourceContention"); static const std::string kLostStateValue("lostState"); static const std::string kFrameTooLargeValue("frameTooLarge"); static const std::string kInvalidStateValue("invalidState"); static const std::string kAidlVersionKey("aidlVersion"); static const std::string kDeviceIdKey("deviceId"); static const uint8_t kTestDeviceIdData[] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, Loading Loading
drm/mediadrm/plugins/clearkey/aidl/DrmPlugin.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include "DrmPlugin.h" #include "Session.h" #include "Utils.h" #include "AidlClearKeryProperties.h" namespace { const std::string kKeySetIdPrefix("ckid"); Loading Loading @@ -81,12 +82,13 @@ DrmPlugin::DrmPlugin(SessionLibrary* sessionLibrary) void DrmPlugin::initProperties() { mStringProperties.clear(); mStringProperties[kVendorKey] = kVendorValue; mStringProperties[kVendorKey] = kAidlVendorValue; mStringProperties[kVersionKey] = kVersionValue; mStringProperties[kPluginDescriptionKey] = kPluginDescriptionValue; mStringProperties[kAlgorithmsKey] = kAlgorithmsValue; mStringProperties[kListenerTestSupportKey] = kListenerTestSupportValue; mStringProperties[kDrmErrorTestKey] = kDrmErrorTestValue; mStringProperties[kPluginDescriptionKey] = kAidlPluginDescriptionValue; mStringProperties[kAlgorithmsKey] = kAidlAlgorithmsValue; mStringProperties[kListenerTestSupportKey] = kAidlListenerTestSupportValue; mStringProperties[kDrmErrorTestKey] = kAidlDrmErrorTestValue; mStringProperties[kAidlVersionKey] = kAidlVersionValue; std::vector<uint8_t> valueVector; valueVector.clear(); Loading Loading @@ -377,6 +379,8 @@ void DrmPlugin::installSecureStop(const std::vector<uint8_t>& sessionId) { value = mStringProperties[kListenerTestSupportKey]; } else if (name == kDrmErrorTestKey) { value = mStringProperties[kDrmErrorTestKey]; } else if (name == kAidlVersionKey) { value = mStringProperties[kAidlVersionValue]; } else { ALOGE("App requested unknown string property %s", name.c_str()); status = Status::ERROR_DRM_CANNOT_HANDLE; Loading
drm/mediadrm/plugins/clearkey/aidl/include/AidlClearKeryProperties.h 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef AIDL_CLEARKEY_PROPERTIES_H #define AIDL_CLEARKEY_PROPERTIES_H #include <string> namespace clearkeydrm { static const std::string kAidlVendorValue("Google"); static const std::string kAidlVersionValue("1.0"); static const std::string kAidlPluginDescriptionValue("ClearKey CDM"); static const std::string kAidlAlgorithmsValue(""); static const std::string kAidlListenerTestSupportValue("true"); static const std::string kAidlDrmErrorTestValue(""); static const std::string kAidlResourceContentionValue("resourceContention"); static const std::string kAidlLostStateValue("lostState"); static const std::string kAidlFrameTooLargeValue("frameTooLarge"); static const std::string kAidlInvalidStateValue("invalidState"); } // namespace clearkeydrm #endif No newline at end of file
drm/mediadrm/plugins/clearkey/common/include/clearkeydrm/ClearKeyDrmProperties.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ static const std::string kResourceContentionValue("resourceContention"); static const std::string kLostStateValue("lostState"); static const std::string kFrameTooLargeValue("frameTooLarge"); static const std::string kInvalidStateValue("invalidState"); static const std::string kAidlVersionKey("aidlVersion"); static const std::string kDeviceIdKey("deviceId"); static const uint8_t kTestDeviceIdData[] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, Loading