Add clang-tidy support for the CDM
Bug: 256230932 Change-Id: Id3fcf024cd7dcf95218876b81359d6418f5aa067
This commit is contained in:
@@ -43,11 +43,8 @@ namespace wvcdm {
|
||||
|
||||
// Protobuf generated classes.
|
||||
using video_widevine::WidevinePsshData;
|
||||
using video_widevine::WidevinePsshData_Algorithm;
|
||||
using video_widevine::WidevinePsshData_Algorithm_AESCTR;
|
||||
using video_widevine::WidevinePsshData_Type;
|
||||
using video_widevine::WidevinePsshData_Type_ENTITLED_KEY;
|
||||
using video_widevine::WidevinePsshData_Type_SINGLE;
|
||||
|
||||
InitializationData::InitializationData(const std::string& type,
|
||||
const CdmInitData& data,
|
||||
@@ -376,7 +373,7 @@ bool InitializationData::ExtractHlsAttributes(const std::string& attribute_list,
|
||||
std::vector<std::string> versions = ExtractKeyFormatVersions(value);
|
||||
bool supported = false;
|
||||
for (size_t i = 0; i < versions.size(); ++i) {
|
||||
if (versions[i].compare(HLS_KEYFORMAT_VERSION_VALUE_1) == 0) {
|
||||
if (versions[i] == HLS_KEYFORMAT_VERSION_VALUE_1) {
|
||||
supported = true;
|
||||
break;
|
||||
}
|
||||
@@ -393,11 +390,11 @@ bool InitializationData::ExtractHlsAttributes(const std::string& attribute_list,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (value.compare(HLS_METHOD_AES_128) == 0) {
|
||||
if (value == HLS_METHOD_AES_128) {
|
||||
*method = kHlsMethodAes128;
|
||||
} else if (value.compare(HLS_METHOD_SAMPLE_AES) == 0) {
|
||||
} else if (value == HLS_METHOD_SAMPLE_AES) {
|
||||
*method = kHlsMethodSampleAes;
|
||||
} else if (value.compare(HLS_METHOD_NONE) == 0) {
|
||||
} else if (value == HLS_METHOD_NONE) {
|
||||
*method = kHlsMethodNone;
|
||||
} else {
|
||||
LOGV("HLS method unrecognized: value = %s", value.c_str());
|
||||
@@ -734,7 +731,8 @@ void InitializationData::DumpToLogs() const {
|
||||
}
|
||||
|
||||
for (int i = 0; i < pssh.entitled_keys_size(); i++) {
|
||||
video_widevine::WidevinePsshData_EntitledKey key = pssh.entitled_keys(i);
|
||||
const video_widevine::WidevinePsshData_EntitledKey& key =
|
||||
pssh.entitled_keys(i);
|
||||
LOGD("InitData: entitlement_key_id %d: %s -> %s", i,
|
||||
wvutil::b2a_hex(key.entitlement_key_id()).c_str(),
|
||||
wvutil::b2a_hex(key.key_id()).c_str());
|
||||
|
||||
Reference in New Issue
Block a user