Add GetVersion API to query the client plugin version.
Includes Widevine libraries 4.5.0.8097 Change-Id: I7590d5a60f300f6686887f62ae127b86f76e6f94 related-to-bug: 6000505
This commit is contained in:
@@ -72,6 +72,7 @@ class WVDRMPluginAPI {
|
||||
virtual bool RemoveAllRights() = 0;
|
||||
virtual bool Prepare(char *data, int len) = 0;
|
||||
virtual int Operate(char *in, int inLength, char *out, int outLength, char *iv) = 0;
|
||||
virtual std::string GetVersion() const = 0;
|
||||
|
||||
enum EventType {
|
||||
EventType_AcquireDrmInfoFailed,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -332,6 +332,9 @@ DrmInfo* WVMDrmPlugin::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmI
|
||||
char buffer[16];
|
||||
sprintf(buffer, "%lu", (unsigned long)drmInfoRequestStatus);
|
||||
drmInfo->put(String8("WVDrmInfoRequestStatusKey"), String8(buffer));
|
||||
|
||||
drmInfo->put(String8("WVDrmInfoRequestVersionKey"),
|
||||
String8(mDrmPluginImpl->GetVersion().c_str()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class VideoPlayerView extends Activity {
|
||||
} else {
|
||||
setContentView(R.layout.notprovisioned);
|
||||
}
|
||||
drm.printPluginVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,6 +32,7 @@ public class WidevineDrm {
|
||||
private final static long DEVICE_IS_NOT_PROVISIONED = 1;
|
||||
private final static long DEVICE_IS_PROVISIONED_SD_ONLY = 2;
|
||||
private long mWVDrmInfoRequestStatusKey = DEVICE_IS_PROVISIONED;
|
||||
private String mPluginVersion = "";
|
||||
|
||||
public StringBuffer logBuffer = new StringBuffer();
|
||||
|
||||
@@ -144,6 +145,10 @@ public class WidevineDrm {
|
||||
(mWVDrmInfoRequestStatusKey == DEVICE_IS_PROVISIONED_SD_ONLY));
|
||||
}
|
||||
|
||||
public void printPluginVersion() {
|
||||
logMessage("plugin: " + mPluginVersion + "\n");
|
||||
}
|
||||
|
||||
public void registerPortal(String portal) {
|
||||
|
||||
DrmInfoRequest request = new DrmInfoRequest(DrmInfoRequest.TYPE_REGISTRATION_INFO,
|
||||
@@ -155,6 +160,8 @@ public class WidevineDrm {
|
||||
if (null != drmInfoRequestStatusKey && !drmInfoRequestStatusKey.equals("")) {
|
||||
mWVDrmInfoRequestStatusKey = Long.parseLong(drmInfoRequestStatusKey);
|
||||
}
|
||||
|
||||
mPluginVersion = (String)response.get("WVDrmInfoRequestVersionKey");
|
||||
}
|
||||
|
||||
public int acquireRights(String assetUri) {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user