Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f355b340 authored by Wu-cheng Li's avatar Wu-cheng Li Committed by Android Git Automerger
Browse files

am 9813a3a2: am b3390135: am d8c33747: am 78624e41: Add remove method in CameraParameters class.

parents e890bec7 9813a3a2
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -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;

+5 −0
Original line number Diff line number Diff line
@@ -254,6 +254,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.