Decouple key fetcher; Update ECMG API
This commit is contained in:
36
protos/public/BUILD
Normal file
36
protos/public/BUILD
Normal file
@@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# 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"])
|
||||
|
||||
filegroup(
|
||||
name = "binary_release_files",
|
||||
srcs = glob(["**"]),
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "media_cas_encryption_proto",
|
||||
srcs = ["media_cas_encryption.proto"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "media_cas_encryption_cc_proto",
|
||||
deps = [":media_cas_encryption_proto"],
|
||||
)
|
||||
|
||||
proto_library(
|
||||
name = "media_cas_proto",
|
||||
srcs = ["media_cas.proto"],
|
||||
)
|
||||
|
||||
cc_proto_library(
|
||||
name = "media_cas_cc_proto",
|
||||
deps = [":media_cas_proto"],
|
||||
)
|
||||
21
protos/public/media_cas.proto
Normal file
21
protos/public/media_cas.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
|
||||
// Widevine private data in the CA descriptor.
|
||||
message CaDescriptorPrivateData {
|
||||
// Provider name.
|
||||
optional string provider = 1;
|
||||
|
||||
// Content ID.
|
||||
optional bytes content_id = 2;
|
||||
}
|
||||
74
protos/public/media_cas_encryption.proto
Normal file
74
protos/public/media_cas_encryption.proto
Normal 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";
|
||||
|
||||
package widevine;
|
||||
|
||||
option java_package = "com.google.video.widevine.mediacasencryption";
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user