Fix media_cas_proxy_sdk build issue.
Add example binary for testing building the SDK after 'git clone' from our repo. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227583629
This commit is contained in:
39
example/BUILD
Normal file
39
example/BUILD
Normal file
@@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# Copyright 2019 Google LLC.
|
||||
#
|
||||
# This software is licensed under the terms defined in the Widevine Master
|
||||
# License Agreement. For a copy of this agreement, please contact
|
||||
# widevine-licensing@google.com.
|
||||
################################################################################
|
||||
|
||||
# Build file for the example code.
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
filegroup(
|
||||
name = "binary_release_files",
|
||||
srcs = [
|
||||
"wvpl_cas_proxy_environment_example.cc",
|
||||
"wvpl_cas_proxy_session_example.cc",
|
||||
":wvpl_cas_proxy_environment_example",
|
||||
":wvpl_cas_proxy_session_example",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "wvpl_cas_proxy_environment_example",
|
||||
srcs = ["wvpl_cas_proxy_environment_example.cc"],
|
||||
deps = [
|
||||
"//media_cas_proxy_sdk/external/common/wvpl:wvpl_cas_proxy_environment",
|
||||
"//media_cas_proxy_sdk/external/common/wvpl:wvpl_cas_proxy_session", # build_cleaner: keep
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "wvpl_cas_proxy_session_example",
|
||||
srcs = ["wvpl_cas_proxy_session_example.cc"],
|
||||
deps = ["//media_cas_proxy_sdk/external/common/wvpl:wvpl_cas_proxy_session"],
|
||||
)
|
||||
24
example/wvpl_cas_proxy_environment_example.cc
Normal file
24
example/wvpl_cas_proxy_environment_example.cc
Normal file
@@ -0,0 +1,24 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// This software is licensed under the terms defined in the Widevine Master
|
||||
// License Agreement. For a copy of this agreement, please contact
|
||||
// widevine-licensing@google.com.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Example of usage of wvpl_cas_proxy_environment.
|
||||
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "media_cas_proxy_sdk/external/common/wvpl/wvpl_cas_proxy_environment.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::map<std::string, std::string> config_values;
|
||||
widevine_server::wv_pl_sdk::WvPLCASProxyEnvironment environment(
|
||||
config_values);
|
||||
std::cout << "Hello world!" << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
23
example/wvpl_cas_proxy_session_example.cc
Normal file
23
example/wvpl_cas_proxy_session_example.cc
Normal file
@@ -0,0 +1,23 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// This software is licensed under the terms defined in the Widevine Master
|
||||
// License Agreement. For a copy of this agreement, please contact
|
||||
// widevine-licensing@google.com.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Example of usage of wvpl_cas_proxy_session.
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "media_cas_proxy_sdk/external/common/wvpl/wvpl_cas_proxy_session.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
std::cout << "Session version: "
|
||||
<< widevine_server::wv_pl_sdk::WvPLCASProxySession::
|
||||
GetVersionString()
|
||||
<< std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user