Export media_cas_packager_sdk

This commit is contained in:
Fang Yu
2018-10-01 14:59:29 -07:00
parent 5bdf48b400
commit ba0d63e2c1
110 changed files with 14079 additions and 0 deletions

27
protos/public/BUILD Normal file
View File

@@ -0,0 +1,27 @@
################################################################################
# Copyright 2018 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.
################################################################################
# Protocol buffer definitions for Widevine media cas packager sdk.
package(default_visibility = ["//visibility:public"])
load("@protobuf_repo//:protobuf.bzl", "cc_proto_library")
cc_proto_library(
name = "media_cas_encryption_proto",
srcs = ["media_cas_encryption.proto"],
default_runtime = "@protobuf_repo//:protobuf",
protoc = "@protobuf_repo//:protoc",
)
cc_proto_library(
name = "media_cas_proto",
srcs = ["media_cas.proto"],
default_runtime = "@protobuf_repo//:protobuf",
protoc = "@protobuf_repo//:protoc",
)

View File

@@ -0,0 +1,28 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright 2018 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.
////////////////////////////////////////////////////////////////////////////////
syntax = "proto2";
package widevine.cas;
// Encrypt/decrypt mode.
enum CasCryptoMode {
CRYPTO_MODE_UNSPECIFIED = 0;
CTR = 1;
CBC = 2;
};
// Widevine private data in the CA descriptor.
message CaDescriptorPrivateData {
// Provider name.
optional string provider = 1;
// Content ID.
optional bytes content_id = 2;
}

View File

@@ -0,0 +1,74 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright 2018 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.
////////////////////////////////////////////////////////////////////////////////
// Protocol buffer definitions for Widevine CAS.
syntax = "proto2";
option java_package = "com.google.video.widevine.mediacasencryption";
package widevine;
message CasEncryptionRequest {
optional bytes content_id = 1;
optional string provider = 2;
// Optional track types such as "AUDIO", SD" or "HD".
repeated string track_types = 3;
// Indicates if the client is using key rotation. If true, the server will
// return one key for EVEN and one key for ODD, otherwise only a single key is
// returned.
optional bool key_rotation = 4;
}
message CasEncryptionResponse {
enum Status {
STATUS_UNSPECIFIED = 0;
OK = 1;
SIGNATURE_FAILED = 2;
ACCESS_DENIED = 3;
INTERNAL_ERROR = 4;
INVALID_ARGUMENT = 5;
PROVIDER_ID_MISSING = 6;
CONTENT_ID_MISSING = 7;
TRACK_TYPE_MISSING = 8;
}
message KeyInfo {
enum KeySlot {
KEY_SLOT_UNSPECIFIED = 0;
SINGLE = 1;
EVEN = 2;
ODD = 3;
};
optional bytes key_id = 1;
optional bytes key = 2;
// Optional label used for the key.
optional string track_type = 3;
optional KeySlot key_slot = 4;
}
optional Status status = 1;
optional string status_message = 2;
optional bytes content_id = 3;
repeated KeyInfo entitlement_keys = 4;
}
message SignedCasEncryptionRequest {
optional bytes request = 1;
optional bytes signature = 2;
// Identifies the entity sending / signing the request.
optional string signer = 3;
}
message SignedCasEncryptionResponse {
// Serialized CasEncryptionResponse message.
optional bytes response = 1;
optional bytes signature = 2;
}
message HttpResponse {
optional bytes response = 1;
}