summaryrefslogtreecommitdiff
path: root/camera/CameraUtils.cpp
diff options
context:
space:
mode:
authorChien-Yu Chen <cychen@google.com>2016-04-28 12:11:20 -0700
committerChien-Yu Chen <cychen@google.com>2016-04-29 17:27:30 -0700
commit2d13b1d3eeaba31d8c15acc6037fd68b150a9a66 (patch)
tree697328a5049f2f91ff6cf30a7ae7ae7bf5adc1b0 /camera/CameraUtils.cpp
parentc5e8b6b792abd029e3f7fedf0ca2f705d6c8d222 (diff)
Camera: Fix passing video native handle for 64-bit app
Add new binder calls to pass video native handle so the video native handle can be passed between 32-bit and 64-bit processes. Remove problematic code that used IMemory to pass video native handle because the sizes of VideoNativeMetadata are different in 32-bit and 64-bit processes. Bug: 28403412 Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
Diffstat (limited to 'camera/CameraUtils.cpp')
-rw-r--r--camera/CameraUtils.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/camera/CameraUtils.cpp b/camera/CameraUtils.cpp
index 26eebe3883..1676be1715 100644
--- a/camera/CameraUtils.cpp
+++ b/camera/CameraUtils.cpp
@@ -122,19 +122,4 @@ status_t CameraUtils::getRotationTransform(const CameraMetadata& staticInfo,
return OK;
}
-// Return whether the image data contains a native handle.
-bool CameraUtils::isNativeHandleMetadata(const sp<IMemory>& imageData) {
- if (imageData == nullptr) {
- return false;
- }
-
- if (imageData->size() == sizeof(VideoNativeHandleMetadata)) {
- VideoNativeHandleMetadata *metadata =
- (VideoNativeHandleMetadata*)(imageData->pointer());
- return metadata->eType == kMetadataBufferTypeNativeHandleSource;
- }
-
- return false;
-}
-
} /* namespace android */