[ Merge of http://go/wvgerrit/100864 and http://go/ag/10704773 ] ATSC 3.0 allows for licenses to be downloaded OTA and are tied to a DRM certificate that may be shared across apps. The provisioning process for ATSC may happen at the factory or during an OS update. This contrasts from the regular OTT model, which requires that provisioning and license download have an uplink as well as a downlink connection. This adds support for the ATSC mode property. ATSC mode can only be set (or unset) before sessions are opened. Once the CDM identifier is set/sealed, requests to modify the ATSC mode will be rejected. If one needs to open sessions with both ATSC mode and regular (non-ATSC) mode, separate MediaDrm objects will need to be created. The default mode is to not use ATSC. Enable ATSC mode by calling mediaDrm.setPropertyString("atscMode", "enable") Disable ATSC mode by calling mediaDrm.setPropertyString("atscMode", "disable") Provisioning and unprovisioning requests for ATSC will be rejected as certificates will be retrieved by the ATSC service. Bug: 139730600 Test: WV unit/integration test, GtsMediaTestCases Change-Id: I142f286c711fe007ff42125c3c8cdc6450b6ea36
32 lines
800 B
C++
32 lines
800 B
C++
// 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 CDM_TEST_LICENSE_REQUEST_H_
|
|
#define CDM_TEST_LICENSE_REQUEST_H_
|
|
|
|
#include <string>
|
|
#include "disallow_copy_and_assign.h"
|
|
|
|
namespace wvcdm {
|
|
|
|
// Parses response from a license request.
|
|
// This class assumes a particular response format defined by
|
|
// Google license servers.
|
|
class LicenseRequest {
|
|
public:
|
|
LicenseRequest() {}
|
|
~LicenseRequest() {}
|
|
|
|
void GetDrmMessage(const std::string& response, std::string& drm_msg);
|
|
|
|
private:
|
|
size_t FindHeaderEndPosition(const std::string& response) const;
|
|
|
|
CORE_DISALLOW_COPY_AND_ASSIGN(LicenseRequest);
|
|
};
|
|
|
|
} // namespace wvcdm
|
|
|
|
#endif // CDM_TEST_LICENSE_REQUEST_H_
|