From 108dddf924d714c811dd565b8f4c7a0178cca2f2 Mon Sep 17 00:00:00 2001 From: Iliyan Malchev Date: Mon, 28 Mar 2011 16:10:12 -0700 Subject: frameworks/base: some camera-interface cleanup Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct image_rect_struct are no longer used (instead, the necessary information is passed through ANativeWindow.) Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb Signed-off-by: Iliyan Malchev --- include/camera/Camera.h | 6 ---- include/camera/CameraHardwareInterface.h | 54 -------------------------------- include/camera/ICamera.h | 6 ---- 3 files changed, 66 deletions(-) (limited to 'include/camera') diff --git a/include/camera/Camera.h b/include/camera/Camera.h index f3c8f64..3c6dccc 100644 --- a/include/camera/Camera.h +++ b/include/camera/Camera.h @@ -219,12 +219,6 @@ 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 getVideoBuffer(int32_t index) const; - // tell camera hal to store meta data or real YUV in video buffers. status_t storeMetaDataInBuffers(bool enabled); diff --git a/include/camera/CameraHardwareInterface.h b/include/camera/CameraHardwareInterface.h index 86bd849..3f34120 100644 --- a/include/camera/CameraHardwareInterface.h +++ b/include/camera/CameraHardwareInterface.h @@ -28,16 +28,6 @@ namespace android { -/** - * The size of image for display. - */ -typedef struct image_rect_struct -{ - uint32_t width; /* Image width */ - uint32_t height; /* Image height */ -} image_rect_type; - - typedef void (*notify_callback)(int32_t msgType, int32_t ext1, int32_t ext2, @@ -90,9 +80,6 @@ public: /** Set the ANativeWindow to which preview frames are sent */ virtual status_t setPreviewWindow(const sp& buf) = 0; - /** Return the IMemoryHeap for the raw image heap */ - virtual sp getRawHeap() const = 0; - /** Set the notification and data callbacks */ virtual void setCallbacks(notify_callback notify_cb, data_callback data_cb, @@ -145,47 +132,6 @@ public: virtual bool previewEnabled() = 0; /** - * Retrieve the total number of available buffers from camera hal for passing - * video frame data in a recording session. Must be called again if a new - * recording session is started. - * - * This method should be called after startRecording(), since - * the some camera hal may choose to allocate the video buffers only after - * recording is started. - * - * Some camera hal may not implement this method, and 0 can be returned to - * indicate that this feature is not available. - * - * @return the number of video buffers that camera hal makes available. - * Zero (0) is returned to indicate that camera hal does not support - * this feature. - */ - virtual int32_t getNumberOfVideoBuffers() const { return 0; } - - /** - * Retrieve the video buffer corresponding to the given index in a - * recording session. Must be called again if a new recording session - * is started. - * - * It allows a client to retrieve all video buffers that camera hal makes - * available to passing video frame data by calling this method with all - * valid index values. The valid index value ranges from 0 to n, where - * n = getNumberOfVideoBuffers() - 1. With an index outside of the valid - * range, 0 must be returned. This method should be called after - * startRecording(). - * - * The video buffers should NOT be modified/released by camera hal - * until stopRecording() is called and all outstanding video buffers - * previously sent out via CAMERA_MSG_VIDEO_FRAME have been released - * via releaseVideoBuffer(). - * - * @param index an index to retrieve the corresponding video buffer. - * - * @return the video buffer corresponding to the given index. - */ - virtual sp getVideoBuffer(int32_t index) const { return 0; } - - /** * Request the camera hal to store meta data or real YUV data in * the video buffers send out via CAMERA_MSG_VIDEO_FRRAME for a * recording session. If it is not called, the default camera diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h index 2344b3f..400d7f4 100644 --- a/include/camera/ICamera.h +++ b/include/camera/ICamera.h @@ -102,12 +102,6 @@ public: // send command to camera driver virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) = 0; - // return the total number of available video buffers - virtual int32_t getNumberOfVideoBuffers() const = 0; - - // return the individual video buffer corresponding to the given index. - virtual sp getVideoBuffer(int32_t index) const = 0; - // tell the camera hal to store meta data or real YUV data in video buffers. virtual status_t storeMetaDataInBuffers(bool enabled) = 0; }; -- cgit v1.1