33 lines
925 B
C++
33 lines
925 B
C++
// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
|
|
#include <iostream>
|
|
|
|
#include "log.h"
|
|
#include "wv_factory_extractor.h"
|
|
|
|
int main() {
|
|
widevine::ClientInfo client_info;
|
|
client_info.company_name = "";
|
|
client_info.arch_name = "";
|
|
client_info.device_name = "";
|
|
client_info.model_name = "";
|
|
client_info.product_name = "";
|
|
client_info.build_info = "";
|
|
|
|
auto extractor = widevine::WidevineFactoryExtractor::Create(client_info);
|
|
if (extractor == nullptr) {
|
|
LOGE("Failed to create WidevineFactoryExtractor");
|
|
return 1;
|
|
}
|
|
|
|
std::string request;
|
|
widevine::Status status = extractor->GenerateUploadRequest(request);
|
|
if (status != widevine::Status::kSuccess) {
|
|
LOGE("Fail to generate upload request: %d", status);
|
|
return 2;
|
|
}
|
|
std::cout << request << std::endl;
|
|
return 0;
|
|
} |