summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKiran Kumar H N <hurlisal@quicinc.com>2010-02-26 15:54:43 -0800
committercyanogen <shade@chemlab.org>2010-09-22 10:08:26 -0400
commit57495aafa6ab172c2d2cfe32ca8a4fa57f98cb9b (patch)
tree9eff5310c507ce85decc08b12af1a43753beda30 /include
parent302ee369aa6a044674bd70d11d1a8960c666d44b (diff)
downloadframeworks_base-57495aafa6ab172c2d2cfe32ca8a4fa57f98cb9b.zip
frameworks_base-57495aafa6ab172c2d2cfe32ca8a4fa57f98cb9b.tar.gz
frameworks_base-57495aafa6ab172c2d2cfe32ca8a4fa57f98cb9b.tar.bz2
Camera: Add support for getBufferInfo API
Add getBufferInfo() API which gets the recording buffer information from the HAL layer. The opencore uses this API to query the details of the recording buffers allocated by the HAL layer. Add getBufferInfo() to Stub Camera to avoid compilation error for generic/emulator builds.
Diffstat (limited to 'include')
-rw-r--r--include/camera/Camera.h5
-rw-r--r--include/camera/CameraHardwareInterface.h8
-rw-r--r--include/camera/ICamera.h4
3 files changed, 17 insertions, 0 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index 57968e3..f4a80b5 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008 HTC Inc.
+ * Copyright (C) 2010, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -127,6 +129,9 @@ public:
status_t setPreviewDisplay(const sp<Surface>& surface);
status_t setPreviewDisplay(const sp<ISurface>& surface);
+ // query the recording buffer information from HAL layer.
+ status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize);
+
// start preview mode, must call setPreviewDisplay first
status_t startPreview();
diff --git a/include/camera/CameraHardwareInterface.h b/include/camera/CameraHardwareInterface.h
index d877c74..aa40c8e 100644
--- a/include/camera/CameraHardwareInterface.h
+++ b/include/camera/CameraHardwareInterface.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2010, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,6 +127,13 @@ public:
*/
virtual status_t startPreview() = 0;
+ /**
+ * Query the recording buffer information from HAL.
+ * This is needed because the opencore expects the buffer
+ * information before starting the recording.
+ */
+ virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) = 0;
+
/**
* Only used if overlays are used for camera preview.
*/
diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h
index 6fcf9e5..e41e900 100644
--- a/include/camera/ICamera.h
+++ b/include/camera/ICamera.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2010, Code Aurora Forum. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,6 +53,9 @@ public:
// preview are handled.
virtual void setPreviewCallbackFlag(int flag) = 0;
+ // get the recording buffer information from HAL layer.
+ virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) = 0;
+
// start preview mode, must call setPreviewDisplay first
virtual status_t startPreview() = 0;