Source release 14.1.0

This commit is contained in:
John W. Bruce
2018-06-29 15:59:47 -07:00
parent 3ab70cec4e
commit afa11a48a0
1941 changed files with 557780 additions and 105547 deletions

View File

@@ -1,4 +1,6 @@
// Copyright 2012 Google Inc. All Rights Reserved.
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
#ifndef WVCDM_CORE_CDM_SESSION_H_
#define WVCDM_CORE_CDM_SESSION_H_
@@ -8,6 +10,7 @@
#include <vector>
#include "crypto_session.h"
#include "disallow_copy_and_assign.h"
#include "device_files.h"
#include "file_store.h"
#include "initialization_data.h"
@@ -145,15 +148,18 @@ class CdmSession {
virtual CdmUsageSupportType get_usage_support_type()
{ return usage_support_type_; }
// ReleaseCrypto() - Closes the underlying crypto session but leaves this
// object alive. It is invalid to call any method that requires a crypto
// session after calling this. Since calling this renders this object mostly
// useless, it is preferable to simply delete this object (which will also
// release the underlying crypto session) rather than call this method.
virtual CdmResponseType ReleaseCrypto();
// This method will remove keys by resetting crypto resources and
// policy information. This renders the session mostly useless and it is
// preferable to simply delete this object rather than call this method.
virtual CdmResponseType RemoveKeys();
// Delete current license and matching usage record
bool DeleteLicense();
// Remove the current offline license and/or matching usage record, if any
// exist.
CdmResponseType RemoveLicense();
// Delete this session's associated license or usage record file. Note that,
// unlike RemoveLicense(), this method ONLY affects the file system and does
// not touch the usage table headers.
bool DeleteLicenseFile();
// Generate unique ID for each new session.
CdmSessionId GenerateSessionId();
@@ -199,6 +205,12 @@ class CdmSession {
bool UpdateUsageInfo();
CdmResponseType GenerateKeyRequestInternal(
const InitializationData& init_data, CdmLicenseType license_type,
const CdmAppParameterMap& app_parameters, CdmKeyRequest* key_request);
virtual CdmResponseType AddKeyInternal(const CdmKeyResponse& key_response);
void UpdateRequestLatencyTiming(CdmResponseType sts);
// These setters are for testing only. Takes ownership of the pointers.
void set_license_parser(CdmLicense* license_parser);
void set_crypto_session(CryptoSession* crypto_session);
@@ -209,6 +221,8 @@ class CdmSession {
metrics::SessionMetrics* metrics_;
metrics::CryptoMetrics* crypto_metrics_;
metrics::TimerMetric life_span_;
metrics::TimerMetric license_request_latency_;
CdmKeyRequestType key_request_type_;
bool initialized_;
bool closed_; // Session closed, but final shared_ptr has not been released.