Add ATSC support - part 1

[ 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
This commit is contained in:
Rahul Frias
2020-03-16 18:18:46 -07:00
parent aa5fc5afd0
commit bbe9f6afc4
18 changed files with 256 additions and 10 deletions

View File

@@ -198,7 +198,8 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
TestWvCdmClientPropertySet()
: use_privacy_mode_(false),
is_session_sharing_enabled_(false),
session_sharing_id_(0) {}
session_sharing_id_(0),
use_atsc_mode_(false) {}
virtual ~TestWvCdmClientPropertySet() {}
virtual const std::string& app_id() const { return app_id_; }
@@ -214,6 +215,7 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
return is_session_sharing_enabled_;
}
virtual uint32_t session_sharing_id() const { return session_sharing_id_; }
virtual bool use_atsc_mode() const { return use_atsc_mode_; }
void set_app_id(const std::string& app_id) { app_id_ = app_id; }
void set_security_level(const std::string& security_level) {
@@ -229,6 +231,9 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
is_session_sharing_enabled_ = enable;
}
void set_session_sharing_id(uint32_t id) { session_sharing_id_ = id; }
void set_use_atsc_mode(bool use_atsc_mode) {
use_atsc_mode_ = use_atsc_mode;
}
private:
std::string app_id_;
@@ -237,6 +242,7 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
bool use_privacy_mode_;
bool is_session_sharing_enabled_;
uint32_t session_sharing_id_;
bool use_atsc_mode_;
};
class WvCdmExtendedDurationTest : public WvCdmTestBase {

View File

@@ -1608,7 +1608,8 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
TestWvCdmClientPropertySet()
: use_privacy_mode_(false),
is_session_sharing_enabled_(false),
session_sharing_id_(0) {}
session_sharing_id_(0),
use_atsc_mode_(false) {}
virtual ~TestWvCdmClientPropertySet() {}
virtual const std::string& app_id() const { return app_id_; }
@@ -1624,6 +1625,7 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
return is_session_sharing_enabled_;
}
virtual uint32_t session_sharing_id() const { return session_sharing_id_; }
virtual bool use_atsc_mode() const { return use_atsc_mode_; }
void set_app_id(const std::string& app_id) { app_id_ = app_id; }
void set_security_level(const std::string& security_level) {
@@ -1639,6 +1641,7 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
is_session_sharing_enabled_ = enable;
}
void set_session_sharing_id(uint32_t id) { session_sharing_id_ = id; }
void set_use_atsc_mode(bool use_atsc_mode) { use_atsc_mode_ = use_atsc_mode; }
private:
std::string app_id_;
@@ -1647,6 +1650,7 @@ class TestWvCdmClientPropertySet : public CdmClientPropertySet {
bool use_privacy_mode_;
bool is_session_sharing_enabled_;
uint32_t session_sharing_id_;
bool use_atsc_mode_;
};
class TestWvCdmEventListener : public WvCdmEventListener {