summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2010-11-19 15:19:36 -0800
committerGloria Wang <gwang@google.com>2010-11-19 15:52:32 -0800
commita2cd44cb5067b4fe98794860690394254d3ac73c (patch)
tree08a581d8684a550faa9f5cb76dc5cab96e641f81
parentc726bd8b7b9929fd917b01e5551a66ad5fe2c04e (diff)
downloadframeworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.zip
frameworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.tar.gz
frameworks_av-a2cd44cb5067b4fe98794860690394254d3ac73c.tar.bz2
64-bit file size/offset support for DRM framework
Change-Id: I0ba7147607825234df9fa28732e1bba344e82e79
-rw-r--r--drm/common/DrmEngineBase.cpp6
-rw-r--r--drm/common/IDrmManagerService.cpp24
-rw-r--r--drm/common/ReadWriteUtils.cpp4
-rw-r--r--drm/drmserver/DrmManager.cpp6
-rw-r--r--drm/drmserver/DrmManagerService.cpp6
-rw-r--r--drm/libdrmframework/DrmManagerClient.cpp6
-rw-r--r--drm/libdrmframework/DrmManagerClientImpl.cpp6
-rw-r--r--drm/libdrmframework/include/DrmManager.h6
-rw-r--r--drm/libdrmframework/include/DrmManagerClientImpl.h6
-rw-r--r--drm/libdrmframework/include/DrmManagerService.h6
-rw-r--r--drm/libdrmframework/include/IDrmManagerService.h12
-rw-r--r--drm/libdrmframework/plugins/common/include/DrmEngineBase.h12
-rw-r--r--drm/libdrmframework/plugins/common/include/IDrmEngine.h6
-rw-r--r--drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h6
-rw-r--r--drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp6
-rw-r--r--include/drm/DrmManagerClient.h6
16 files changed, 62 insertions, 62 deletions
diff --git a/drm/common/DrmEngineBase.cpp b/drm/common/DrmEngineBase.cpp
index 10c64ee..98a9ece 100644
--- a/drm/common/DrmEngineBase.cpp
+++ b/drm/common/DrmEngineBase.cpp
@@ -80,7 +80,7 @@ status_t DrmEngineBase::consumeRights(
}
status_t DrmEngineBase::setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
return onSetPlaybackStatus(uniqueId, decryptHandle, playbackStatus, position);
}
@@ -116,7 +116,7 @@ DrmSupportInfo* DrmEngineBase::getSupportInfo(int uniqueId) {
}
status_t DrmEngineBase::openDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) {
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) {
return onOpenDecryptSession(uniqueId, decryptHandle, fd, offset, length);
}
@@ -146,7 +146,7 @@ status_t DrmEngineBase::finalizeDecryptUnit(
}
ssize_t DrmEngineBase::pread(
- int uniqueId, DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off_t offset) {
+ int uniqueId, DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off64_t offset) {
return onPread(uniqueId, decryptHandle, buffer, numBytes, offset);
}
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index c3d12f0..fca4261 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -333,7 +333,7 @@ status_t BpDrmManagerService::consumeRights(
}
status_t BpDrmManagerService::setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
LOGV("setPlaybackStatus");
Parcel data, reply;
@@ -429,7 +429,7 @@ DrmConvertedStatus* BpDrmManagerService::convertData(
if (0 != reply.dataAvail()) {
//Filling DRM Converted Status
const int statusCode = reply.readInt32();
- const int offset = reply.readInt32();
+ const off64_t offset = reply.readInt64();
DrmBuffer* convertedData = NULL;
if (0 != reply.dataAvail()) {
@@ -461,7 +461,7 @@ DrmConvertedStatus* BpDrmManagerService::closeConvertSession(int uniqueId, int c
if (0 != reply.dataAvail()) {
//Filling DRM Converted Status
const int statusCode = reply.readInt32();
- const int offset = reply.readInt32();
+ const off64_t offset = reply.readInt64();
DrmBuffer* convertedData = NULL;
if (0 != reply.dataAvail()) {
@@ -515,15 +515,15 @@ status_t BpDrmManagerService::getAllSupportInfo(
}
DecryptHandle* BpDrmManagerService::openDecryptSession(
- int uniqueId, int fd, int offset, int length) {
+ int uniqueId, int fd, off64_t offset, off64_t length) {
LOGV("Entering BpDrmManagerService::openDecryptSession");
Parcel data, reply;
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
data.writeFileDescriptor(fd);
- data.writeInt32(offset);
- data.writeInt32(length);
+ data.writeInt64(offset);
+ data.writeInt64(length);
remote()->transact(OPEN_DECRYPT_SESSION, data, &reply);
@@ -697,7 +697,7 @@ status_t BpDrmManagerService::finalizeDecryptUnit(
ssize_t BpDrmManagerService::pread(
int uniqueId, DecryptHandle* decryptHandle, void* buffer,
- ssize_t numBytes, off_t offset) {
+ ssize_t numBytes, off64_t offset) {
LOGV("read");
Parcel data, reply;
int result;
@@ -717,7 +717,7 @@ ssize_t BpDrmManagerService::pread(
}
data.writeInt32(numBytes);
- data.writeInt32(offset);
+ data.writeInt64(offset);
remote()->transact(PREAD, data, &reply);
result = reply.readInt32();
@@ -1121,7 +1121,7 @@ status_t BnDrmManagerService::onTransact(
if (NULL != drmConvertedStatus) {
//Filling Drm Converted Ststus
reply->writeInt32(drmConvertedStatus->statusCode);
- reply->writeInt32(drmConvertedStatus->offset);
+ reply->writeInt64(drmConvertedStatus->offset);
if (NULL != drmConvertedStatus->convertedData) {
const DrmBuffer* convertedData = drmConvertedStatus->convertedData;
@@ -1150,7 +1150,7 @@ status_t BnDrmManagerService::onTransact(
if (NULL != drmConvertedStatus) {
//Filling Drm Converted Ststus
reply->writeInt32(drmConvertedStatus->statusCode);
- reply->writeInt32(drmConvertedStatus->offset);
+ reply->writeInt64(drmConvertedStatus->offset);
if (NULL != drmConvertedStatus->convertedData) {
const DrmBuffer* convertedData = drmConvertedStatus->convertedData;
@@ -1210,7 +1210,7 @@ status_t BnDrmManagerService::onTransact(
const int fd = data.readFileDescriptor();
DecryptHandle* handle
- = openDecryptSession(uniqueId, fd, data.readInt32(), data.readInt32());
+ = openDecryptSession(uniqueId, fd, data.readInt64(), data.readInt64());
if (NULL != handle) {
reply->writeInt32(handle->decryptId);
@@ -1415,7 +1415,7 @@ status_t BnDrmManagerService::onTransact(
const int numBytes = data.readInt32();
char* buffer = new char[numBytes];
- const off_t offset = data.readInt32();
+ const off64_t offset = data.readInt64();
ssize_t result = pread(uniqueId, &handle, buffer, numBytes, offset);
reply->writeInt32(result);
diff --git a/drm/common/ReadWriteUtils.cpp b/drm/common/ReadWriteUtils.cpp
index 7ec4fa2..c16214e 100644
--- a/drm/common/ReadWriteUtils.cpp
+++ b/drm/common/ReadWriteUtils.cpp
@@ -42,7 +42,7 @@ String8 ReadWriteUtils::readBytes(const String8& filePath) {
struct stat sb;
if (fstat(fd, &sb) == 0 && sb.st_size > 0) {
- int length = sb.st_size;
+ off64_t length = sb.st_size;
char* bytes = new char[length];
if (length == read(fd, (void*) bytes, length)) {
string.append(bytes, length);
@@ -57,7 +57,7 @@ String8 ReadWriteUtils::readBytes(const String8& filePath) {
int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) {
FILE* file = NULL;
file = fopen(filePath.string(), "r");
- int length = 0;
+ off64_t length = 0;
if (NULL != file) {
int fd = fileno(file);
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp
index 35e62f3..8da8176 100644
--- a/drm/drmserver/DrmManager.cpp
+++ b/drm/drmserver/DrmManager.cpp
@@ -258,7 +258,7 @@ status_t DrmManager::consumeRights(
}
status_t DrmManager::setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
status_t result = DRM_ERROR_UNKNOWN;
if (mDecryptSessionMap.indexOfKey(decryptHandle->decryptId) != NAME_NOT_FOUND) {
IDrmEngine* drmEngine = mDecryptSessionMap.valueFor(decryptHandle->decryptId);
@@ -370,7 +370,7 @@ status_t DrmManager::getAllSupportInfo(
return DRM_NO_ERROR;
}
-DecryptHandle* DrmManager::openDecryptSession(int uniqueId, int fd, int offset, int length) {
+DecryptHandle* DrmManager::openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length) {
Mutex::Autolock _l(mDecryptLock);
status_t result = DRM_ERROR_CANNOT_HANDLE;
Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList();
@@ -470,7 +470,7 @@ status_t DrmManager::finalizeDecryptUnit(
}
ssize_t DrmManager::pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) {
+ void* buffer, ssize_t numBytes, off64_t offset) {
ssize_t result = DECRYPT_FILE_ERROR;
if (mDecryptSessionMap.indexOfKey(decryptHandle->decryptId) != NAME_NOT_FOUND) {
diff --git a/drm/drmserver/DrmManagerService.cpp b/drm/drmserver/DrmManagerService.cpp
index 8cf510d..efd7bae 100644
--- a/drm/drmserver/DrmManagerService.cpp
+++ b/drm/drmserver/DrmManagerService.cpp
@@ -125,7 +125,7 @@ status_t DrmManagerService::consumeRights(
}
status_t DrmManagerService::setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
LOGV("Entering setPlaybackStatus");
return mDrmManager->setPlaybackStatus(uniqueId, decryptHandle, playbackStatus, position);
}
@@ -170,7 +170,7 @@ status_t DrmManagerService::getAllSupportInfo(
}
DecryptHandle* DrmManagerService::openDecryptSession(
- int uniqueId, int fd, int offset, int length) {
+ int uniqueId, int fd, off64_t offset, off64_t length) {
LOGV("Entering DrmManagerService::openDecryptSession");
return mDrmManager->openDecryptSession(uniqueId, fd, offset, length);
}
@@ -206,7 +206,7 @@ status_t DrmManagerService::finalizeDecryptUnit(
}
ssize_t DrmManagerService::pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) {
+ void* buffer, ssize_t numBytes, off64_t offset) {
LOGV("Entering pread");
return mDrmManager->pread(uniqueId, decryptHandle, buffer, numBytes, offset);
}
diff --git a/drm/libdrmframework/DrmManagerClient.cpp b/drm/libdrmframework/DrmManagerClient.cpp
index f0439eb..0cbbbd4 100644
--- a/drm/libdrmframework/DrmManagerClient.cpp
+++ b/drm/libdrmframework/DrmManagerClient.cpp
@@ -78,7 +78,7 @@ status_t DrmManagerClient::consumeRights(DecryptHandle* decryptHandle, int actio
}
status_t DrmManagerClient::setPlaybackStatus(
- DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
return mDrmManagerClientImpl
->setPlaybackStatus(mUniqueId, decryptHandle, playbackStatus, position);
}
@@ -112,7 +112,7 @@ status_t DrmManagerClient::getAllSupportInfo(int* length, DrmSupportInfo** drmSu
return mDrmManagerClientImpl->getAllSupportInfo(mUniqueId, length, drmSupportInfoArray);
}
-DecryptHandle* DrmManagerClient::openDecryptSession(int fd, int offset, int length) {
+DecryptHandle* DrmManagerClient::openDecryptSession(int fd, off64_t offset, off64_t length) {
return mDrmManagerClientImpl->openDecryptSession(mUniqueId, fd, offset, length);
}
@@ -145,7 +145,7 @@ status_t DrmManagerClient::finalizeDecryptUnit(DecryptHandle* decryptHandle, int
}
ssize_t DrmManagerClient::pread(
- DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off_t offset) {
+ DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off64_t offset) {
Mutex::Autolock _l(mDecryptLock);
return mDrmManagerClientImpl->pread(mUniqueId, decryptHandle, buffer, numBytes, offset);
}
diff --git a/drm/libdrmframework/DrmManagerClientImpl.cpp b/drm/libdrmframework/DrmManagerClientImpl.cpp
index b3ae9a7..519ed67 100644
--- a/drm/libdrmframework/DrmManagerClientImpl.cpp
+++ b/drm/libdrmframework/DrmManagerClientImpl.cpp
@@ -170,7 +170,7 @@ status_t DrmManagerClientImpl::consumeRights(
}
status_t DrmManagerClientImpl::setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) {
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) {
status_t status = DRM_ERROR_UNKNOWN;
if (NULL != decryptHandle) {
status = getDrmManagerService()->setPlaybackStatus(
@@ -231,7 +231,7 @@ status_t DrmManagerClientImpl::getAllSupportInfo(
}
DecryptHandle* DrmManagerClientImpl::openDecryptSession(
- int uniqueId, int fd, int offset, int length) {
+ int uniqueId, int fd, off64_t offset, off64_t length) {
return getDrmManagerService()->openDecryptSession(uniqueId, fd, offset, length);
}
@@ -283,7 +283,7 @@ status_t DrmManagerClientImpl::finalizeDecryptUnit(
}
ssize_t DrmManagerClientImpl::pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) {
+ void* buffer, ssize_t numBytes, off64_t offset) {
ssize_t retCode = INVALID_VALUE;
if ((NULL != decryptHandle) && (NULL != buffer) && (0 < numBytes)) {
retCode = getDrmManagerService()->pread(uniqueId, decryptHandle, buffer, numBytes, offset);
diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h
index d782f5b..a0250b7 100644
--- a/drm/libdrmframework/include/DrmManager.h
+++ b/drm/libdrmframework/include/DrmManager.h
@@ -92,7 +92,7 @@ public:
status_t consumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve);
status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
bool validateAction(
int uniqueId, const String8& path, int action, const ActionDescription& description);
@@ -109,7 +109,7 @@ public:
status_t getAllSupportInfo(int uniqueId, int* length, DrmSupportInfo** drmSupportInfoArray);
- DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length);
+ DecryptHandle* openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length);
DecryptHandle* openDecryptSession(int uniqueId, const char* uri);
@@ -124,7 +124,7 @@ public:
status_t finalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId);
ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
void onInfo(const DrmInfoEvent& event);
diff --git a/drm/libdrmframework/include/DrmManagerClientImpl.h b/drm/libdrmframework/include/DrmManagerClientImpl.h
index 1c6be46..769f4d0 100644
--- a/drm/libdrmframework/include/DrmManagerClientImpl.h
+++ b/drm/libdrmframework/include/DrmManagerClientImpl.h
@@ -191,7 +191,7 @@ public:
* Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
*/
status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
/**
* Validates whether an action on the DRM content is allowed or not.
@@ -291,7 +291,7 @@ public:
* @return
* Handle for the decryption session
*/
- DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length);
+ DecryptHandle* openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length);
/**
* Open the decrypt session to decrypt the given protected content
@@ -369,7 +369,7 @@ public:
* @return Number of bytes read. Returns -1 for Failure.
*/
ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
/**
* Notify the event to the registered listener
diff --git a/drm/libdrmframework/include/DrmManagerService.h b/drm/libdrmframework/include/DrmManagerService.h
index 4a3aeae..4b3ba71 100644
--- a/drm/libdrmframework/include/DrmManagerService.h
+++ b/drm/libdrmframework/include/DrmManagerService.h
@@ -79,7 +79,7 @@ public:
status_t consumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve);
status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
bool validateAction(int uniqueId, const String8& path,
int action, const ActionDescription& description);
@@ -96,7 +96,7 @@ public:
status_t getAllSupportInfo(int uniqueId, int* length, DrmSupportInfo** drmSupportInfoArray);
- DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length);
+ DecryptHandle* openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length);
DecryptHandle* openDecryptSession(int uniqueId, const char* uri);
@@ -111,7 +111,7 @@ public:
status_t finalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId);
ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
private:
DrmManager* mDrmManager;
diff --git a/drm/libdrmframework/include/IDrmManagerService.h b/drm/libdrmframework/include/IDrmManagerService.h
index 1275488..20fb2ab 100644
--- a/drm/libdrmframework/include/IDrmManagerService.h
+++ b/drm/libdrmframework/include/IDrmManagerService.h
@@ -116,7 +116,7 @@ public:
int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve) = 0;
virtual status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) = 0;
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) = 0;
virtual bool validateAction(
int uniqueId, const String8& path,
@@ -136,7 +136,7 @@ public:
virtual status_t getAllSupportInfo(
int uniqueId, int* length, DrmSupportInfo** drmSupportInfoArray) = 0;
- virtual DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length) = 0;
+ virtual DecryptHandle* openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length) = 0;
virtual DecryptHandle* openDecryptSession(int uniqueId, const char* uri) = 0;
@@ -152,7 +152,7 @@ public:
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId) = 0;
virtual ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes,off_t offset) = 0;
+ void* buffer, ssize_t numBytes,off64_t offset) = 0;
};
/**
@@ -198,7 +198,7 @@ public:
int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve);
virtual status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
virtual bool validateAction(
int uniqueId, const String8& path, int action, const ActionDescription& description);
@@ -217,7 +217,7 @@ public:
virtual status_t getAllSupportInfo(
int uniqueId, int* length, DrmSupportInfo** drmSupportInfoArray);
- virtual DecryptHandle* openDecryptSession(int uniqueId, int fd, int offset, int length);
+ virtual DecryptHandle* openDecryptSession(int uniqueId, int fd, off64_t offset, off64_t length);
virtual DecryptHandle* openDecryptSession(int uniqueId, const char* uri);
@@ -233,7 +233,7 @@ public:
int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId);
virtual ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
};
/**
diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
index 5851af5..779f7ac 100644
--- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
+++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
@@ -60,7 +60,7 @@ public:
status_t consumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve);
status_t setPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
bool validateAction(
int uniqueId, const String8& path, int action, const ActionDescription& description);
@@ -78,7 +78,7 @@ public:
DrmSupportInfo* getSupportInfo(int uniqueId);
status_t openDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length);
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length);
status_t openDecryptSession(
int uniqueId, DecryptHandle* decryptHandle, const char* uri);
@@ -94,7 +94,7 @@ public:
status_t finalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId);
ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
protected:
/////////////////////////////////////////////////////
@@ -254,7 +254,7 @@ protected:
* Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
*/
virtual status_t onSetPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position) = 0;
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position) = 0;
/**
* Validates whether an action on the DRM content is allowed or not.
@@ -355,7 +355,7 @@ protected:
* DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success
*/
virtual status_t onOpenDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) = 0;
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) = 0;
/**
* Open the decrypt session to decrypt the given protected content
@@ -436,7 +436,7 @@ protected:
* @return Number of bytes read. Returns -1 for Failure.
*/
virtual ssize_t onPread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) = 0;
+ void* buffer, ssize_t numBytes, off64_t offset) = 0;
};
};
diff --git a/drm/libdrmframework/plugins/common/include/IDrmEngine.h b/drm/libdrmframework/plugins/common/include/IDrmEngine.h
index cc03ef2..28e6d8e 100644
--- a/drm/libdrmframework/plugins/common/include/IDrmEngine.h
+++ b/drm/libdrmframework/plugins/common/include/IDrmEngine.h
@@ -211,7 +211,7 @@ public:
* Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
*/
virtual status_t setPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle,
- int playbackStatus, int position) = 0;
+ int playbackStatus, int64_t position) = 0;
/**
* Validates whether an action on the DRM content is allowed or not.
@@ -312,7 +312,7 @@ public:
* DRM_ERROR_CANNOT_HANDLE for failure and DRM_NO_ERROR for success
*/
virtual status_t openDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) = 0;
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) = 0;
/**
* Open the decrypt session to decrypt the given protected content
@@ -393,7 +393,7 @@ public:
* @return Number of bytes read. Returns -1 for Failure.
*/
virtual ssize_t pread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) = 0;
+ void* buffer, ssize_t numBytes, off64_t offset) = 0;
};
};
diff --git a/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h b/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h
index ddb7fd3..9c94e73 100644
--- a/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h
+++ b/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h
@@ -54,7 +54,7 @@ protected:
status_t onConsumeRights(int uniqueId, DecryptHandle* decryptHandle, int action, bool reserve);
status_t onSetPlaybackStatus(
- int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int position);
+ int uniqueId, DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
bool onValidateAction(
int uniqueId, const String8& path, int action, const ActionDescription& description);
@@ -72,7 +72,7 @@ protected:
DrmSupportInfo* onGetSupportInfo(int uniqueId);
status_t onOpenDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length);
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length);
status_t onOpenDecryptSession(
int uniqueId, DecryptHandle* decryptHandle, const char* uri);
@@ -88,7 +88,7 @@ protected:
status_t onFinalizeDecryptUnit(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId);
ssize_t onPread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset);
+ void* buffer, ssize_t numBytes, off64_t offset);
private:
DecryptHandle* openDecryptSessionImpl();
diff --git a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
index 41f8e91..73c9708 100644
--- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
+++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
@@ -182,7 +182,7 @@ status_t DrmPassthruPlugIn::onConsumeRights(int uniqueId, DecryptHandle* decrypt
}
status_t DrmPassthruPlugIn::onSetPlaybackStatus(int uniqueId, DecryptHandle* decryptHandle,
- int playbackStatus, int position) {
+ int playbackStatus, int64_t position) {
LOGD("DrmPassthruPlugIn::onSetPlaybackStatus() : %d", uniqueId);
return DRM_NO_ERROR;
}
@@ -229,7 +229,7 @@ DrmConvertedStatus* DrmPassthruPlugIn::onCloseConvertSession(int uniqueId, int c
}
status_t DrmPassthruPlugIn::onOpenDecryptSession(
- int uniqueId, DecryptHandle* decryptHandle, int fd, int offset, int length) {
+ int uniqueId, DecryptHandle* decryptHandle, int fd, off64_t offset, off64_t length) {
LOGD("DrmPassthruPlugIn::onOpenDecryptSession() : %d", uniqueId);
#ifdef ENABLE_PASSTHRU_DECRYPTION
@@ -287,7 +287,7 @@ status_t DrmPassthruPlugIn::onFinalizeDecryptUnit(
}
ssize_t DrmPassthruPlugIn::onPread(int uniqueId, DecryptHandle* decryptHandle,
- void* buffer, ssize_t numBytes, off_t offset) {
+ void* buffer, ssize_t numBytes, off64_t offset) {
LOGD("DrmPassthruPlugIn::onPread() : %d", uniqueId);
return 0;
}
diff --git a/include/drm/DrmManagerClient.h b/include/drm/DrmManagerClient.h
index 5963c42..782ebae 100644
--- a/include/drm/DrmManagerClient.h
+++ b/include/drm/DrmManagerClient.h
@@ -65,7 +65,7 @@ public:
* @return
* Handle for the decryption session
*/
- DecryptHandle* openDecryptSession(int fd, int offset, int length);
+ DecryptHandle* openDecryptSession(int fd, off64_t offset, off64_t length);
/**
* Open the decrypt session to decrypt the given protected content
@@ -109,7 +109,7 @@ public:
* @return status_t
* Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure
*/
- status_t setPlaybackStatus(DecryptHandle* decryptHandle, int playbackStatus, int position);
+ status_t setPlaybackStatus(DecryptHandle* decryptHandle, int playbackStatus, int64_t position);
/**
* Initialize decryption for the given unit of the protected content
@@ -163,7 +163,7 @@ public:
*
* @return Number of bytes read. Returns -1 for Failure.
*/
- ssize_t pread(DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off_t offset);
+ ssize_t pread(DecryptHandle* decryptHandle, void* buffer, ssize_t numBytes, off64_t offset);
/**
* Validates whether an action on the DRM content is allowed or not.