Implement WV side of the separation of sniffing and decrypt session initialization.

Further optimization may be done to further speed up a drm content playback session

related-to-bug: 5725548

Change-Id: Ife69deaf5d2d70bba812fe1a48d9268d8e9530f7
This commit is contained in:
James Dong
2012-01-10 08:26:13 -08:00
parent 7284b7e7f3
commit 9fd21a7798
4 changed files with 72 additions and 46 deletions

View File

@@ -80,10 +80,22 @@ protected:
DrmSupportInfo* onGetSupportInfo(int uniqueId);
status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle,
int fd, off64_t offset, off64_t length);
int fd, off64_t offset, off64_t length) {
return DRM_ERROR_CANNOT_HANDLE;
}
status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle,
const char *uri);
int fd, off64_t offset, off64_t length,
const char* mime);
status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle,
const char* uri) {
return DRM_ERROR_CANNOT_HANDLE;
}
status_t onOpenDecryptSession(int uniqueId, DecryptHandle *decryptHandle,
const char* uri,
const char* mime);
status_t onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle);
@@ -125,6 +137,7 @@ protected:
};
private:
bool isSupportedMimeType(const char* mime);
static bool SendEvent(WVDRMPluginAPI::EventType code, WVDRMPluginAPI::EventDestination dest,
const std::string &path);