Corrections to support HLS

[ Merge of https://go/wvgerrit/17055 ]

There are a few bugs that need to be addressed to get HLS to work.

* Content ID in json init data is base64 encoded and needs to be decoded
  before being added to the WidevineCencHeader proto.
* Protection scheme was not set in the WidevineCencHeader proto.
* HLS initialization data should be sent as a CENC content identification
  in a license request.

b/20630275

Change-Id: Ie0ac33ac061931df6f26c0afbf3e62e5d01e5041
This commit is contained in:
Rahul Frias
2016-03-09 01:10:01 -08:00
parent ca1bd5cefc
commit cbde9109b6
4 changed files with 73 additions and 30 deletions

View File

@@ -36,9 +36,9 @@ class InitializationData {
bool ExtractHlsAttributes(const std::string& attribute_list,
CdmHlsMethod* method, std::vector<uint8_t>* iv,
std::string* uri);
static bool ConstructWidevineInitData(const std::string& uri,
CdmInitData* output);
static bool ConstructWidevineInitData(CdmHlsMethod method,
const std::string& uri,
CdmInitData* output);
static bool ExtractQuotedAttribute(const std::string& attribute_list,
const std::string& key,
std::string* value);