diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/camera/CameraParameters.h | 238 | ||||
-rw-r--r-- | include/media/MediaProfiles.h | 9 | ||||
-rw-r--r-- | include/media/mediarecorder.h | 3 |
3 files changed, 247 insertions, 3 deletions
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h index c4c2f09..b6d1582 100644 --- a/include/camera/CameraParameters.h +++ b/include/camera/CameraParameters.h @@ -36,7 +36,21 @@ struct Size { height = h; } }; - +#ifdef QCOM_HARDWARE +struct FPSRange{ + int minFPS; + int maxFPS; + + FPSRange(){ + minFPS=0; + maxFPS=0; + }; + FPSRange(int min,int max){ + minFPS=min; + maxFPS=max; + }; +}; +#endif class CameraParameters { public: @@ -91,6 +105,10 @@ public: void setPreviewFrameRate(int fps); int getPreviewFrameRate() const; void getPreviewFpsRange(int *min_fps, int *max_fps) const; +#ifdef QCOM_HARDWARE + void setPreviewFrameRateMode(const char *mode); + const char *getPreviewFrameRateMode() const; +#endif void setPreviewFormat(const char *format); const char *getPreviewFormat() const; void setPictureSize(int width, int height); @@ -98,6 +116,14 @@ public: void getSupportedPictureSizes(Vector<Size> &sizes) const; void setPictureFormat(const char *format); const char *getPictureFormat() const; +#ifdef QCOM_HARDWARE + void setTouchIndexAec(int x, int y); + void getTouchIndexAec(int *x, int *y) const; + void setTouchIndexAf(int x, int y); + void getTouchIndexAf(int *x, int *y) const; +#endif + + void getMeteringAreaCenter(int * x, int *y) const; void dump() const; status_t dump(int fd, const Vector<String16>& args) const; @@ -112,6 +138,11 @@ public: // Supported preview frame sizes in pixels. // Example value: "800x600,480x320". Read only. static const char KEY_SUPPORTED_PREVIEW_SIZES[]; +#ifdef QCOM_HARDWARE + // Supported PREVIEW/RECORDING SIZES IN HIGH FRAME RATE recording, sizes in pixels. + // Example value: "800x480,432x320". Read only. + static const char KEY_SUPPORTED_HFR_SIZES[]; +#endif // The current minimum and maximum preview fps. This controls the rate of // preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and // maximum fps must be one of the elements from @@ -141,6 +172,14 @@ public: // Supported number of preview frames per second. // Example value: "24,15,10". Read. static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[]; +#ifdef QCOM_HARDWARE + // The mode of preview frame rate. + // Example value: "frame-rate-auto, frame-rate-fixed". + static const char KEY_PREVIEW_FRAME_RATE_MODE[]; + static const char KEY_SUPPORTED_PREVIEW_FRAME_RATE_MODES[]; + static const char KEY_PREVIEW_FRAME_RATE_AUTO_MODE[]; + static const char KEY_PREVIEW_FRAME_RATE_FIXED_MODE[]; +#endif // The dimensions for captured pictures in pixels (width x height). // Example value: "1024x768". Read/write. static const char KEY_PICTURE_SIZE[]; @@ -203,6 +242,12 @@ public: // header. // Example value: "21.0" or "-5". Write only. static const char KEY_GPS_ALTITUDE[]; + +#ifdef QCOM_HARDWARE + static const char KEY_SKIN_TONE_ENHANCEMENT[] ; + static const char KEY_SUPPORTED_SKIN_TONE_ENHANCEMENT_MODES[] ; +#endif + // GPS timestamp (UTC in seconds since January 1, 1970). This should be // stored in JPEG EXIF header. // Example value: "1251192757". Write only. @@ -222,6 +267,15 @@ public: // Supported color effect settings. // Example value: "none,mono,sepia". Read only. static const char KEY_SUPPORTED_EFFECTS[]; +#ifdef QCOM_HARDWARE + //Touch Af/AEC settings. + static const char KEY_TOUCH_AF_AEC[]; + static const char KEY_SUPPORTED_TOUCH_AF_AEC[]; + //Touch Index for AEC. + static const char KEY_TOUCH_INDEX_AEC[]; + //Touch Index for AF. + static const char KEY_TOUCH_INDEX_AF[]; +#endif // Current antibanding setting. // Example value: "auto" or ANTIBANDING_XXX constants. Read/write. static const char KEY_ANTIBANDING[]; @@ -234,6 +288,14 @@ public: // Supported scene mode settings. // Example value: "auto,night,fireworks". Read only. static const char KEY_SUPPORTED_SCENE_MODES[]; +#ifdef QCOM_HARDWARE + // Current auto scene detection mode. + // Example value: "off" or SCENE_DETECT_XXX constants. Read/write. + static const char KEY_SCENE_DETECT[]; + // Supported auto scene detection settings. + // Example value: "off,backlight,snow/cloudy". Read only. + static const char KEY_SUPPORTED_SCENE_DETECT[]; +#endif // Current flash mode. // Example value: "auto" or FLASH_MODE_XXX constants. Read/write. static const char KEY_FLASH_MODE[]; @@ -505,6 +567,23 @@ public: // captured pictures. // Example value: "true" or "false". Read only. static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[]; + static const char KEY_FULL_VIDEO_SNAP_SUPPORTED[]; + +#ifdef QCOM_HARDWARE + static const char KEY_ISO_MODE[]; + static const char KEY_SUPPORTED_ISO_MODES[]; + static const char KEY_LENSSHADE[] ; + static const char KEY_SUPPORTED_LENSSHADE_MODES[] ; + + static const char KEY_AUTO_EXPOSURE[]; + static const char KEY_SUPPORTED_AUTO_EXPOSURE[]; + + static const char KEY_GPS_LATITUDE_REF[]; + static const char KEY_GPS_LONGITUDE_REF[]; + static const char KEY_GPS_ALTITUDE_REF[]; + static const char KEY_GPS_STATUS[]; + static const char KEY_EXIF_DATETIME[]; +#endif // The state of the video stabilization. If set to true, both the // preview stream and the recorded video stream are stabilized by @@ -520,6 +599,20 @@ public: // has no effect on still image capture. static const char KEY_VIDEO_STABILIZATION[]; +#ifdef QCOM_HARDWARE + static const char KEY_MEMORY_COLOR_ENHANCEMENT[]; + static const char KEY_SUPPORTED_MEM_COLOR_ENHANCE_MODES[]; + + static const char KEY_ZSL[]; + static const char KEY_SUPPORTED_ZSL_MODES[]; + + static const char KEY_CAMERA_MODE[]; + + static const char KEY_VIDEO_HIGH_FRAME_RATE[]; + static const char KEY_SUPPORTED_VIDEO_HIGH_FRAME_RATE_MODES[]; + static const char KEY_HIGH_DYNAMIC_RANGE_IMAGING[]; + static const char KEY_SUPPORTED_HDR_IMAGING_MODES[]; +#endif // Returns true if video stabilization is supported. That is, applications // can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview // stream and record stabilized videos. @@ -536,6 +629,7 @@ public: static const char KEY_WDR[]; static const char KEY_WEATHER[]; #endif + static const char KEY_AE_BRACKET_HDR[]; // Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED. static const char TRUE[]; @@ -544,6 +638,24 @@ public: // Value for KEY_FOCUS_DISTANCES. static const char FOCUS_DISTANCE_INFINITY[]; +#ifdef QCOM_HARDWARE + // DENOISE + static const char KEY_DENOISE[]; + static const char KEY_SUPPORTED_DENOISE[]; + + //Selectable zone AF. + static const char KEY_SELECTABLE_ZONE_AF[]; + static const char KEY_SUPPORTED_SELECTABLE_ZONE_AF[]; + + //Face Detection + static const char KEY_FACE_DETECTION[]; + static const char KEY_SUPPORTED_FACE_DETECTION[]; + + //Redeye Reduction + static const char KEY_REDEYE_REDUCTION[]; + static const char KEY_SUPPORTED_REDEYE_REDUCTION[]; +#endif + // Values for white balance settings. static const char WHITE_BALANCE_AUTO[]; static const char WHITE_BALANCE_INCANDESCENT[]; @@ -564,6 +676,15 @@ public: static const char EFFECT_WHITEBOARD[]; static const char EFFECT_BLACKBOARD[]; static const char EFFECT_AQUA[]; +#ifdef QCOM_HARDWARE + static const char EFFECT_EMBOSS[]; + static const char EFFECT_SKETCH[]; + static const char EFFECT_NEON[]; + + // Values for Touch AF/AEC + static const char TOUCH_AF_AEC_OFF[] ; + static const char TOUCH_AF_AEC_ON[] ; +#endif // Values for antibanding settings. static const char ANTIBANDING_AUTO[]; @@ -588,6 +709,7 @@ public: // Values for scene mode settings. static const char SCENE_MODE_AUTO[]; + static const char SCENE_MODE_ASD[]; static const char SCENE_MODE_ACTION[]; static const char SCENE_MODE_PORTRAIT[]; static const char SCENE_MODE_LANDSCAPE[]; @@ -602,6 +724,11 @@ public: static const char SCENE_MODE_SPORTS[]; static const char SCENE_MODE_PARTY[]; static const char SCENE_MODE_CANDLELIGHT[]; +#ifdef QCOM_HARDWARE + static const char SCENE_MODE_BACKLIGHT[]; + static const char SCENE_MODE_FLOWERS[]; + static const char SCENE_MODE_AR[]; +#endif // Applications are looking for a barcode. Camera driver will be optimized // for barcode reading. static const char SCENE_MODE_BARCODE[]; @@ -612,8 +739,15 @@ public: // Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT, // and KEY_VIDEO_FRAME_FORMAT +#ifdef QCOM_HARDWARE + static const char SCENE_DETECT_OFF[]; + static const char SCENE_DETECT_ON[]; +#endif static const char PIXEL_FORMAT_YUV422SP[]; static const char PIXEL_FORMAT_YUV420SP[]; // NV21 +#ifdef QCOM_HARDWARE + static const char PIXEL_FORMAT_YUV420SP_ADRENO[]; // ADRENO +#endif static const char PIXEL_FORMAT_YUV422I[]; // YUY2 static const char PIXEL_FORMAT_YUV420P[]; // YV12 static const char PIXEL_FORMAT_RGB565[]; @@ -622,9 +756,16 @@ public: // Raw bayer format used for images, which is 10 bit precision samples // stored in 16 bit words. The filter pattern is RGGB. static const char PIXEL_FORMAT_BAYER_RGGB[]; + // Pixel format is not known to the framework static const char PIXEL_FORMAT_ANDROID_OPAQUE[]; +#ifdef QCOM_HARDWARE + static const char PIXEL_FORMAT_RAW[]; + static const char PIXEL_FORMAT_YV12[]; // NV21 + static const char PIXEL_FORMAT_NV12[]; //NV12 +#endif + // Values for focus mode settings. // Auto-focus mode. Applications should call // CameraHardwareInterface.autoFocus to start the focus in this mode. @@ -676,6 +817,101 @@ public: // other modes. static const char FOCUS_MODE_CONTINUOUS_PICTURE[]; +#ifdef QCOM_HARDWARE + // Normal focus mode. Applications should call + // CameraHardwareInterface.autoFocus to start the focus in this mode. + static const char FOCUS_MODE_NORMAL[]; + static const char ISO_AUTO[]; + static const char ISO_HJR[] ; + static const char ISO_100[]; + static const char ISO_200[] ; + static const char ISO_400[]; + static const char ISO_800[]; + static const char ISO_1600[]; + // Values for Lens Shading + static const char LENSSHADE_ENABLE[] ; + static const char LENSSHADE_DISABLE[] ; + + // Values for auto exposure settings. + static const char AUTO_EXPOSURE_FRAME_AVG[]; + static const char AUTO_EXPOSURE_CENTER_WEIGHTED[]; + static const char AUTO_EXPOSURE_SPOT_METERING[]; + + static const char KEY_SHARPNESS[]; + static const char KEY_MAX_SHARPNESS[]; + static const char KEY_CONTRAST[]; + static const char KEY_MAX_CONTRAST[]; + static const char KEY_SATURATION[]; + static const char KEY_MAX_SATURATION[]; + + static const char KEY_HISTOGRAM[] ; + static const char KEY_SUPPORTED_HISTOGRAM_MODES[] ; + // Values for HISTOGRAM + static const char HISTOGRAM_ENABLE[] ; + static const char HISTOGRAM_DISABLE[] ; + + // Values for SKIN TONE ENHANCEMENT + static const char SKIN_TONE_ENHANCEMENT_ENABLE[] ; + static const char SKIN_TONE_ENHANCEMENT_DISABLE[] ; + + // Values for Denoise + static const char DENOISE_OFF[] ; + static const char DENOISE_ON[] ; + + // Values for auto exposure settings. + static const char SELECTABLE_ZONE_AF_AUTO[]; + static const char SELECTABLE_ZONE_AF_SPOT_METERING[]; + static const char SELECTABLE_ZONE_AF_CENTER_WEIGHTED[]; + static const char SELECTABLE_ZONE_AF_FRAME_AVERAGE[]; + + // Values for Face Detection settings. + static const char FACE_DETECTION_OFF[]; + static const char FACE_DETECTION_ON[]; + + // Values for MCE settings. + static const char MCE_ENABLE[]; + static const char MCE_DISABLE[]; + + // Values for ZSL settings. + static const char ZSL_OFF[]; + static const char ZSL_ON[]; + + // Values for HDR Bracketing settings. + static const char AE_BRACKET_HDR_OFF[]; + static const char AE_BRACKET_HDR[]; + static const char AE_BRACKET[]; + + // Values for HFR settings. + static const char VIDEO_HFR_OFF[]; + static const char VIDEO_HFR_2X[]; + static const char VIDEO_HFR_3X[]; + static const char VIDEO_HFR_4X[]; + + // Values for Redeye Reduction settings. + static const char REDEYE_REDUCTION_ENABLE[]; + static const char REDEYE_REDUCTION_DISABLE[]; + // Values for HDR settings. + static const char HDR_ENABLE[]; + static const char HDR_DISABLE[]; + + // Values for Redeye Reduction settings. + // static const char REDEYE_REDUCTION_ENABLE[]; + // static const char REDEYE_REDUCTION_DISABLE[]; + // Values for HDR settings. + // static const char HDR_ENABLE[]; + // static const char HDR_DISABLE[]; + + enum { + CAMERA_ORIENTATION_UNKNOWN = 0, + CAMERA_ORIENTATION_PORTRAIT = 1, + CAMERA_ORIENTATION_LANDSCAPE = 2, + }; + int getOrientation() const; + void setOrientation(int orientation); + void setPreviewFpsRange(int minFPS,int maxFPS); + void getSupportedHfrSizes(Vector<Size> &sizes) const; +#endif + private: DefaultKeyedVector<String8,String8> mMap; }; diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h index 9fc962c..60d6bef 100644 --- a/include/media/MediaProfiles.h +++ b/include/media/MediaProfiles.h @@ -32,8 +32,13 @@ enum camcorder_quality { CAMCORDER_QUALITY_480P = 4, CAMCORDER_QUALITY_720P = 5, CAMCORDER_QUALITY_1080P = 6, - CAMCORDER_QUALITY_QVGA = 7, - CAMCORDER_QUALITY_LIST_END = 7, + CAMCORDER_QUALITY_QVGA = 11, + CAMCORDER_QUALITY_FWVGA = 7, + CAMCORDER_QUALITY_WVGA = 8, + CAMCORDER_QUALITY_VGA = 9, + CAMCORDER_QUALITY_WQVGA = 10, + + CAMCORDER_QUALITY_LIST_END = 11, CAMCORDER_QUALITY_TIME_LAPSE_LIST_START = 1000, CAMCORDER_QUALITY_TIME_LAPSE_LOW = 1000, diff --git a/include/media/mediarecorder.h b/include/media/mediarecorder.h index 6d304e0..3c2e700 100644 --- a/include/media/mediarecorder.h +++ b/include/media/mediarecorder.h @@ -118,6 +118,9 @@ enum media_recorder_event_type { MEDIA_RECORDER_EVENT_LIST_START = 1, MEDIA_RECORDER_EVENT_ERROR = 1, MEDIA_RECORDER_EVENT_INFO = 2, +#ifdef QCOM_HARDWARE + MEDIA_RECORDER_MSG_COMPRESSED_IMAGE = 8, // mzhu: TODO, where to put this? +#endif MEDIA_RECORDER_EVENT_LIST_END = 99, // Track related event types |