Add a flag --video_feature for Widevine
Change-Id: Id9ab958add1239972a4f94faf5e65cffe64444be
This commit is contained in:
parent
fa7a6d967a
commit
fa2c4409a6
|
@ -120,6 +120,7 @@
|
||||||
'../../packager.gyp:status',
|
'../../packager.gyp:status',
|
||||||
'../../third_party/boringssl/boringssl.gyp:boringssl',
|
'../../third_party/boringssl/boringssl.gyp:boringssl',
|
||||||
'../../third_party/curl/curl.gyp:libcurl',
|
'../../third_party/curl/curl.gyp:libcurl',
|
||||||
|
'../../third_party/gflags/gflags.gyp:gflags',
|
||||||
'../../third_party/libxml/libxml.gyp:libxml',
|
'../../third_party/libxml/libxml.gyp:libxml',
|
||||||
'../../version/version.gyp:version',
|
'../../version/version.gyp:version',
|
||||||
],
|
],
|
||||||
|
|
|
@ -74,6 +74,13 @@ message CommonEncryptionRequest {
|
||||||
|
|
||||||
// Enable entitlement license if set to true.
|
// Enable entitlement license if set to true.
|
||||||
optional bool enable_entitlement_license = 16;
|
optional bool enable_entitlement_license = 16;
|
||||||
|
|
||||||
|
// Video feature identifier, which is used in conjunction with |content_id|
|
||||||
|
// to derive key IDs and content keys. For example, it can be used to generate
|
||||||
|
// different keys for HDR and SDR. The value is propagated to PSSH.
|
||||||
|
// Ignored for tracks with type “AUDIO”.
|
||||||
|
// Current values are "HDR".
|
||||||
|
optional string video_feature = 19;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CommonEncryptionResponse {
|
message CommonEncryptionResponse {
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
#include "packager/media/base/widevine_key_source.h"
|
#include "packager/media/base/widevine_key_source.h"
|
||||||
|
|
||||||
|
#include <gflags/gflags.h>
|
||||||
|
|
||||||
#include "packager/base/base64.h"
|
#include "packager/base/base64.h"
|
||||||
#include "packager/base/bind.h"
|
#include "packager/base/bind.h"
|
||||||
#include "packager/base/strings/string_number_conversions.h"
|
#include "packager/base/strings/string_number_conversions.h"
|
||||||
|
@ -20,6 +22,10 @@
|
||||||
#include "packager/media/base/request_signer.h"
|
#include "packager/media/base/request_signer.h"
|
||||||
#include "packager/media/base/widevine_common_encryption.pb.h"
|
#include "packager/media/base/widevine_common_encryption.pb.h"
|
||||||
|
|
||||||
|
DEFINE_string(video_feature,
|
||||||
|
"",
|
||||||
|
"Specify the optional video feature, e.g. HDR.");
|
||||||
|
|
||||||
namespace shaka {
|
namespace shaka {
|
||||||
namespace media {
|
namespace media {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -364,6 +370,9 @@ void WidevineKeySource::FillRequest(bool enable_key_rotation,
|
||||||
|
|
||||||
if (!group_id_.empty())
|
if (!group_id_.empty())
|
||||||
request->set_group_id(group_id_.data(), group_id_.size());
|
request->set_group_id(group_id_.data(), group_id_.size());
|
||||||
|
|
||||||
|
if (!FLAGS_video_feature.empty())
|
||||||
|
request->set_video_feature(FLAGS_video_feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status WidevineKeySource::GenerateKeyMessage(
|
Status WidevineKeySource::GenerateKeyMessage(
|
||||||
|
|
Loading…
Reference in New Issue