diff options
Diffstat (limited to 'drm/libdrmframework/plugins/passthru')
-rw-r--r-- | drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h | 22 | ||||
-rw-r--r-- | drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp | 29 |
2 files changed, 30 insertions, 21 deletions
diff --git a/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h b/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h index d2c7852..eed1628 100644 --- a/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h +++ b/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h @@ -40,7 +40,7 @@ protected: DrmInfoStatus* onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo); - void onSaveRights(int uniqueId, const DrmRights& drmRights, + status_t onSaveRights(int uniqueId, const DrmRights& drmRights, const String8& rightsPath, const String8& contentPath); DrmInfo* onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest); @@ -51,19 +51,19 @@ protected: int onCheckRightsStatus(int uniqueId, const String8& path, int action); - void onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve); + status_t onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve); - void onSetPlaybackStatus( + status_t onSetPlaybackStatus( int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position); bool onValidateAction( int uniqueId, const String8& path, int action, const ActionDescription& description); - void onRemoveRights(int uniqueId, const String8& path); + status_t onRemoveRights(int uniqueId, const String8& path); - void onRemoveAllRights(int uniqueId); + status_t onRemoveAllRights(int uniqueId); - void onOpenConvertSession(int uniqueId, int convertId); + status_t onOpenConvertSession(int uniqueId, int convertId); DrmConvertedStatus* onConvertData(int uniqueId, int convertId, const DrmBuffer* inputData); @@ -74,15 +74,15 @@ protected: status_t onOpenDecryptSession( int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length); - void onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle); + status_t onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle); - void onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, + status_t onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo); - status_t onDecrypt(int uniqueId, DecryptHandle* decryptHandle, - int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer); + status_t onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, + const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV); - void onFinalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId); + status_t onFinalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId); ssize_t onPread(int uniqueId, DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off_t offset); diff --git a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp index 2655d0b..4c7714d 100644 --- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp +++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp @@ -129,9 +129,10 @@ DrmSupportInfo* DrmPassthruPlugIn::onGetSupportInfo(int uniqueId) { return drmSupportInfo; } -void DrmPassthruPlugIn::onSaveRights(int uniqueId, const DrmRights& drmRights, +status_t DrmPassthruPlugIn::onSaveRights(int uniqueId, const DrmRights& drmRights, const String8& rightsPath, const String8& contentPath) { LOGD("DrmPassthruPlugIn::onSaveRights : %d", uniqueId); + return DRM_NO_ERROR; } DrmInfo* DrmPassthruPlugIn::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmInfoRequest) { @@ -174,14 +175,16 @@ int DrmPassthruPlugIn::onCheckRightsStatus(int uniqueId, const String8& path, in return rightsStatus; } -void DrmPassthruPlugIn::onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, +status_t DrmPassthruPlugIn::onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve) { LOGD("DrmPassthruPlugIn::onConsumeRights() : %d", uniqueId); + return DRM_NO_ERROR; } -void DrmPassthruPlugIn::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle, +status_t DrmPassthruPlugIn::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) { LOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId); + return DRM_NO_ERROR; } bool DrmPassthruPlugIn::onValidateAction(int uniqueId, const String8& path, @@ -190,16 +193,19 @@ bool DrmPassthruPlugIn::onValidateAction(int uniqueId, const String8& path, return true; } -void DrmPassthruPlugIn::onRemoveRights(int uniqueId, const String8& path) { +status_t DrmPassthruPlugIn::onRemoveRights(int uniqueId, const String8& path) { LOGD("DrmPassthruPlugIn::onRemoveRights() : %d", uniqueId); + return DRM_NO_ERROR; } -void DrmPassthruPlugIn::onRemoveAllRights(int uniqueId) { +status_t DrmPassthruPlugIn::onRemoveAllRights(int uniqueId) { LOGD("DrmPassthruPlugIn::onRemoveAllRights() : %d", uniqueId); + return DRM_NO_ERROR; } -void DrmPassthruPlugIn::onOpenConvertSession(int uniqueId, int convertId) { +status_t DrmPassthruPlugIn::onOpenConvertSession(int uniqueId, int convertId) { LOGD("DrmPassthruPlugIn::onOpenConvertSession() : %d", uniqueId); + return DRM_NO_ERROR; } DrmConvertedStatus* DrmPassthruPlugIn::onConvertData( @@ -237,7 +243,7 @@ status_t DrmPassthruPlugIn::onOpenDecryptSession( return DRM_ERROR_CANNOT_HANDLE; } -void DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { +status_t DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* decryptHandle) { LOGD("DrmPassthruPlugIn::onCloseDecryptSession() : %d", uniqueId); if (NULL != decryptHandle) { if (NULL != decryptHandle->decryptInfo) { @@ -245,15 +251,17 @@ void DrmPassthruPlugIn::onCloseDecryptSession(int uniqueId, DecryptHandle* decry } delete decryptHandle; decryptHandle = NULL; } + return DRM_NO_ERROR; } -void DrmPassthruPlugIn::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, +status_t DrmPassthruPlugIn::onInitializeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId, const DrmBuffer* headerInfo) { LOGD("DrmPassthruPlugIn::onInitializeDecryptUnit() : %d", uniqueId); + return DRM_NO_ERROR; } status_t DrmPassthruPlugIn::onDecrypt(int uniqueId, DecryptHandle* decryptHandle, - int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer) { + int decryptUnitId, const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) { LOGD("DrmPassthruPlugIn::onDecrypt() : %d", uniqueId); /** * As a workaround implementation passthru would copy the given @@ -267,9 +275,10 @@ status_t DrmPassthruPlugIn::onDecrypt(int uniqueId, DecryptHandle* decryptHandle return DRM_NO_ERROR; } -void DrmPassthruPlugIn::onFinalizeDecryptUnit( +status_t DrmPassthruPlugIn::onFinalizeDecryptUnit( int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) { LOGD("DrmPassthruPlugIn::onFinalizeDecryptUnit() : %d", uniqueId); + return DRM_NO_ERROR; } ssize_t DrmPassthruPlugIn::onPread(int uniqueId, DecryptHandle* decryptHandle, |