summaryrefslogtreecommitdiffstats
path: root/drm/libdrmframework/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'drm/libdrmframework/plugins')
-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--drm/libdrmframework/plugins/widevine/Android.mk27
5 files changed, 42 insertions, 15 deletions
diff --git a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
index 67b6355..b61e3d3 100644
--- a/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
+++ b/drm/libdrmframework/plugins/common/include/DrmEngineBase.h
@@ -62,7 +62,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);
@@ -80,7 +80,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);
@@ -96,7 +96,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:
/////////////////////////////////////////////////////
@@ -268,7 +268,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.
@@ -369,7 +369,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
@@ -450,7 +450,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 f839070..d05c24f 100644
--- a/drm/libdrmframework/plugins/common/include/IDrmEngine.h
+++ b/drm/libdrmframework/plugins/common/include/IDrmEngine.h
@@ -224,7 +224,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.
@@ -325,7 +325,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
@@ -406,7 +406,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 bbcd9ed..f941f70 100644
--- a/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h
+++ b/drm/libdrmframework/plugins/passthru/include/DrmPassthruPlugIn.h
@@ -56,7 +56,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);
@@ -74,7 +74,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);
@@ -90,7 +90,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 dee1fdb..976978f 100644
--- a/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
+++ b/drm/libdrmframework/plugins/passthru/src/DrmPassthruPlugIn.cpp
@@ -187,7 +187,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;
}
@@ -234,7 +234,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
@@ -292,7 +292,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/drm/libdrmframework/plugins/widevine/Android.mk b/drm/libdrmframework/plugins/widevine/Android.mk
new file mode 100644
index 0000000..2c388da
--- /dev/null
+++ b/drm/libdrmframework/plugins/widevine/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libdrmwvmplugin
+
+LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/drm/plugins/native
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)