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:
@@ -287,7 +287,8 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
class WVClientPropertySet : public wvcdm::CdmClientPropertySet {
|
||||
public:
|
||||
WVClientPropertySet()
|
||||
: mUsePrivacyMode(false), mShareKeys(false), mSessionSharingId(0) {}
|
||||
: mUsePrivacyMode(false), mShareKeys(false), mSessionSharingId(0),
|
||||
mUseAtscMode(false) {}
|
||||
|
||||
virtual ~WVClientPropertySet() {}
|
||||
|
||||
@@ -351,6 +352,14 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
mAppId = appId;
|
||||
}
|
||||
|
||||
virtual bool use_atsc_mode() const {
|
||||
return mUseAtscMode;
|
||||
}
|
||||
|
||||
void set_use_atsc_mode(bool useAtscMode) {
|
||||
mUseAtscMode = useAtscMode;
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WVClientPropertySet);
|
||||
|
||||
@@ -360,6 +369,7 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
bool mShareKeys;
|
||||
uint32_t mSessionSharingId;
|
||||
std::string mAppId;
|
||||
bool mUseAtscMode;
|
||||
const std::string mEmptyString;
|
||||
} mPropertySet;
|
||||
|
||||
@@ -385,6 +395,9 @@ struct WVDrmPlugin : public IDrmPlugin, IDrmPluginListener,
|
||||
const std::string& origin() const { return mCdmIdentifier.origin; }
|
||||
bool set_origin(const std::string& id);
|
||||
|
||||
// This sets the app package name to allow apps to access ATSC licenses
|
||||
bool set_use_atsc_mode(bool enable);
|
||||
|
||||
// Indicates whether the builder can still be modified. This returns false
|
||||
// until a call to getCdmIdentifier.
|
||||
bool is_sealed() { return mIsIdentifierSealed; }
|
||||
|
||||
Reference in New Issue
Block a user