diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-05-11 12:11:56 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2010-05-11 12:54:14 +0800 |
commit | adbda96f6a05507788bb4163d7fbe8a95948f0a5 (patch) | |
tree | b7ebd296b4ac9c9d665c36f993eae6a68b7840df | |
parent | ee7ff20e69498ebd53dd9717a0f984188341a75e (diff) | |
download | frameworks_av-adbda96f6a05507788bb4163d7fbe8a95948f0a5.zip frameworks_av-adbda96f6a05507788bb4163d7fbe8a95948f0a5.tar.gz frameworks_av-adbda96f6a05507788bb4163d7fbe8a95948f0a5.tar.bz2 |
Add remove method in CameraParameters class.
bug:2672651
Change-Id: I537c817b5ca6a3d925f22febe9a5769156354d00
-rw-r--r-- | camera/CameraParameters.cpp | 5 | ||||
-rw-r--r-- | include/camera/CameraParameters.h | 11 |
2 files changed, 7 insertions, 9 deletions
diff --git a/camera/CameraParameters.cpp b/camera/CameraParameters.cpp index b50d4d2..65fd7ac 100644 --- a/camera/CameraParameters.cpp +++ b/camera/CameraParameters.cpp @@ -253,6 +253,11 @@ float CameraParameters::getFloat(const char *key) const return strtof(v, 0); } +void CameraParameters::remove(const char *key) +{ + mMap.removeItem(String8(key)); +} + static int parse_size(const char *str, int &width, int &height) { // Find the width. diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h index 3b0e9e5..5ea83a5 100644 --- a/include/camera/CameraParameters.h +++ b/include/camera/CameraParameters.h @@ -39,23 +39,16 @@ public: int getInt(const char *key) const; float getFloat(const char *key) const; - /* preview-size=176x144 */ + void remove(const char *key); + void setPreviewSize(int width, int height); void getPreviewSize(int *width, int *height) const; - - /* preview-fps=15 */ void setPreviewFrameRate(int fps); int getPreviewFrameRate() const; - - /* preview-format=rgb565|yuv422 */ void setPreviewFormat(const char *format); const char *getPreviewFormat() const; - - /* picture-size=1024x768 */ void setPictureSize(int width, int height); void getPictureSize(int *width, int *height) const; - - /* picture-format=yuv422|jpeg */ void setPictureFormat(const char *format); const char *getPictureFormat() const; |