summaryrefslogtreecommitdiffstats
path: root/include/camera/Camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/camera/Camera.h')
-rw-r--r--include/camera/Camera.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index e734c38..e5f7e62 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -19,11 +19,10 @@
#include <utils/Timers.h>
#include <camera/ICameraClient.h>
+#include <gui/ISurfaceTexture.h>
namespace android {
-class ISurface;
-
/*
* A set of bit masks for specifying how the received preview frames are
* handled before the previewCallback() call.
@@ -96,11 +95,19 @@ enum {
// or CAMERA_MSG_COMPRESSED_IMAGE. This is not allowed to be set during
// preview.
CAMERA_CMD_SET_DISPLAY_ORIENTATION = 3,
+
+ // cmdType to disable/enable shutter sound.
+ // In sendCommand passing arg1 = 0 will disable,
+ // while passing arg1 = 1 will enable the shutter sound.
+ CAMERA_CMD_ENABLE_SHUTTER_SOUND = 4,
+
+ // cmdType to play recording sound.
+ CAMERA_CMD_PLAY_RECORDING_SOUND = 5,
};
// camera fatal errors
enum {
- CAMERA_ERROR_UKNOWN = 1,
+ CAMERA_ERROR_UNKNOWN = 1,
CAMERA_ERROR_SERVER_DIED = 100
};
@@ -166,9 +173,11 @@ public:
status_t getStatus() { return mStatus; }
- // pass the buffered ISurface to the camera service
+ // pass the buffered Surface to the camera service
status_t setPreviewDisplay(const sp<Surface>& surface);
- status_t setPreviewDisplay(const sp<ISurface>& surface);
+
+ // pass the buffered ISurfaceTexture to the camera service
+ status_t setPreviewTexture(const sp<ISurfaceTexture>& surfaceTexture);
// start preview mode, must call setPreviewDisplay first
status_t startPreview();
@@ -209,6 +218,15 @@ public:
// send command to camera driver
status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2);
+ // return the total number of available video buffers.
+ int32_t getNumberOfVideoBuffers() const;
+
+ // return the individual video buffer corresponding to the given index.
+ sp<IMemory> getVideoBuffer(int32_t index) const;
+
+ // tell camera hal to store meta data or real YUV in video buffers.
+ status_t storeMetaDataInBuffers(bool enabled);
+
void setListener(const sp<CameraListener>& listener);
void setPreviewCallbackFlags(int preview_callback_flag);