Initial v17 Release

Headers and Unit tests have been updated to match the v17 spec.

Documentation can be found here:
https://developers.devsite.corp.google.com/widevine/drm/client/oemcrypto/v17
This commit is contained in:
Fred Gylys-Colwell
2021-12-04 01:13:15 +00:00
parent 8e55868e8a
commit 044a89ef55
131 changed files with 6072 additions and 9038 deletions

View File

@@ -9,6 +9,9 @@
#else
# include <sys/types.h>
#endif
#ifdef __APPLE__
# include <TargetConditionals.h>
#endif
#include <errno.h>
#include <string.h>
@@ -19,7 +22,7 @@
#include "clock.h"
#include "log.h"
namespace wvcdm {
namespace wvutil {
bool TestSleep::real_sleep_ = true;
TestSleep::CallBack* TestSleep::callback_ = nullptr;
@@ -73,10 +76,13 @@ bool TestSleep::RollbackSystemTime(int seconds) {
file_time.dwHighDateTime = long_time >> 32;
if (!FileTimeToSystemTime(&file_time, &time)) return false;
if (!SetSystemTime(&time)) return false;
#elif TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
LOGE("iOS time rollback: cannot set system time.");
return false;
#else
auto time = std::chrono::system_clock::now();
auto modified_time = time - std::chrono::seconds(seconds);
;
timespec time_spec;
time_spec.tv_sec = std::chrono::duration_cast<std::chrono::seconds>(
modified_time.time_since_epoch())
@@ -140,6 +146,9 @@ bool TestSleep::CanChangeSystemTime() {
}
LOGE("Win32 time rollback: cannot set system time.");
return false;
#elif TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
LOGE("iOS time rollback: cannot set system time.");
return false;
#else
// Otherwise, the test needs to be run as root.
const uid_t uid = getuid();
@@ -148,4 +157,4 @@ bool TestSleep::CanChangeSystemTime() {
return false;
#endif
}
} // namespace wvcdm
} // namespace wvutil