Source release 19.5.0

This commit is contained in:
Cong Lin
2025-04-02 10:27:18 -07:00
parent 4407acee62
commit f7ec4fdeff
295 changed files with 32196 additions and 21748 deletions

View File

@@ -36,12 +36,15 @@
#include "cdm_version.h"
#include "properties_ce.h"
// For reverse-compatibility this is always defined in the "widevine" namespace.
namespace widevine {
#ifdef HAS_EMBEDDED_CERT
extern const uint8_t kDeviceCert[];
extern const size_t kDeviceCertSize;
#endif
} // namespace widevine
namespace CDM_NAMESPACE {
using namespace wvcdm;
using namespace wvutil;
@@ -1641,11 +1644,12 @@ Cdm* Cdm::create(IEventListener* listener, IStorage* storage, bool privacy_mode,
}
}
} // namespace widevine
} // namespace CDM_NAMESPACE
// Missing symbols from core:
namespace wvutil {
using namespace CDM_NAMESPACE;
using namespace widevine;
int64_t Clock::GetCurrentTime() { return host.clock->now() / 1000; }
@@ -1725,17 +1729,18 @@ class FileCertImpl final : public File {
class FileSystem::Impl {
public:
Impl(widevine::Cdm::IStorage* storage) : storage_(storage) {
Impl(CDM_NAMESPACE::Cdm::IStorage* storage) : storage_(storage) {
assert(storage);
}
widevine::Cdm::IStorage* const storage_;
CDM_NAMESPACE::Cdm::IStorage* const storage_;
};
FileSystem::FileSystem() : impl_(new Impl(host.storage)) {}
FileSystem::FileSystem(const std::string& origin, void* extra_data)
: impl_(new Impl(reinterpret_cast<widevine::Cdm::IStorage*>(extra_data))),
: impl_(new Impl(
reinterpret_cast<CDM_NAMESPACE::Cdm::IStorage*>(extra_data))),
origin_(origin) {}
FileSystem::~FileSystem() {}

View File

@@ -30,7 +30,7 @@ void InitLogging() {}
void Log(const char* file, const char* function, int line, LogPriority level,
const char* fmt, ...) {
if (widevine::g_logger == nullptr) {
if (CDM_NAMESPACE::g_logger == nullptr) {
// If somehow we got here with no logger configured, as a last resort
// complain to stderr and bail.
fprintf(stderr, "[FATAL:%s(%d):%s] NO LOGGER CONFIGURED\n", file, line,
@@ -46,7 +46,7 @@ void Log(const char* file, const char* function, int line, LogPriority level,
FormatString(&fatal_message,
"[FATAL:%s(%d):%s] Invalid log priority level: %d", file, line,
function, level);
widevine::g_logger->log(fatal_message);
CDM_NAMESPACE::g_logger->log(fatal_message);
return;
}
@@ -62,7 +62,7 @@ void Log(const char* file, const char* function, int line, LogPriority level,
FormatString(&log_line, "[%s:%s(%d):%s] %s", severities[level], file, line,
function, formatted_message.c_str());
widevine::g_logger->log(log_line);
CDM_NAMESPACE::g_logger->log(log_line);
}
} // namespace wvutil

View File

@@ -4,6 +4,6 @@
#include "logger_global.h"
namespace widevine {
namespace CDM_NAMESPACE {
Cdm::ILogger* g_logger = nullptr;
}

View File

@@ -26,8 +26,8 @@ bool use_userspace_buffers_ = true;
bool set_provisioning_messages_to_binary_ = false;
std::string sandbox_id_;
widevine::Cdm::SecureOutputType secure_output_type_ =
widevine::Cdm::kNoSecureOutput;
CDM_NAMESPACE::Cdm::SecureOutputType secure_output_type_ =
CDM_NAMESPACE::Cdm::kNoSecureOutput;
bool client_info_is_valid_;
std::string company_name_;
@@ -64,7 +64,7 @@ void SetClientInfo() {
std::string version;
#if defined(RUNTIME_CLIENT_INFO)
if (!widevine::ReadClientInformation(
if (!CDM_NAMESPACE::ReadClientInformation(
&company_name_, &model_name_, &model_year_, &product_name_,
&device_name_, &arch_name_, &platform, &form_factor, &version)) {
LOGE("ReadClientInformation failed.");
@@ -131,7 +131,7 @@ bool GetValue(const char* source, std::string* output) {
} // namespace
namespace widevine {
namespace CDM_NAMESPACE {
// static
void PropertiesCE::SetSecureOutputType(
@@ -176,7 +176,7 @@ void PropertiesCE::SetSandboxId(const std::string& sandbox_id) {
// static
bool PropertiesCE::ClientInfoIsValid() { return client_info_is_valid_; }
} // namespace widevine
} // namespace CDM_NAMESPACE
namespace wvcdm {