* @brief Enumeration for the error codes of Camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- CAMERA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- CAMERA_ERROR_INVALID_STATE = CAMERA_ERROR_CLASS | 0x02, /**< Invalid state */
- CAMERA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- CAMERA_ERROR_DEVICE = CAMERA_ERROR_CLASS | 0x04, /**< Device error */
- CAMERA_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Internal error */
- CAMERA_ERROR_SOUND_POLICY = CAMERA_ERROR_CLASS | 0x06, /**< Blocked by Audio Session Manager (Deprecated since 3.0) */
- CAMERA_ERROR_SECURITY_RESTRICTED = CAMERA_ERROR_CLASS | 0x07, /**< Restricted by security system policy */
- CAMERA_ERROR_DEVICE_BUSY = CAMERA_ERROR_CLASS | 0x08, /**< The device is using another application or working on some operation */
- CAMERA_ERROR_DEVICE_NOT_FOUND = CAMERA_ERROR_CLASS | 0x09, /**< No camera device */
- CAMERA_ERROR_SOUND_POLICY_BY_CALL = CAMERA_ERROR_CLASS | 0x0a, /**< Blocked by Audio Session Manager - CALL (Deprecated since 3.0) */
- CAMERA_ERROR_SOUND_POLICY_BY_ALARM = CAMERA_ERROR_CLASS | 0x0b, /**< Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) */
- CAMERA_ERROR_ESD = CAMERA_ERROR_CLASS | 0x0c, /**< ESD situation */
- CAMERA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted*/
- CAMERA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
- CAMERA_ERROR_RESOURCE_CONFLICT = CAMERA_ERROR_CLASS | 0x0d, /**< Blocked by resource conflict (Since 3.0) */
+typedef enum {
+ CAMERA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ CAMERA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ CAMERA_ERROR_INVALID_STATE = CAMERA_ERROR_CLASS | 0x02, /**< Invalid state */
+ CAMERA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ CAMERA_ERROR_DEVICE = CAMERA_ERROR_CLASS | 0x04, /**< Device error */
+ CAMERA_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Internal error */
+ CAMERA_ERROR_SOUND_POLICY = CAMERA_ERROR_CLASS | 0x06, /**< Blocked by Audio Session Manager (Deprecated since 3.0) */
+ CAMERA_ERROR_SECURITY_RESTRICTED = CAMERA_ERROR_CLASS | 0x07, /**< Restricted by security system policy */
+ CAMERA_ERROR_DEVICE_BUSY = CAMERA_ERROR_CLASS | 0x08, /**< The device is using another application or working on some operation */
+ CAMERA_ERROR_DEVICE_NOT_FOUND = CAMERA_ERROR_CLASS | 0x09, /**< No camera device */
+ CAMERA_ERROR_SOUND_POLICY_BY_CALL = CAMERA_ERROR_CLASS | 0x0a, /**< Blocked by Audio Session Manager - CALL (Deprecated since 3.0) */
+ CAMERA_ERROR_SOUND_POLICY_BY_ALARM = CAMERA_ERROR_CLASS | 0x0b, /**< Blocked by Audio Session Manager - ALARM (Deprecated since 3.0) */
+ CAMERA_ERROR_ESD = CAMERA_ERROR_CLASS | 0x0c, /**< ESD situation */
+ CAMERA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted*/
+ CAMERA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
+ CAMERA_ERROR_RESOURCE_CONFLICT = CAMERA_ERROR_CLASS | 0x0d, /**< Blocked by resource conflict (Since 3.0) */
} camera_error_e;
/**
* @brief Enumeration for the camera state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_STATE_NONE, /**< Before creating */
- CAMERA_STATE_CREATED, /**< Created, but not initialized yet */
- CAMERA_STATE_PREVIEW, /**< Preview */
- CAMERA_STATE_CAPTURING, /**< While capturing */
- CAMERA_STATE_CAPTURED /**< After capturing */
+typedef enum {
+ CAMERA_STATE_NONE, /**< Before creating */
+ CAMERA_STATE_CREATED, /**< Created, but not initialized yet */
+ CAMERA_STATE_PREVIEW, /**< Preview */
+ CAMERA_STATE_CAPTURING, /**< While capturing */
+ CAMERA_STATE_CAPTURED /**< After capturing */
} camera_state_e;
/**
* @brief Enumeration for the camera device.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
- CAMERA_DEVICE_CAMERA1 /**< Secondary camera */
+typedef enum {
+ CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
+ CAMERA_DEVICE_CAMERA1 /**< Secondary camera */
} camera_device_e;
/**
* @brief Enumeration for the camera pixel format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_PIXEL_FORMAT_INVALID = -1, /**< Invalid pixel format */
CAMERA_PIXEL_FORMAT_NV12, /**< NV12 pixel format */
CAMERA_PIXEL_FORMAT_NV12T, /**< NV12 Tiled pixel format */
* @brief Enumeration for the camera display type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_DISPLAY_TYPE_OVERLAY = 0, /**< Overlay surface display */
CAMERA_DISPLAY_TYPE_EVAS, /**< Evas object surface display */
CAMERA_DISPLAY_TYPE_NONE, /**< This disposes off buffers */
* @brief Enumeration for the camera policy.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_POLICY_NONE = 0, /**< None */
CAMERA_POLICY_SOUND, /**< Sound policy (Deprecated since 3.0) */
CAMERA_POLICY_SOUND_BY_CALL, /**< Sound policy by CALL (Deprecated since 3.0) */
* @brief Enumeration for the camera rotation type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_ROTATION_NONE, /**< No rotation */
CAMERA_ROTATION_90, /**< 90 degree rotation */
CAMERA_ROTATION_180, /**< 180 degree rotation */
* @brief Enumeration for the camera flip type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_FLIP_NONE, /**< No Flip */
CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
CAMERA_FLIP_VERTICAL, /**< Vertical flip */
* @brief Enumeration for the camera focus state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
- CAMERA_FOCUS_STATE_ONGOING, /**< Focus in progress */
- CAMERA_FOCUS_STATE_FOCUSED, /**< Focus succeeded */
- CAMERA_FOCUS_STATE_FAILED, /**< Focus failed */
+typedef enum {
+ CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
+ CAMERA_FOCUS_STATE_ONGOING, /**< Focus in progress */
+ CAMERA_FOCUS_STATE_FOCUSED, /**< Focus succeeded */
+ CAMERA_FOCUS_STATE_FAILED, /**< Focus failed */
} camera_focus_state_e;
/**
* @brief The structure type of the image data.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
- typedef struct
-{
+typedef struct {
unsigned char *data; /**< The image buffer */
unsigned int size; /**< The size of the buffer */
int width; /**< The width of the image */
* @brief The structure type for face detection.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef struct
-{
+typedef struct {
int id; /**< The ID of each face */
int score; /**< The confidence level for the detection of the face */
int x; /**< The x coordinates of the face */
* @brief The structure type to preview stream data.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef struct
-{
+typedef struct {
camera_pixel_format_e format; /**< The format of the frame pixel */
int width; /**< The width of the frame */
int height; /**< The height of the frame */
* @brief Gets a display handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-#define GET_DISPLAY(x) (void*)(x)
+#define GET_DISPLAY(x) (void *)(x)
#endif
* @brief Enumeration for the camera display mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_DISPLAY_MODE_LETTER_BOX = 0, /**< Letter box */
CAMERA_DISPLAY_MODE_ORIGIN_SIZE, /**< Origin size */
CAMERA_DISPLAY_MODE_FULL, /**< Full screen */
* @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_EFFECT_NONE = 0, /**< None */
- CAMERA_ATTR_EFFECT_MONO, /**< Mono */
- CAMERA_ATTR_EFFECT_SEPIA, /**< Sepia */
- CAMERA_ATTR_EFFECT_NEGATIVE, /**< Negative */
- CAMERA_ATTR_EFFECT_BLUE, /**< Blue */
- CAMERA_ATTR_EFFECT_GREEN, /**< Green */
- CAMERA_ATTR_EFFECT_AQUA, /**< Aqua */
- CAMERA_ATTR_EFFECT_VIOLET, /**< Violet */
- CAMERA_ATTR_EFFECT_ORANGE, /**< Orange */
- CAMERA_ATTR_EFFECT_GRAY, /**< Gray */
- CAMERA_ATTR_EFFECT_RED, /**< Red */
- CAMERA_ATTR_EFFECT_ANTIQUE, /**< Antique */
- CAMERA_ATTR_EFFECT_WARM, /**< Warm */
- CAMERA_ATTR_EFFECT_PINK, /**< Pink */
- CAMERA_ATTR_EFFECT_YELLOW, /**< Yellow */
- CAMERA_ATTR_EFFECT_PURPLE, /**< Purple */
- CAMERA_ATTR_EFFECT_EMBOSS, /**< Emboss */
- CAMERA_ATTR_EFFECT_OUTLINE, /**< Outline */
- CAMERA_ATTR_EFFECT_SOLARIZATION, /**< Solarization */
- CAMERA_ATTR_EFFECT_SKETCH, /**< Sketch */
- CAMERA_ATTR_EFFECT_WASHED, /**< Washed */
- CAMERA_ATTR_EFFECT_VINTAGE_WARM, /**< Vintage warm */
- CAMERA_ATTR_EFFECT_VINTAGE_COLD, /**< Vintage cold */
- CAMERA_ATTR_EFFECT_POSTERIZATION, /**< Posterization */
- CAMERA_ATTR_EFFECT_CARTOON, /**< Cartoon */
- CAMERA_ATTR_EFFECT_SELECTIVE_RED, /**< Selective color - Red */
- CAMERA_ATTR_EFFECT_SELECTIVE_GREEN, /**< Selective color - Green */
- CAMERA_ATTR_EFFECT_SELECTIVE_BLUE, /**< Selective color - Blue */
- CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW, /**< Selective color - Yellow */
- CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW, /**< Selective color - Red and Yellow */
- CAMERA_ATTR_EFFECT_OTHER_GRAPHICS, /**< Other Graphic effects */
+typedef enum {
+ CAMERA_ATTR_EFFECT_NONE = 0, /**< None */
+ CAMERA_ATTR_EFFECT_MONO, /**< Mono */
+ CAMERA_ATTR_EFFECT_SEPIA, /**< Sepia */
+ CAMERA_ATTR_EFFECT_NEGATIVE, /**< Negative */
+ CAMERA_ATTR_EFFECT_BLUE, /**< Blue */
+ CAMERA_ATTR_EFFECT_GREEN, /**< Green */
+ CAMERA_ATTR_EFFECT_AQUA, /**< Aqua */
+ CAMERA_ATTR_EFFECT_VIOLET, /**< Violet */
+ CAMERA_ATTR_EFFECT_ORANGE, /**< Orange */
+ CAMERA_ATTR_EFFECT_GRAY, /**< Gray */
+ CAMERA_ATTR_EFFECT_RED, /**< Red */
+ CAMERA_ATTR_EFFECT_ANTIQUE, /**< Antique */
+ CAMERA_ATTR_EFFECT_WARM, /**< Warm */
+ CAMERA_ATTR_EFFECT_PINK, /**< Pink */
+ CAMERA_ATTR_EFFECT_YELLOW, /**< Yellow */
+ CAMERA_ATTR_EFFECT_PURPLE, /**< Purple */
+ CAMERA_ATTR_EFFECT_EMBOSS, /**< Emboss */
+ CAMERA_ATTR_EFFECT_OUTLINE, /**< Outline */
+ CAMERA_ATTR_EFFECT_SOLARIZATION, /**< Solarization */
+ CAMERA_ATTR_EFFECT_SKETCH, /**< Sketch */
+ CAMERA_ATTR_EFFECT_WASHED, /**< Washed */
+ CAMERA_ATTR_EFFECT_VINTAGE_WARM, /**< Vintage warm */
+ CAMERA_ATTR_EFFECT_VINTAGE_COLD, /**< Vintage cold */
+ CAMERA_ATTR_EFFECT_POSTERIZATION, /**< Posterization */
+ CAMERA_ATTR_EFFECT_CARTOON, /**< Cartoon */
+ CAMERA_ATTR_EFFECT_SELECTIVE_RED, /**< Selective color - Red */
+ CAMERA_ATTR_EFFECT_SELECTIVE_GREEN, /**< Selective color - Green */
+ CAMERA_ATTR_EFFECT_SELECTIVE_BLUE, /**< Selective color - Blue */
+ CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW, /**< Selective color - Yellow */
+ CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW, /**< Selective color - Red and Yellow */
+ CAMERA_ATTR_EFFECT_OTHER_GRAPHICS, /**< Other Graphic effects */
} camera_attr_effect_mode_e;
/**
* @brief Enumeration for the white balance levels of the camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_WHITE_BALANCE_NONE = 0, /**< None */
- CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC, /**< Automatic */
- CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT, /**< Daylight */
- CAMERA_ATTR_WHITE_BALANCE_CLOUDY, /**< Cloudy */
- CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT, /**< Fluorescent */
- CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
- CAMERA_ATTR_WHITE_BALANCE_SHADE, /**< Shade */
- CAMERA_ATTR_WHITE_BALANCE_HORIZON, /**< Horizon */
- CAMERA_ATTR_WHITE_BALANCE_FLASH, /**< Flash */
- CAMERA_ATTR_WHITE_BALANCE_CUSTOM, /**< Custom */
+typedef enum {
+ CAMERA_ATTR_WHITE_BALANCE_NONE = 0, /**< None */
+ CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC, /**< Automatic */
+ CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT, /**< Daylight */
+ CAMERA_ATTR_WHITE_BALANCE_CLOUDY, /**< Cloudy */
+ CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT, /**< Fluorescent */
+ CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
+ CAMERA_ATTR_WHITE_BALANCE_SHADE, /**< Shade */
+ CAMERA_ATTR_WHITE_BALANCE_HORIZON, /**< Horizon */
+ CAMERA_ATTR_WHITE_BALANCE_FLASH, /**< Flash */
+ CAMERA_ATTR_WHITE_BALANCE_CUSTOM, /**< Custom */
} camera_attr_whitebalance_e;
/**
* @details The mode of operation can be in daylight, night, or back-light.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_SCENE_MODE_NORMAL = 0, /**< Normal */
- CAMERA_ATTR_SCENE_MODE_PORTRAIT, /**< Portrait */
- CAMERA_ATTR_SCENE_MODE_LANDSCAPE, /**< Landscape */
- CAMERA_ATTR_SCENE_MODE_SPORTS, /**< Sports */
- CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
- CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
- CAMERA_ATTR_SCENE_MODE_SUNSET, /**< Sunset */
- CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN, /**< Dusk & dawn */
- CAMERA_ATTR_SCENE_MODE_FALL_COLOR, /**< Fall */
- CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE, /**< Night scene */
- CAMERA_ATTR_SCENE_MODE_FIREWORK, /**< Firework */
- CAMERA_ATTR_SCENE_MODE_TEXT, /**< Text */
- CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW, /**< Show window */
- CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT, /**< Candle light */
- CAMERA_ATTR_SCENE_MODE_BACKLIGHT, /**< Backlight */
- CAMERA_ATTR_SCENE_MODE_AQUA, /**< Aqua */
+typedef enum {
+ CAMERA_ATTR_SCENE_MODE_NORMAL = 0, /**< Normal */
+ CAMERA_ATTR_SCENE_MODE_PORTRAIT, /**< Portrait */
+ CAMERA_ATTR_SCENE_MODE_LANDSCAPE, /**< Landscape */
+ CAMERA_ATTR_SCENE_MODE_SPORTS, /**< Sports */
+ CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
+ CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
+ CAMERA_ATTR_SCENE_MODE_SUNSET, /**< Sunset */
+ CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN, /**< Dusk & dawn */
+ CAMERA_ATTR_SCENE_MODE_FALL_COLOR, /**< Fall */
+ CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE, /**< Night scene */
+ CAMERA_ATTR_SCENE_MODE_FIREWORK, /**< Firework */
+ CAMERA_ATTR_SCENE_MODE_TEXT, /**< Text */
+ CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW, /**< Show window */
+ CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT, /**< Candle light */
+ CAMERA_ATTR_SCENE_MODE_BACKLIGHT, /**< Backlight */
+ CAMERA_ATTR_SCENE_MODE_AQUA, /**< Aqua */
} camera_attr_scene_mode_e;
/**
* @brief Enumeration for the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_AF_NONE = 0, /**< auto-focus is not set */
- CAMERA_ATTR_AF_NORMAL, /**< auto-focus in the normal mode */
- CAMERA_ATTR_AF_MACRO, /**< auto-focus in the macro mode(close distance) */
- CAMERA_ATTR_AF_FULL, /**< auto-focus in the full mode(all range scan, limited by device spec) */
+typedef enum {
+ CAMERA_ATTR_AF_NONE = 0, /**< auto-focus is not set */
+ CAMERA_ATTR_AF_NORMAL, /**< auto-focus in the normal mode */
+ CAMERA_ATTR_AF_MACRO, /**< auto-focus in the macro mode(close distance) */
+ CAMERA_ATTR_AF_FULL, /**< auto-focus in the full mode(all range scan, limited by device spec) */
} camera_attr_af_mode_e;
/**
* @brief Enumeration for the ISO levels of the camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
- CAMERA_ATTR_ISO_50, /**< ISO 50 */
- CAMERA_ATTR_ISO_100, /**< ISO 100 */
- CAMERA_ATTR_ISO_200, /**< ISO 200 */
- CAMERA_ATTR_ISO_400, /**< ISO 400 */
- CAMERA_ATTR_ISO_800, /**< ISO 800 */
- CAMERA_ATTR_ISO_1600, /**< ISO 1600 */
- CAMERA_ATTR_ISO_3200, /**< ISO 3200 */
+typedef enum {
+ CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
+ CAMERA_ATTR_ISO_50, /**< ISO 50 */
+ CAMERA_ATTR_ISO_100, /**< ISO 100 */
+ CAMERA_ATTR_ISO_200, /**< ISO 200 */
+ CAMERA_ATTR_ISO_400, /**< ISO 400 */
+ CAMERA_ATTR_ISO_800, /**< ISO 800 */
+ CAMERA_ATTR_ISO_1600, /**< ISO 1600 */
+ CAMERA_ATTR_ISO_3200, /**< ISO 3200 */
} camera_attr_iso_e;
/**
* @brief Enumeration for the camera exposure modes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_EXPOSURE_MODE_OFF = 0, /**< Off */
- CAMERA_ATTR_EXPOSURE_MODE_ALL, /**< All mode */
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, /**< Center mode */
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, /**< Spot mode */
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /**< Custom mode */
+typedef enum {
+ CAMERA_ATTR_EXPOSURE_MODE_OFF = 0, /**< Off */
+ CAMERA_ATTR_EXPOSURE_MODE_ALL, /**< All mode */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /**< Center mode */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /**< Spot mode */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /**< Custom mode */
} camera_attr_exposure_mode_e;
/**
* @brief Enumeration for the orientation values of tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1, /**< Row #0 is at the top, Column #0 is to the left */
- CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2, /**< Row #0 is at the top, Column #0 is to the right (flipped) */
- CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3, /**< Row #0 is at the bottom, Column #0 is to the right */
- CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4, /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
- CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5, /**< Row #0 is to the left, Column #0 is at the top (flipped) */
- CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6, /**< Row #0 is to the right, Column #0 is at the top */
- CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7, /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
- CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8, /**< Row #0 is to the left, Column #0 is at the bottom */
+typedef enum {
+ CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1, /**< Row #0 is at the top, Column #0 is to the left */
+ CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2, /**< Row #0 is at the top, Column #0 is to the right (flipped) */
+ CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3, /**< Row #0 is at the bottom, Column #0 is to the right */
+ CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4, /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
+ CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5, /**< Row #0 is to the left, Column #0 is at the top (flipped) */
+ CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6, /**< Row #0 is to the right, Column #0 is at the top */
+ CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7, /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
+ CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8, /**< Row #0 is to the left, Column #0 is at the bottom */
} camera_attr_tag_orientation_e;
/**
* @brief Enumeration for the flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_FLASH_MODE_OFF = 0, /**< Always off */
- CAMERA_ATTR_FLASH_MODE_ON, /**< Always splashes */
- CAMERA_ATTR_FLASH_MODE_AUTO, /**< Depending on intensity of light, strobe starts to flash */
- CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
- CAMERA_ATTR_FLASH_MODE_SLOW_SYNC, /**< Slow sync curtain synchronization */
- CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN, /**< Front curtain synchronization */
- CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN, /**< Rear curtain synchronization */
- CAMERA_ATTR_FLASH_MODE_PERMANENT, /**< Keep turned on until turning off */
+typedef enum {
+ CAMERA_ATTR_FLASH_MODE_OFF = 0, /**< Always off */
+ CAMERA_ATTR_FLASH_MODE_ON, /**< Always splashes */
+ CAMERA_ATTR_FLASH_MODE_AUTO, /**< Depending on intensity of light, strobe starts to flash */
+ CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
+ CAMERA_ATTR_FLASH_MODE_SLOW_SYNC, /**< Slow sync curtain synchronization */
+ CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN, /**< Front curtain synchronization */
+ CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN, /**< Rear curtain synchronization */
+ CAMERA_ATTR_FLASH_MODE_PERMANENT, /**< Keep turned on until turning off */
} camera_attr_flash_mode_e;
/**
* @brief Enumeration to preview FPS.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
- CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
- CAMERA_ATTR_FPS_7 = 7, /**< 7 FPS */
- CAMERA_ATTR_FPS_8 = 8, /**< 8 FPS */
- CAMERA_ATTR_FPS_15 = 15, /**< 15 FPS */
- CAMERA_ATTR_FPS_20 = 20, /**< 20 FPS */
- CAMERA_ATTR_FPS_24 = 24, /**< 24 FPS */
- CAMERA_ATTR_FPS_25 = 25, /**< 25 FPS */
- CAMERA_ATTR_FPS_30 = 30, /**< 30 FPS */
- CAMERA_ATTR_FPS_60 = 60, /**< 60 FPS */
- CAMERA_ATTR_FPS_90 = 90, /**< 90 FPS */
- CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
+typedef enum {
+ CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
+ CAMERA_ATTR_FPS_7 = 7, /**< 7 FPS */
+ CAMERA_ATTR_FPS_8 = 8, /**< 8 FPS */
+ CAMERA_ATTR_FPS_15 = 15, /**< 15 FPS */
+ CAMERA_ATTR_FPS_20 = 20, /**< 20 FPS */
+ CAMERA_ATTR_FPS_24 = 24, /**< 24 FPS */
+ CAMERA_ATTR_FPS_25 = 25, /**< 25 FPS */
+ CAMERA_ATTR_FPS_30 = 30, /**< 30 FPS */
+ CAMERA_ATTR_FPS_60 = 60, /**< 60 FPS */
+ CAMERA_ATTR_FPS_90 = 90, /**< 90 FPS */
+ CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
} camera_attr_fps_e;
/**
* @brief Enumeration for the theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
CAMERA_ATTR_THEATER_MODE_ENABLE = 2, /**< Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display */
CAMERA_ATTR_THEATER_MODE_CLONE = 1 /**< Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display */
* @brief Enumeration for HDR capture mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
-typedef enum
-{
+typedef enum {
CAMERA_ATTR_HDR_MODE_DISABLE = 0, /**< Disable HDR capture */
CAMERA_ATTR_HDR_MODE_ENABLE, /**< Enable HDR capture */
CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
* will invoke this callback if you register this callback using camera_set_state_changed_cb().
* @see camera_set_state_changed_cb()
*/
-typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current,
- bool by_policy, void *user_data);
+typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data);
/**
* @brief Called when the camera is interrupted by policy.
* @pre camera_foreach_supported_capture_format() will invoke this callback.
* @see camera_foreach_supported_capture_format()
*/
-typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format,
- void *user_data);
+typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format, void *user_data);
/**
* @brief Called once for the pixel format of each supported preview format.
* @pre camera_foreach_supported_preview_format() will invoke this callback.
* @see camera_foreach_supported_preview_format()
*/
-typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format,
- void *user_data);
+typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format, void *user_data);
/**
* @}
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
*
*/
- bool legacy_camera_is_supported_continuous_capture(camera_h camera);
+bool legacy_camera_is_supported_continuous_capture(camera_h camera);
/**
* @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
* @see camera_supported_preview_resolution_cb()
*/
int legacy_camera_foreach_supported_preview_resolution(camera_h camera,
- camera_supported_preview_resolution_cb callback, void *user_data);
+ camera_supported_preview_resolution_cb callback, void *user_data);
/**
* @}
* @see camera_supported_capture_resolution_cb()
*/
int legacy_camera_foreach_supported_capture_resolution(camera_h camera,
- camera_supported_capture_resolution_cb callback, void *user_data);
+ camera_supported_capture_resolution_cb callback, void *user_data);
/**
* @}
* @see camera_supported_capture_format_cb()
*/
int legacy_camera_foreach_supported_capture_format(camera_h camera,
- camera_supported_capture_format_cb callback, void *user_data);
+ camera_supported_capture_format_cb callback, void *user_data);
/**
* @}
* @see camera_supported_preview_format_cb()
*/
int legacy_camera_foreach_supported_preview_format(camera_h camera,
- camera_supported_preview_format_cb callback, void *user_data);
+ camera_supported_preview_format_cb callback, void *user_data);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @see legacy_camera_unset_state_changed_cb()
* @see camera_state_changed_cb()
*/
-int legacy_camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback,
- void *user_data);
+int legacy_camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @see legacy_camera_unset_interrupted_cb()
* @see camera_interrupted_cb()
*/
-int legacy_camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
- void *user_data);
+int legacy_camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @see camera_unset_focus_changed_cb()
* @see camera_focus_changed_cb()
*/
-int legacy_camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback,
- void *user_data);
+int legacy_camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @see camera_attr_foreach_supported_exposure_mode()
* @see #camera_attr_exposure_mode_e
*/
-typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode,
- void *user_data);
+typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode, void *user_data);
/**
* @brief Called to get each supported ISO mode.
* @see camera_attr_foreach_supported_whitebalance()
* @see #camera_attr_whitebalance_e
*/
-typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb,
- void *user_data);
+typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb, void *user_data);
/**
* @brief Called to get each supported effect mode.
* @pre camera_attr_foreach_supported_effect() will invoke this callback.
* @see camera_attr_foreach_supported_effect()
*/
-typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect,
- void *user_data);
+typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect, void *user_data);
/**
* @brief Called to get each supported scene mode.
* @see camera_attr_foreach_supported_scene_mode()
* @see #camera_attr_scene_mode_e
*/
-typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode,
- void *user_data);
+typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode, void *user_data);
/**
* @brief Called to get each supported flash mode.
* @pre camera_attr_foreach_supported_flash_mode() will invoke this callback.
* @see camera_attr_foreach_supported_flash_mode()
*/
-typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode,
- void *user_data);
+typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode, void *user_data);
/**
* @brief Called to get each supported FPS mode.
* @see camera_attr_get_preview_fps()
* @see camera_attr_supported_fps_cb()
*/
-int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback,
- void *user_data);
+int legacy_camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback, void *user_data);
/**
* @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
* @see camera_attr_get_preview_fps()
* @see camera_attr_supported_fps_cb()
*/
-int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height,
- camera_attr_supported_fps_cb callback ,void *user_data);
+int legacy_camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height,
+ camera_attr_supported_fps_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_af_mode()
* @see camera_attr_supported_af_mode_cb()
*/
-int legacy_camera_attr_foreach_supported_af_mode(camera_h camera,
- camera_attr_supported_af_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported_af_mode_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_exposure_mode()
* @see camera_attr_supported_exposure_mode_cb()
*/
-int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera,
- camera_attr_supported_exposure_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_supported_exposure_mode_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_iso()
* @see camera_attr_supported_iso_cb()
*/
-int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback,
- void *user_data);
+int legacy_camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_theater_mode()
* @see camera_attr_supported_theater_mode_cb()
*/
-int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera,
- camera_attr_supported_theater_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supported_theater_mode_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_whitebalance()
* @see camera_attr_supported_whitebalance_cb()
*/
-int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera,
- camera_attr_supported_whitebalance_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supported_whitebalance_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_effect()
* @see camera_attr_supported_effect_cb()
*/
-int legacy_camera_attr_foreach_supported_effect(camera_h camera,
- camera_attr_supported_effect_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_effect_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_scene_mode()
* @see legacy_camera_attr_supported_scene_mode_cb()
*/
-int legacy_camera_attr_foreach_supported_scene_mode(camera_h camera,
- camera_attr_supported_scene_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_supported_scene_mode_cb callback, void *user_data);
/**
* @}
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks Since 2.4, while setting the flash mode, if the flash was preempted by other APIs,\n
- then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
+ then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
* @param[in] camera The handle to the camera
* @param[in] mode The flash mode
* @return @c 0 on success, otherwise a negative error value
* @see legacy_camera_attr_get_flash_mode()
* @see camera_attr_supported_flash_mode_cb()
*/
-int legacy_camera_attr_foreach_supported_flash_mode(camera_h camera,
- camera_attr_supported_flash_mode_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_supported_flash_mode_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_stream_rotation()
* @see legacy_camera_attr_supported_stream_rotation_cb()
*/
-int legacy_camera_attr_foreach_supported_stream_rotation(camera_h camera,
- camera_attr_supported_stream_rotation_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_supported_stream_rotation_cb callback, void *user_data);
/**
* @}
* @see legacy_camera_attr_get_stream_flip()
* @see legacy_camera_attr_supported_stream_flip_cb()
*/
-int legacy_camera_attr_foreach_supported_stream_flip(camera_h camera,
- camera_attr_supported_stream_flip_cb callback, void *user_data);
+int legacy_camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_supported_stream_flip_cb callback, void *user_data);
/**
* @}
_CAMERA_EVENT_TYPE_FACE_DETECTION,
_CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR,
_CAMERA_EVENT_TYPE_NUM
-}_camera_event_e;
+} _camera_event_e;
typedef struct _camera_cb_data {
int event_type;
void *handle;
} camera_cb_data;
-typedef struct _camera_s{
+typedef struct _camera_s {
MMHandleType mm_handle;
void* user_cb[_CAMERA_EVENT_TYPE_NUM];
if (!cb_data) {
LOGW("cb_data is NULL");
} else {
- ret = g_idle_remove_by_data (cb_data);
+ ret = g_idle_remove_by_data(cb_data);
LOGW("Remove cb_data[%p]. ret[%d]", cb_data, ret);
handle->cb_data_list = g_list_remove(handle->cb_data_list, cb_data);
static gboolean __mm_videostream_callback(MMCamcorderVideoStreamDataType *stream, void *user_data)
{
- if (user_data == NULL || stream == NULL) {
+ if (user_data == NULL || stream == NULL)
return 0;
- }
camera_s *handle = (camera_s *)user_data;
- if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW]) {
+ if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW])
((camera_preview_cb)handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW])(stream, handle->user_data[_CAMERA_EVENT_TYPE_PREVIEW]);
- } else if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]) {
+ else if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW])
((camera_preview_cb)handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW])(stream, handle->user_data[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW]);
- }
return 1;
}
static gboolean __mm_capture_callback(MMCamcorderCaptureDataType *frame, MMCamcorderCaptureDataType *thumbnail, void *user_data)
{
- if (user_data == NULL || frame == NULL) {
+ if (user_data == NULL || frame == NULL)
return 0;
- }
camera_s *handle = (camera_s *)user_data;
int ret = MM_ERROR_NONE;
image.format = frame->format;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- "captured-exif-raw-data", &exif, &exif_size,
- NULL);
+ "captured-exif-raw-data", &exif, &exif_size,
+ NULL);
if (ret == MM_ERROR_NONE) {
image.exif = exif;
image.exif_size = exif_size;
}
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- "captured-screennail", &scrnl, &scrnl_size,
- NULL);
+ "captured-screennail", &scrnl, &scrnl_size,
+ NULL);
if (ret == MM_ERROR_NONE && scrnl) {
postview.data = scrnl->data;
postview.size = scrnl->length;
}
((camera_capturing_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE])(&image,
- scrnl ? &postview : NULL,
- thumbnail ? &thumb : NULL,
- handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE]);
+ scrnl ? &postview : NULL,
+ thumbnail ? &thumb : NULL,
+ handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE]);
}
/* update captured state */
if (handle->capture_count == 1 && handle->hdr_keep_mode) {
- if (handle->current_capture_count == 2) {
+ if (handle->current_capture_count == 2)
handle->is_capture_completed = true;
- }
- } else if (handle->capture_count == handle->current_capture_count ||
- handle->is_continuous_shot_break) {
+ } else if (handle->capture_count == handle->current_capture_count || handle->is_continuous_shot_break) {
handle->is_capture_completed = true;
}
static int __mm_camera_message_callback(int message, void *param, void *user_data)
{
- if (user_data == NULL || param == NULL) {
+ if (user_data == NULL || param == NULL)
return 0;
- }
int i = 0;
int camera_error = 0;
camera_policy_e policy = CAMERA_POLICY_NONE;
MMCamFaceDetectInfo *cam_fd_info = NULL;
- if (handle->relay_message_callback) {
+ if (handle->relay_message_callback)
handle->relay_message_callback(message, param, handle->relay_user_data);
- }
switch (message) {
case MM_MESSAGE_CAMCORDER_STATE_CHANGED:
(m->state.previous < MM_CAMCORDER_STATE_NONE ||
m->state.previous > MM_CAMCORDER_STATE_PAUSED ||
m->state.code != 0)) {
- LOGI( "Invalid state changed message");
+ LOGI("Invalid state changed message");
break;
}
LOGW("CAMERA_POLICY_RESOURCE_CONFLICT");
}
- if (policy != CAMERA_POLICY_NONE &&
- handle->state == CAMERA_STATE_CAPTURING) {
+ if (policy != CAMERA_POLICY_NONE && handle->state == CAMERA_STATE_CAPTURING) {
handle->state = CAMERA_STATE_CAPTURED;
if (handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(CAMERA_STATE_CAPTURING,
handle->state, policy, handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
}
- if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+ if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
- }
}
previous_state = handle->state;
}
/* should change intermediate state MM_CAMCORDER_STATE_READY is not valid in capi , change to NULL state */
- if (policy != CAMERA_POLICY_NONE &&
- m->state.current == MM_CAMCORDER_STATE_NULL) {
+ if (policy != CAMERA_POLICY_NONE && m->state.current == MM_CAMCORDER_STATE_NULL) {
if (handle->user_cb[_CAMERA_EVENT_TYPE_INTERRUPTED]) {
((camera_interrupted_cb)handle->user_cb[_CAMERA_EVENT_TYPE_INTERRUPTED])(policy,
previous_state, handle->state, handle->user_data[_CAMERA_EVENT_TYPE_INTERRUPTED]);
}
}
break;
- case MM_MESSAGE_CAMCORDER_FOCUS_CHANGED :
+ case MM_MESSAGE_CAMCORDER_FOCUS_CHANGED:
if (handle->user_cb[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]) {
((camera_focus_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_FOCUS_CHANGE])(m->code,
- handle->user_data[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
+ handle->user_data[_CAMERA_EVENT_TYPE_FOCUS_CHANGE]);
}
break;
case MM_MESSAGE_CAMCORDER_CAPTURED:
handle->current_capture_complete_count = m->code;
if (handle->state == CAMERA_STATE_CAPTURING &&
- (handle->capture_count == 1 ||
- m->code == handle->capture_count ||
- handle->is_continuous_shot_break)) {
+ (handle->capture_count == 1 || m->code == handle->capture_count || handle->is_continuous_shot_break)) {
/* pseudo state change */
previous_state = handle->state;
handle->state = CAMERA_STATE_CAPTURED;
- if (previous_state != handle->state &&
- handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
+
+ if (previous_state != handle->state && handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(previous_state,
- handle->state,
- 0,
- handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
+ handle->state,
+ 0,
+ handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
}
- if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+
+ if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
- }
}
break;
case MM_MESSAGE_CAMCORDER_VIDEO_SNAPSHOT_CAPTURED:
- if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+ if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
- }
+
break;
case MM_MESSAGE_CAMCORDER_ERROR:
switch (m->code) {
- case MM_ERROR_CAMCORDER_DEVICE :
+ case MM_ERROR_CAMCORDER_DEVICE:
case MM_ERROR_CAMCORDER_DEVICE_TIMEOUT:
case MM_ERROR_CAMCORDER_DEVICE_WRONG_JPEG:
camera_error = CAMERA_ERROR_DEVICE;
case MM_ERROR_CAMCORDER_DEVICE_REG_TROUBLE:
camera_error = CAMERA_ERROR_ESD;
break;
- default :
+ default:
camera_error = CAMERA_ERROR_INVALID_OPERATION;
break;
}
if (camera_error != 0 && handle->user_cb[_CAMERA_EVENT_TYPE_ERROR]) {
((camera_error_cb)handle->user_cb[_CAMERA_EVENT_TYPE_ERROR])(camera_error,
- handle->state,
- handle->user_data[_CAMERA_EVENT_TYPE_ERROR]);
+ handle->state,
+ handle->user_data[_CAMERA_EVENT_TYPE_ERROR]);
}
break;
if (handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION]) {
((camera_face_detected_cb)handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION])(faces,
- handle->num_of_faces,
- handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION]);
+ handle->num_of_faces,
+ handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION]);
}
} else {
handle->num_of_faces = 0;
previous_state = handle->state;
handle->state = CAMERA_STATE_CAPTURED;
- if (previous_state != handle->state &&
- handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
+ if (previous_state != handle->state && handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE]) {
((camera_state_changed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_STATE_CHANGE])(previous_state,
- handle->state,
- 0,
- handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
+ handle->state,
+ 0,
+ handle->user_data[_CAMERA_EVENT_TYPE_STATE_CHANGE]);
}
- if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]) {
+ if (handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])
((camera_capture_completed_cb)handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE])(handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE]);
- }
}
return false;
int legacy_camera_create(camera_device_e device, camera_h* camera)
{
- if (camera == NULL){
+ if (camera == NULL) {
LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
return CAMERA_ERROR_INVALID_PARAMETER;
}
camera_s *handle = NULL;
char *error = NULL;
- LOGW("device name = [%d]",device);
+ LOGW("device name = [%d]", device);
info.videodev_type = device;
- handle = (camera_s*)malloc( sizeof(camera_s) );
+ handle = (camera_s *)malloc(sizeof(camera_s));
if (handle == NULL) {
LOGE("malloc fail");
return CAMERA_ERROR_OUT_OF_MEMORY;
ret = mm_camcorder_create(&handle->mm_handle, &info);
if (ret != MM_ERROR_NONE) {
free(handle);
- return __convert_camera_error_code(__func__,ret);
+ return __convert_camera_error_code(__func__, ret);
}
preview_format = MM_PIXEL_FORMAT_YUYV;
rotation = MM_DISPLAY_ROTATION_NONE;
ret = mm_camcorder_get_attributes(handle->mm_handle, &error,
- MMCAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE, &preview_format,
- MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
- MMCAM_CAPTURE_WIDTH, &handle->capture_width,
- MMCAM_CAPTURE_HEIGHT, &handle->capture_height,
- NULL);
+ MMCAM_RECOMMEND_PREVIEW_FORMAT_FOR_CAPTURE, &preview_format,
+ MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
+ MMCAM_CAPTURE_WIDTH, &handle->capture_width,
+ MMCAM_CAPTURE_HEIGHT, &handle->capture_height,
+ NULL);
if (ret != MM_ERROR_NONE) {
LOGE("mm_camcorder_get_attributes fail(%x)", ret);
if (error) {
}
ret = mm_camcorder_set_attributes(handle->mm_handle, &error,
- MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO_CAPTURE,
- MMCAM_CAMERA_FORMAT, preview_format,
- MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG,
- MMCAM_CAPTURE_FORMAT, MM_PIXEL_FORMAT_ENCODED,
- MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_NULL,
- MMCAM_DISPLAY_ROTATION, rotation,
- MMCAM_CAPTURE_COUNT, 1,
- NULL);
+ MMCAM_MODE, MM_CAMCORDER_MODE_VIDEO_CAPTURE,
+ MMCAM_CAMERA_FORMAT, preview_format,
+ MMCAM_IMAGE_ENCODER, MM_IMAGE_CODEC_JPEG,
+ MMCAM_CAPTURE_FORMAT, MM_PIXEL_FORMAT_ENCODED,
+ MMCAM_DISPLAY_SURFACE, MM_DISPLAY_SURFACE_NULL,
+ MMCAM_DISPLAY_ROTATION, rotation,
+ MMCAM_CAPTURE_COUNT, 1,
+ NULL);
handle->display_type = CAMERA_DISPLAY_TYPE_NONE;
g_mutex_init(&handle->idle_cb_lock);
mm_camcorder_set_message_callback(handle->mm_handle,
- __mm_camera_message_callback,
- (void*)handle);
+ __mm_camera_message_callback,
+ (void *)handle);
*camera = (camera_h)handle;
/* for receving MM_MESSAGE_CAMCORDER_CAPTURED evnet must be seted capture callback */
mm_camcorder_set_video_capture_callback(handle->mm_handle,
- (mm_camcorder_video_capture_callback)__mm_capture_callback,
- (void *)handle);
+ (mm_camcorder_video_capture_callback)__mm_capture_callback,
+ (void *)handle);
mm_camcorder_get_state(handle->mm_handle, &mm_state);
if (mm_state != MM_CAMCORDER_STATE_READY) {
if (handle->capture_resolution_modified) {
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_WIDTH, handle->capture_width,
- MMCAM_CAPTURE_HEIGHT, handle->capture_height,
- NULL);
+ MMCAM_CAPTURE_WIDTH, handle->capture_width,
+ MMCAM_CAPTURE_HEIGHT, handle->capture_height,
+ NULL);
handle->capture_resolution_modified = false;
}
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_COUNT, 1,
- NULL);
+ MMCAM_CAPTURE_COUNT, 1,
+ NULL);
handle->capture_count = 1;
handle->is_continuous_shot_break = false;
return false;
}
- if (info.int_range.max > 1) {
+ if (info.int_range.max > 1)
return true;
- } else {
+ else
return false;
- }
}
supported_zsl = FALSE;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_COUNT, count,
- MMCAM_CAPTURE_INTERVAL, interval,
- NULL);
+ MMCAM_CAPTURE_COUNT, count,
+ MMCAM_CAPTURE_INTERVAL, interval,
+ NULL);
if (ret != MM_ERROR_NONE) {
LOGE("error set continuous shot attribute 0x%x", ret);
return __convert_camera_error_code(__func__, ret);
handle->is_capture_completed = false;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
- NULL);
+ MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
+ NULL);
if (ret != MM_ERROR_NONE) {
LOGE("(%x) error get continuous shot attribute", ret);
}
int capture_height;
mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WIDTH, &preview_width,
- MMCAM_CAMERA_HEIGHT, &preview_height,
- MMCAM_CAPTURE_WIDTH, &capture_width,
- MMCAM_CAPTURE_HEIGHT, &capture_height,
- NULL);
+ MMCAM_CAMERA_WIDTH, &preview_width,
+ MMCAM_CAMERA_HEIGHT, &preview_height,
+ MMCAM_CAPTURE_WIDTH, &capture_width,
+ MMCAM_CAPTURE_HEIGHT, &capture_height,
+ NULL);
if (preview_width != capture_width || preview_height != capture_height) {
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_WIDTH, preview_width,
- MMCAM_CAPTURE_HEIGHT, preview_height,
- NULL);
+ MMCAM_CAPTURE_WIDTH, preview_width,
+ MMCAM_CAPTURE_HEIGHT, preview_height,
+ NULL);
handle->capture_resolution_modified = true;
}
handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE] = (void *)user_data;
ret = mm_camcorder_capture_start(handle->mm_handle);
- if(ret != MM_ERROR_NONE ){
+ if (ret != MM_ERROR_NONE) {
LOGE("mm_camcorder_capture_start failed 0x%x", ret);
handle->user_cb[_CAMERA_EVENT_TYPE_CAPTURE] = NULL;
handle->user_data[_CAMERA_EVENT_TYPE_CAPTURE] = NULL;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- "capture-break-cont-shot", 1,
- NULL);
+ "capture-break-cont-shot", 1,
+ NULL);
if (ret == MM_ERROR_NONE) {
handle->is_continuous_shot_break = true;
- if (handle->current_capture_count > 0) {
+ if (handle->current_capture_count > 0)
handle->is_capture_completed = true;
- }
g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, __capture_completed_event_cb, handle, NULL);
}
}
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
- NULL);
+ MMCAM_SUPPORT_ZSL_CAPTURE, &supported_zsl,
+ NULL);
set_last_result(__convert_camera_error_code(__func__, ret));
if (ret != MM_ERROR_NONE) {
LOGE("MMCAM_SUPPORT_ZSL_CAPTURE get failed");
}
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB, &supported,
- NULL);
+ MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB, &supported,
+ NULL);
set_last_result(__convert_camera_error_code(__func__, ret));
if (ret != MM_ERROR_NONE) {
LOGE("MMCAM_SUPPORT_MEDIA_PACKET_PREVIEW_CB get failed");
}
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_DEVICE_COUNT, device_count,
- NULL);
+ MMCAM_CAMERA_DEVICE_COUNT, device_count,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_ON,
- NULL);
+ MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_ON,
+ NULL);
if (ret == MM_ERROR_NONE) {
handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION] = (void *)callback;
handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION] = (void *)user_data;
handle->num_of_faces = 0;
}
- return __convert_camera_error_code(__func__,ret);
+ return __convert_camera_error_code(__func__, ret);
}
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_OFF,
- NULL);
+ MMCAM_DETECT_MODE, MM_CAMCORDER_DETECT_MODE_OFF,
+ NULL);
if (ret == MM_ERROR_NONE) {
handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION] = NULL;
handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION] = NULL;
handle->num_of_faces = 0;
}
- return __convert_camera_error_code(__func__,ret);
+ return __convert_camera_error_code(__func__, ret);
}
capi_state = __camera_state_convert(mmstate);
if ((handle->state == CAMERA_STATE_CAPTURED || handle->is_capture_completed) &&
- (handle->current_capture_count > 0 || handle->is_capture_completed) &&
- mmstate == MM_CAMCORDER_STATE_CAPTURING) {
+ (handle->current_capture_count > 0 || handle->is_capture_completed) &&
+ mmstate == MM_CAMCORDER_STATE_CAPTURING) {
capi_state = CAMERA_STATE_CAPTURED;
}
LOGD("apply cached focus mode %d", handle->cached_focus_mode);
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, handle->cached_focus_mode,
- NULL);
+ MMCAM_CAMERA_AF_SCAN_RANGE, handle->cached_focus_mode,
+ NULL);
handle->cached_focus_mode = -1;
}
return __camera_start_continuous_focusing(camera);
} else {
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, handle->focus_area_valid ? \
- MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO : MM_CAMCORDER_FOCUS_MODE_AUTO,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, handle->focus_area_valid ? \
+ MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO : MM_CAMCORDER_FOCUS_MODE_AUTO,
+ NULL);
return __convert_camera_error_code(__func__, mm_camcorder_start_focusing(((camera_s *)camera)->mm_handle));
}
handle->on_continuous_focusing = true;
mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, &mode,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, &mode,
+ NULL);
if (mode == MM_CAMCORDER_FOCUS_MODE_CONTINUOUS) {
ret = mm_camcorder_start_focusing(handle->mm_handle);
} else {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_CONTINUOUS,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_CONTINUOUS,
+ NULL);
}
return __convert_camera_error_code(__func__, ret);
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_SOCKET_PATH, socket_path, strlen(socket_path),
- NULL);
+ MMCAM_DISPLAY_SOCKET_PATH, socket_path, strlen(socket_path),
+ NULL);
} else if (type != CAMERA_DISPLAY_TYPE_NONE) {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_DISPLAY_HANDLE, set_handle, sizeof(void *),
int legacy_camera_set_preview_resolution(camera_h camera, int width, int height)
{
- if( camera == NULL){
+ if (camera == NULL) {
LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
return CAMERA_ERROR_INVALID_PARAMETER;
}
int i = 0;
mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FPS, &mm_fps,
- NULL);
+ MMCAM_CAMERA_FPS, &mm_fps,
+ NULL);
ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (info.int_array.array[i] == mm_fps) {
+ if (info.int_array.array[i] == mm_fps)
break;
- }
+
if (i == info.int_array.count - 1) {
LOGE("Not supported resolution: Current set Resolution's FPS is not supported in wanted resolution.");
return CAMERA_ERROR_NOT_SUPPORTED;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WIDTH, width,
- MMCAM_CAMERA_HEIGHT, height,
- NULL);
+ MMCAM_CAMERA_WIDTH, width,
+ MMCAM_CAMERA_HEIGHT, height,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_WIDTH, width,
- MMCAM_CAPTURE_HEIGHT, height,
- NULL);
+ MMCAM_CAPTURE_WIDTH, width,
+ MMCAM_CAPTURE_HEIGHT, height,
+ NULL);
if (ret == MM_ERROR_NONE) {
handle->capture_width = width;
handle->capture_height = height;
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_FORMAT, format,
- NULL);
+ MMCAM_CAPTURE_FORMAT, format,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
MMCamAttrsInfo supported_format;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FORMAT , &supported_format);
for (i = 0 ; i < supported_format.int_array.count ; i++) {
- if (supported_format.int_array.array[i] == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
+ if (supported_format.int_array.array[i] == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY)
supported_ITLV_UYVY = true;
- }
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FORMAT, supported_ITLV_UYVY ? MM_PIXEL_FORMAT_ITLV_JPEG_UYVY : MM_PIXEL_FORMAT_UYVY,
- NULL);
+ MMCAM_CAMERA_FORMAT, supported_ITLV_UYVY ? MM_PIXEL_FORMAT_ITLV_JPEG_UYVY : MM_PIXEL_FORMAT_UYVY,
+ NULL);
} else {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FORMAT, format,
- NULL);
+ MMCAM_CAMERA_FORMAT, format,
+ NULL);
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WIDTH, width,
- MMCAM_CAMERA_HEIGHT, height,
- NULL);
+ MMCAM_CAMERA_WIDTH, width,
+ MMCAM_CAMERA_HEIGHT, height,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_ROTATION, rotation,
- NULL);
+ MMCAM_DISPLAY_ROTATION, rotation,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_ROTATION, rotation,
- NULL);
+ MMCAM_DISPLAY_ROTATION, rotation,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_FLIP, flip,
- NULL);
+ MMCAM_DISPLAY_FLIP, flip,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_FLIP, flip,
- NULL);
+ MMCAM_DISPLAY_FLIP, flip,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_VISIBLE, visible,
- NULL);
+ MMCAM_DISPLAY_VISIBLE, visible,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_VISIBLE, &result,
- NULL);
+ MMCAM_DISPLAY_VISIBLE, &result,
+ NULL);
- if (ret == MM_ERROR_NONE) {
+ if (ret == MM_ERROR_NONE)
*visible = result;
- }
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
- NULL);
+ MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
- NULL);
+ MMCAM_DISPLAY_GEOMETRY_METHOD, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAPTURE_FORMAT, format,
- NULL);
+ MMCAM_CAPTURE_FORMAT, format,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FORMAT, format,
- NULL);
+ MMCAM_CAMERA_FORMAT, format,
+ NULL);
- if ((MMPixelFormatType)*format == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
+ if ((MMPixelFormatType)*format == MM_PIXEL_FORMAT_ITLV_JPEG_UYVY)
*format = CAMERA_PIXEL_FORMAT_UYVY;
- }
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FACING_DIRECTION, facing_direction,
- NULL);
+ MMCAM_CAMERA_FACING_DIRECTION, facing_direction,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
handle->user_data[_CAMERA_EVENT_TYPE_PREVIEW] = (void *)user_data;
mm_camcorder_set_video_stream_callback(handle->mm_handle,
- (mm_camcorder_video_stream_callback)__mm_videostream_callback,
- (void *)handle);
+ (mm_camcorder_video_stream_callback)__mm_videostream_callback,
+ (void *)handle);
return CAMERA_ERROR_NONE;
}
if (handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] == NULL) {
mm_camcorder_set_video_stream_callback(handle->mm_handle,
- (mm_camcorder_video_stream_callback)NULL,
- (void *)NULL);
+ (mm_camcorder_video_stream_callback)NULL,
+ (void *)NULL);
}
handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW] = (void *)NULL;
handle->user_data[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] = (void *)user_data;
mm_camcorder_set_video_stream_callback(handle->mm_handle,
- (mm_camcorder_video_stream_callback)__mm_videostream_callback,
- (void *)handle);
+ (mm_camcorder_video_stream_callback)__mm_videostream_callback,
+ (void *)handle);
return CAMERA_ERROR_NONE;
}
if (handle->user_cb[_CAMERA_EVENT_TYPE_PREVIEW] == NULL) {
mm_camcorder_set_video_stream_callback(handle->mm_handle,
- (mm_camcorder_video_stream_callback)NULL,
- (void *)NULL);
+ (mm_camcorder_video_stream_callback)NULL,
+ (void *)NULL);
}
handle->user_cb[_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW] = (void *)NULL;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_WIDTH, &preview_width);
ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_HEIGHT, &preview_height);
- if (ret != CAMERA_ERROR_NONE) {
+ if (ret != CAMERA_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < preview_width.int_array.count ; i++) {
- if (!foreach_cb(preview_width.int_array.array[i], preview_height.int_array.array[i], user_data)) {
+ if (!foreach_cb(preview_width.int_array.array[i], preview_height.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_WIDTH, &capture_width);
ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_HEIGHT, &capture_height);
- if (ret != CAMERA_ERROR_NONE) {
+ if (ret != CAMERA_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < capture_width.int_array.count ; i++) {
- if (!foreach_cb(capture_width.int_array.array[i], capture_height.int_array.array[i], user_data)) {
+ if (!foreach_cb(capture_width.int_array.array[i], capture_height.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo format;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAPTURE_FORMAT, &format);
- if (ret != CAMERA_ERROR_NONE) {
+ if (ret != CAMERA_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < format.int_array.count ; i++) {
if (format.int_array.array[i] != MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
- if (!foreach_cb(format.int_array.array[i], user_data)) {
+ if (!foreach_cb(format.int_array.array[i], user_data))
break;
- }
}
}
MMCamAttrsInfo format;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FORMAT, &format);
- if (ret != CAMERA_ERROR_NONE) {
+ if (ret != CAMERA_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < format.int_array.count ; i++) {
if (format.int_array.array[i] != MM_PIXEL_FORMAT_ITLV_JPEG_UYVY) {
- if (!foreach_cb(format.int_array.array[i], user_data)) {
+ if (!foreach_cb(format.int_array.array[i], user_data))
break;
- }
}
}
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_RECOMMEND_CAMERA_WIDTH, &width_info);
ret |= mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_RECOMMEND_CAMERA_HEIGHT, &height_info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
if (width && (unsigned int)width_info.int_array.count > wide) {
*width = width_info.int_array.array[wide];
int rotation = MM_DISPLAY_ROTATION_NONE;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
- NULL);
+ MMCAM_RECOMMEND_DISPLAY_ROTATION, &rotation,
+ NULL);
if (ret == MM_ERROR_NONE) {
switch (rotation) {
case MM_DISPLAY_ROTATION_270:
*angle = 90;
break;
- default :
+ default:
*angle = 0;
break;
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_MODE, mode,
- NULL);
+ MMCAM_DISPLAY_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_MODE, mode,
- NULL);
+ MMCAM_DISPLAY_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_DISPLAY_MODE, &info);
- if (ret != CAMERA_ERROR_NONE) {
+ if (ret != CAMERA_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
if (fps == CAMERA_ATTR_FPS_AUTO) {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FPS_AUTO, true,
- NULL);
+ MMCAM_CAMERA_FPS_AUTO, true,
+ NULL);
} else {
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FPS_AUTO, false,
- MMCAM_CAMERA_FPS, fps,
- NULL);
+ MMCAM_CAMERA_FPS_AUTO, false,
+ MMCAM_CAMERA_FPS, fps,
+ NULL);
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_IMAGE_ENCODER_QUALITY, quality,
- NULL);
+ MMCAM_IMAGE_ENCODER_QUALITY, quality,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FPS, &mm_fps,
- MMCAM_CAMERA_FPS_AUTO, &is_auto,
- NULL);
+ MMCAM_CAMERA_FPS, &mm_fps,
+ MMCAM_CAMERA_FPS_AUTO, &is_auto,
+ NULL);
if (ret == MM_ERROR_NONE) {
- if (is_auto) {
+ if (is_auto)
*fps = CAMERA_ATTR_FPS_AUTO;
- } else {
+ else
*fps = mm_fps;
- }
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_IMAGE_ENCODER_QUALITY, quality,
- NULL);
+ MMCAM_IMAGE_ENCODER_QUALITY, quality,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
- NULL);
+ MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
bool should_change_focus_mode = false;
mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
+ NULL);
if (focus_mode != MM_CAMCORDER_FOCUS_MODE_TOUCH_AUTO &&
focus_mode != MM_CAMCORDER_FOCUS_MODE_CONTINUOUS &&
if (mode != CAMERA_ATTR_AF_NONE && should_change_focus_mode) {
mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_AUTO,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_AUTO,
+ NULL);
}
switch (mode) {
case CAMERA_ATTR_AF_NONE:
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
+ NULL);
break;
case CAMERA_ATTR_AF_NORMAL:
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
- NULL);
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
+ NULL);
break;
case CAMERA_ATTR_AF_MACRO:
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
- NULL);
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
+ NULL);
break;
case CAMERA_ATTR_AF_FULL:
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
- NULL);
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
+ NULL);
break;
default:
LOGE("invalid mode %d", mode);
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_TOUCH_X, x,
- MMCAM_CAMERA_AF_TOUCH_Y, y,
- NULL);
- if (ret == MM_ERROR_NONE) {
+ MMCAM_CAMERA_AF_TOUCH_X, x,
+ MMCAM_CAMERA_AF_TOUCH_Y, y,
+ NULL);
+ if (ret == MM_ERROR_NONE)
handle->focus_area_valid = true;
- }
return __convert_camera_error_code(__func__, ret);
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- int maptable[] = {MM_CAMCORDER_AUTO_EXPOSURE_OFF, /* CAMERA_ATTR_EXPOSURE_MODE_OFF */
- MM_CAMCORDER_AUTO_EXPOSURE_ALL, /* CAMERA_ATTR_EXPOSURE_MODE_ALL */
- MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1, /* CAMERA_ATTR_EXPOSURE_MODE_CENTER */
- MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1, /* CAMERA_ATTR_EXPOSURE_MODE_SPOT */
- MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1, /* CAMERA_ATTR_EXPOSURE_MODE_CUSTOM */
- };
+ int maptable[] = {
+ MM_CAMCORDER_AUTO_EXPOSURE_OFF, /* CAMERA_ATTR_EXPOSURE_MODE_OFF */
+ MM_CAMCORDER_AUTO_EXPOSURE_ALL, /* CAMERA_ATTR_EXPOSURE_MODE_ALL */
+ MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1, /* CAMERA_ATTR_EXPOSURE_MODE_CENTER */
+ MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1, /* CAMERA_ATTR_EXPOSURE_MODE_SPOT */
+ MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1, /* CAMERA_ATTR_EXPOSURE_MODE_CUSTOM */
+ };
int ret = MM_ERROR_NONE;
camera_s *handle = (camera_s *)camera;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_EXPOSURE_MODE, maptable[mode],
- NULL);
+ MMCAM_CAMERA_EXPOSURE_MODE, maptable[mode],
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_EXPOSURE_VALUE, value,
- NULL);
+ MMCAM_CAMERA_EXPOSURE_VALUE, value,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
}
int ret = MM_ERROR_NONE;
- camera_s *handle = (camera_s*)camera;
+ camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ISO, iso,
- NULL);
+ MMCAM_CAMERA_ISO, iso,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_BRIGHTNESS, level,
- NULL);
+ MMCAM_FILTER_BRIGHTNESS, level,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_CONTRAST, level,
- NULL);
+ MMCAM_FILTER_CONTRAST, level,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_WB, wb,
- NULL);
+ MMCAM_FILTER_WB, wb,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_COLOR_TONE, effect,
- NULL);
+ MMCAM_FILTER_COLOR_TONE, effect,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_SCENE_MODE, mode,
- NULL);
+ MMCAM_FILTER_SCENE_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_ENABLE, enable,
- NULL);
+ MMCAM_TAG_ENABLE, enable,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_GPS_ENABLE, true,
- MMCAM_TAG_LATITUDE, latitude,
- MMCAM_TAG_LONGITUDE, longitude,
- MMCAM_TAG_ALTITUDE, altitude,
- NULL);
+ MMCAM_TAG_GPS_ENABLE, true,
+ MMCAM_TAG_LATITUDE, latitude,
+ MMCAM_TAG_LONGITUDE, longitude,
+ MMCAM_TAG_ALTITUDE, altitude,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_GPS_ENABLE, false,
- NULL);
+ MMCAM_TAG_GPS_ENABLE, false,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_STROBE_MODE, mode,
- NULL);
+ MMCAM_STROBE_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
- NULL);
+ MMCAM_CAMERA_DIGITAL_ZOOM, zoom,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
- MMCAM_CAMERA_AF_SCAN_RANGE, &af_range,
- MMCAM_DETECT_MODE, &detect_mode,
- NULL);
+ MMCAM_CAMERA_FOCUS_MODE, &focus_mode,
+ MMCAM_CAMERA_AF_SCAN_RANGE, &af_range,
+ MMCAM_DETECT_MODE, &detect_mode,
+ NULL);
if (ret == MM_ERROR_NONE) {
switch (focus_mode) {
case MM_CAMCORDER_FOCUS_MODE_NONE:
case MM_CAMCORDER_AUTO_FOCUS_FULL:
*mode = CAMERA_ATTR_AF_FULL;
break;
- default :
+ default:
*mode = CAMERA_ATTR_AF_NORMAL;
break;
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
- CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
- };
+ int maptable[] = {
+ CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+ CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+ };
int ret = MM_ERROR_NONE;
int exposure_mode;
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_EXPOSURE_MODE, &exposure_mode,
- NULL);
+ MMCAM_CAMERA_EXPOSURE_MODE, &exposure_mode,
+ NULL);
- if (ret == CAMERA_ERROR_NONE) {
- *mode = maptable[abs(exposure_mode%9)];
- }
+ if (ret == CAMERA_ERROR_NONE)
+ *mode = maptable[abs(exposure_mode % 9)];
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_EXPOSURE_VALUE, value,
- NULL);
+ MMCAM_CAMERA_EXPOSURE_VALUE, value,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ISO, iso,
- NULL);
+ MMCAM_CAMERA_ISO, iso,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_BRIGHTNESS, level,
- NULL);
+ MMCAM_FILTER_BRIGHTNESS, level,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_CONTRAST, level,
- NULL);
+ MMCAM_FILTER_CONTRAST, level,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_WB, wb,
- NULL);
+ MMCAM_FILTER_WB, wb,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_COLOR_TONE, effect,
- NULL);
+ MMCAM_FILTER_COLOR_TONE, effect,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_FILTER_SCENE_MODE, mode,
- NULL);
+ MMCAM_FILTER_SCENE_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_ENABLE, enable,
- NULL);
+ MMCAM_TAG_ENABLE, enable,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
int desc_size;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_IMAGE_DESCRIPTION, &ndescription, &desc_size,
- NULL);
+ MMCAM_TAG_IMAGE_DESCRIPTION, &ndescription, &desc_size,
+ NULL);
if (ret == MM_ERROR_NONE) {
- if (ndescription != NULL) {
+ if (ndescription != NULL)
*description = strdup(ndescription);
- } else {
+ else
*description = strdup("");
- }
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_ORIENTATION, orientation,
- NULL);
+ MMCAM_TAG_ORIENTATION, orientation,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
int soft_size;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_SOFTWARE, &soft, &soft_size,
- NULL);
+ MMCAM_TAG_SOFTWARE, &soft, &soft_size,
+ NULL);
if (ret == MM_ERROR_NONE) {
- if (soft != NULL) {
+ if (soft != NULL)
*software = strdup(soft);
- } else {
+ else
*software = strdup("");
- }
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_TAG_LATITUDE, latitude,
- MMCAM_TAG_LONGITUDE, longitude,
- MMCAM_TAG_ALTITUDE, altitude,
- NULL);
+ MMCAM_TAG_LATITUDE, latitude,
+ MMCAM_TAG_LONGITUDE, longitude,
+ MMCAM_TAG_ALTITUDE, altitude,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_STROBE_MODE, mode,
- NULL);
+ MMCAM_STROBE_MODE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
MMCamAttrsInfo af_range;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_AF_SCAN_RANGE, &af_range);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < af_range.int_array.count ; i++) {
if (!foreach_cb(af_range.int_array.array[i], user_data)) {
return CAMERA_ERROR_INVALID_PARAMETER;
}
- int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
- CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
- -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
- -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
- -1, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
- -1 /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
- };
+ int maptable[] = {
+ CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+ CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+ -1 /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+ };
int i = 0;
int ret = MM_ERROR_NONE;
camera_s *handle = (camera_s *)camera;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_EXPOSURE_MODE, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
if (info.int_array.array[i] >= MM_CAMCORDER_AUTO_EXPOSURE_OFF &&
info.int_array.array[i] <= MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2) {
if (maptable[info.int_array.array[i]] != -1) {
- if (!foreach_cb(maptable[info.int_array.array[i]], user_data)) {
+ if (!foreach_cb(maptable[info.int_array.array[i]], user_data))
break;
- }
}
} else {
LOGW("unknown value %d", info.int_array.array[i]);
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_ISO, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_WB, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_COLOR_TONE, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_FILTER_SCENE_MODE, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_STROBE_MODE, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
int i = 0;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WIDTH, &width,
- MMCAM_CAMERA_HEIGHT, &height,
- NULL);
- if (ret != MM_ERROR_NONE) {
+ MMCAM_CAMERA_WIDTH, &width,
+ MMCAM_CAMERA_HEIGHT, &height,
+ NULL);
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
int i = 0;
ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_FLIP, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_ROTATION, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ROTATION, rotation,
- NULL);
+ MMCAM_CAMERA_ROTATION, rotation,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ROTATION, rotation,
- NULL);
+ MMCAM_CAMERA_ROTATION, rotation,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FLIP, flip,
- NULL);
+ MMCAM_CAMERA_FLIP, flip,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FLIP, flip,
- NULL);
+ MMCAM_CAMERA_FLIP, flip,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
return CAMERA_ERROR_INVALID_PARAMETER;
}
- camera_s *camera_handle = (camera_s*)camera;
+ camera_s *camera_handle = (camera_s *)camera;
*handle = camera_handle->mm_handle;
int _camera_set_relay_mm_message_callback(camera_h camera, MMMessageCallback callback, void *user_data)
{
- if( camera == NULL ){
+ if (camera == NULL) {
LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
return CAMERA_ERROR_INVALID_PARAMETER;
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_HDR_CAPTURE, mode,
- NULL);
+ MMCAM_CAMERA_HDR_CAPTURE, mode,
+ NULL);
if (ret == MM_ERROR_NONE) {
- if (mode == CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL) {
+ if (mode == CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL)
handle->hdr_keep_mode = true;
- } else {
+ else
handle->hdr_keep_mode = false;
- }
}
return __convert_camera_error_code(__func__, ret);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_HDR_CAPTURE, mode,
- NULL);
+ MMCAM_CAMERA_HDR_CAPTURE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
int mode = MM_CAMCORDER_AHS_OFF;
camera_s *handle = (camera_s *)camera;
- if (enable) {
+ if (enable)
mode = MM_CAMCORDER_AHS_ON;
- }
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ANTI_HANDSHAKE, mode,
- NULL);
+ MMCAM_CAMERA_ANTI_HANDSHAKE, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_ANTI_HANDSHAKE, enabled,
- NULL);
+ MMCAM_CAMERA_ANTI_HANDSHAKE, enabled,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
}
for (i = 0 ; i < ash_info.int_array.count ; i++) {
- if (ash_info.int_array.array[i] == MM_CAMCORDER_AHS_ON) {
+ if (ash_info.int_array.array[i] == MM_CAMCORDER_AHS_ON)
return true;
- }
}
return false;
int ret = MM_ERROR_NONE;
int mode = MM_CAMCORDER_VIDEO_STABILIZATION_OFF;
- camera_s *handle = (camera_s*)camera;
+ camera_s *handle = (camera_s *)camera;
- if (enable) {
+ if (enable)
mode = MM_CAMCORDER_VIDEO_STABILIZATION_ON;
- }
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_VIDEO_STABILIZATION, mode,
- NULL);
+ MMCAM_CAMERA_VIDEO_STABILIZATION, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_VIDEO_STABILIZATION, &mode,
- NULL);
- if (ret == MM_ERROR_NONE) {
+ MMCAM_CAMERA_VIDEO_STABILIZATION, &mode,
+ NULL);
+ if (ret == MM_ERROR_NONE)
*enabled = (mode == MM_CAMCORDER_VIDEO_STABILIZATION_ON);
- }
return __convert_camera_error_code(__func__, ret);
}
}
for (i = 0 ; i < vs_info.int_array.count ; i++) {
- if (vs_info.int_array.array[i] == MM_CAMCORDER_VIDEO_STABILIZATION_ON) {
+ if (vs_info.int_array.array[i] == MM_CAMCORDER_VIDEO_STABILIZATION_ON)
return true;
- }
}
return false;
int mode = MM_CAMCORDER_WDR_OFF;
camera_s *handle = (camera_s *)camera;
- if (enable) {
+ if (enable)
mode = MM_CAMCORDER_WDR_ON;
- }
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WDR, mode,
- NULL);
+ MMCAM_CAMERA_WDR, mode,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_WDR, &mode,
- NULL);
+ MMCAM_CAMERA_WDR, &mode,
+ NULL);
- if (ret == MM_ERROR_NONE) {
+ if (ret == MM_ERROR_NONE)
*enabled = mode;
- }
return __convert_camera_error_code(__func__, ret);
}
}
for (i = 0 ; i < info.int_array.count ; i++) {
- if (info.int_array.array[i] == MM_CAMCORDER_WDR_ON) {
+ if (info.int_array.array[i] == MM_CAMCORDER_WDR_ON)
return true;
- }
}
return false;
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
- NULL);
+ MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
- NULL);
+ MMCAM_ENCODED_PREVIEW_BITRATE, bitrate,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
- NULL);
+ MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
- NULL);
+ MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, interval,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
if (move_type == CAMERA_ATTR_PTZ_MOVE_RELATIVE) {
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- pan_type, &step,
- NULL);
+ pan_type, &step,
+ NULL);
if (ret == MM_ERROR_NONE) {
step += pan_step;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- pan_type, step,
- NULL);
+ pan_type, step,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
pan_type = MMCAM_CAMERA_PAN_ELEC;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- pan_type, pan_step,
- NULL);
+ pan_type, pan_step,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
if (move_type == CAMERA_ATTR_PTZ_MOVE_RELATIVE) {
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- tilt_type, &step,
- NULL);
+ tilt_type, &step,
+ NULL);
if (ret == MM_ERROR_NONE) {
step += tilt_step;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- tilt_type, step,
- NULL);
+ tilt_type, step,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
tilt_type = MMCAM_CAMERA_TILT_ELEC;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- tilt_type, tilt_step,
- NULL);
+ tilt_type, tilt_step,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_PTZ_TYPE, ptz_type,
- NULL);
+ MMCAM_CAMERA_PTZ_TYPE, ptz_type,
+ NULL);
if (ret != MM_ERROR_NONE)
handle->ptz_type = ptz_type;
MMCamAttrsInfo info;
ret = mm_camcorder_get_attribute_info(handle->mm_handle, MMCAM_CAMERA_PTZ_TYPE, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
- if (!foreach_cb(info.int_array.array[i], user_data)) {
+ if (!foreach_cb(info.int_array.array[i], user_data))
break;
- }
}
return CAMERA_ERROR_NONE;
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_GEOMETRY_METHOD, ¤t_method,
- NULL);
+ MMCAM_DISPLAY_GEOMETRY_METHOD, ¤t_method,
+ NULL);
if (ret != MM_ERROR_NONE) {
LOGE("INVALID_OPERATION(0x%08x)", CAMERA_ERROR_INVALID_OPERATION);
return CAMERA_ERROR_INVALID_OPERATION;
}
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_RECT_X, display_roi_area[0],
- MMCAM_DISPLAY_RECT_Y, display_roi_area[1],
- MMCAM_DISPLAY_RECT_WIDTH, display_roi_area[2],
- MMCAM_DISPLAY_RECT_HEIGHT, display_roi_area[3],
- NULL);
+ MMCAM_DISPLAY_RECT_X, display_roi_area[0],
+ MMCAM_DISPLAY_RECT_Y, display_roi_area[1],
+ MMCAM_DISPLAY_RECT_WIDTH, display_roi_area[2],
+ MMCAM_DISPLAY_RECT_HEIGHT, display_roi_area[3],
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_GEOMETRY_METHOD, ¤t_method,
- NULL);
+ MMCAM_DISPLAY_GEOMETRY_METHOD, ¤t_method,
+ NULL);
if (ret != MM_ERROR_NONE) {
LOGE("INVALID_OPERATION(0x%08x)", CAMERA_ERROR_INVALID_OPERATION);
return CAMERA_ERROR_INVALID_OPERATION;
}
ret = mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_DISPLAY_RECT_X, &x,
- MMCAM_DISPLAY_RECT_Y, &y,
- MMCAM_DISPLAY_RECT_WIDTH, &width,
- MMCAM_DISPLAY_RECT_HEIGHT, &height,
- NULL);
+ MMCAM_DISPLAY_RECT_X, &x,
+ MMCAM_DISPLAY_RECT_Y, &y,
+ MMCAM_DISPLAY_RECT_WIDTH, &width,
+ MMCAM_DISPLAY_RECT_HEIGHT, &height,
+ NULL);
if (ret == MM_ERROR_NONE) {
LOGD("get roi area : %d,%d,%dx%d", x, y, width, height);
camera_s *handle = (camera_s *)camera;
ret = mm_camcorder_get_video_caps(handle->mm_handle, caps);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_camera_error_code(__func__, ret);
- }
return CAMERA_ERROR_NONE;
}
LOGE("pid %d", pid);
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_PID_FOR_SOUND_FOCUS, pid,
- NULL);
+ MMCAM_PID_FOR_SOUND_FOCUS, pid,
+ NULL);
return __convert_camera_error_code(__func__, ret);
}
* @brief Enumeration for the muse camera apis.
*/
typedef enum {
- MUSE_CAMERA_API_CREATE, //0
+ MUSE_CAMERA_API_CREATE, /* 0 */
MUSE_CAMERA_API_DESTROY,
MUSE_CAMERA_API_START_PREVIEW,
MUSE_CAMERA_API_STOP_PREVIEW,
MUSE_CAMERA_API_START_CAPTURE,
- MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE, //5
+ MUSE_CAMERA_API_SUPPORT_CONTINUOUS_CAPTURE, /* 5 */
MUSE_CAMERA_API_START_CONTINUOUS_CAPTURE,
MUSE_CAMERA_API_STOP_CONTINUOUS_CAPTURE,
MUSE_CAMERA_API_SUPPORT_FACE_DETECTION,
MUSE_CAMERA_API_SUPPORT_ZERO_SHUTTER_LAG,
- MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB, //10
+ MUSE_CAMERA_API_SUPPORT_MEDIA_PACKET_PREVIEW_CB, /* 10 */
MUSE_CAMERA_API_GET_DEVICE_COUNT,
MUSE_CAMERA_API_START_FACE_DETECTION,
MUSE_CAMERA_API_STOP_FACE_DETECTION,
MUSE_CAMERA_API_GET_STATE,
- MUSE_CAMERA_API_START_FOCUSING, //15
+ MUSE_CAMERA_API_START_FOCUSING, /* 15 */
MUSE_CAMERA_API_CANCEL_FOCUSING,
MUSE_CAMERA_API_SET_DISPLAY,
MUSE_CAMERA_API_SET_PREVIEW_RESOLUTION,
MUSE_CAMERA_API_SET_CAPTURE_RESOLUTION,
- MUSE_CAMERA_API_SET_CAPTURE_FORMAT, //20
+ MUSE_CAMERA_API_SET_CAPTURE_FORMAT, /* 20 */
MUSE_CAMERA_API_SET_PREVIEW_FORMAT,
MUSE_CAMERA_API_GET_PREVIEW_RESOLUTION,
MUSE_CAMERA_API_SET_DISPLAY_ROTATION,
MUSE_CAMERA_API_GET_DISPLAY_ROTATION,
- MUSE_CAMERA_API_SET_DISPLAY_FLIP, //25
+ MUSE_CAMERA_API_SET_DISPLAY_FLIP, /* 25 */
MUSE_CAMERA_API_GET_DISPLAY_FLIP,
MUSE_CAMERA_API_SET_DISPLAY_VISIBLE,
MUSE_CAMERA_API_IS_DISPLAY_VISIBLE,
MUSE_CAMERA_API_SET_DISPLAY_MODE,
- MUSE_CAMERA_API_GET_DISPLAY_MODE, //30
+ MUSE_CAMERA_API_GET_DISPLAY_MODE, /* 30 */
MUSE_CAMERA_API_GET_CAPTURE_RESOLUTION,
MUSE_CAMERA_API_GET_CAPTURE_FORMAT,
MUSE_CAMERA_API_GET_PREVIEW_FORMAT,
MUSE_CAMERA_API_GET_FACING_DIRECTION,
- MUSE_CAMERA_API_GET_FLASH_STATE, //35
+ MUSE_CAMERA_API_GET_FLASH_STATE, /* 35 */
MUSE_CAMERA_API_SET_PREVIEW_CB,
MUSE_CAMERA_API_UNSET_PREVIEW_CB,
MUSE_CAMERA_API_SET_MEDIA_PACKET_PREVIEW_CB,
MUSE_CAMERA_API_UNSET_MEDIA_PACKET_PREVIEW_CB,
- MUSE_CAMERA_API_SET_STATE_CHANGED_CB, //40
+ MUSE_CAMERA_API_SET_STATE_CHANGED_CB, /* 40 */
MUSE_CAMERA_API_UNSET_STATE_CHANGED_CB,
MUSE_CAMERA_API_SET_INTERRUPTED_CB,
MUSE_CAMERA_API_UNSET_INTERRUPTED_CB,
MUSE_CAMERA_API_SET_FOCUS_CHANGED_CB,
- MUSE_CAMERA_API_UNSET_FOCUS_CHANGED_CB, //45
+ MUSE_CAMERA_API_UNSET_FOCUS_CHANGED_CB, /* 45 */
MUSE_CAMERA_API_SET_ERROR_CB,
MUSE_CAMERA_API_UNSET_ERROR_CB,
MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
- MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_FORMAT, //50
+ MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_CAPTURE_FORMAT, /* 50 */
MUSE_CAMERA_API_SET_FOREACH_SUPPORTED_PREVIEW_FORMAT,
MUSE_CAMERA_API_GET_RECOMMENDED_PREVIEW_RESOLUTION,
MUSE_CAMERA_API_ATTR_GET_LENS_ORIENTATION,
MUSE_CAMERA_API_ATTR_SET_THEATER_MODE,
- MUSE_CAMERA_API_ATTR_GET_THEATER_MODE, //55
+ MUSE_CAMERA_API_ATTR_GET_THEATER_MODE, /* 55 */
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_THEATER_MODE,
MUSE_CAMERA_API_ATTR_SET_PREVIEW_FPS,
MUSE_CAMERA_API_ATTR_SET_IMAGE_QUALITY,
MUSE_CAMERA_API_ATTR_GET_PREVIEW_FPS,
- MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY, //60
+ MUSE_CAMERA_API_ATTR_GET_IMAGE_QUALITY, /* 60 */
MUSE_CAMERA_API_ATTR_SET_ZOOM,
MUSE_CAMERA_API_ATTR_SET_AF_MODE,
MUSE_CAMERA_API_ATTR_SET_AF_AREA,
MUSE_CAMERA_API_ATTR_CLEAR_AF_AREA,
- MUSE_CAMERA_API_ATTR_SET_EXPOSURE_MODE, //65
+ MUSE_CAMERA_API_ATTR_SET_EXPOSURE_MODE, /* 65 */
MUSE_CAMERA_API_ATTR_SET_EXPOSURE,
MUSE_CAMERA_API_ATTR_SET_ISO,
MUSE_CAMERA_API_ATTR_SET_BRIGHTNESS,
MUSE_CAMERA_API_ATTR_SET_CONTRAST,
- MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE, //70
+ MUSE_CAMERA_API_ATTR_SET_WHITEBALANCE, /* 70 */
MUSE_CAMERA_API_ATTR_SET_EFFECT,
MUSE_CAMERA_API_ATTR_SET_SCENE_MODE,
MUSE_CAMERA_API_ATTR_ENABLE_TAG,
MUSE_CAMERA_API_ATTR_SET_TAG_IMAGE_DESCRIPTION,
- MUSE_CAMERA_API_ATTR_SET_TAG_ORIENTATION, //75
+ MUSE_CAMERA_API_ATTR_SET_TAG_ORIENTATION, /* 75 */
MUSE_CAMERA_API_ATTR_SET_TAG_SOFTWARE,
MUSE_CAMERA_API_ATTR_SET_GEOTAG,
MUSE_CAMERA_API_ATTR_REMOVE_GEOTAG,
MUSE_CAMERA_API_ATTR_SET_FLASH_MODE,
- MUSE_CAMERA_API_ATTR_GET_ZOOM, //80
+ MUSE_CAMERA_API_ATTR_GET_ZOOM, /* 80 */
MUSE_CAMERA_API_ATTR_GET_ZOOM_RANGE,
MUSE_CAMERA_API_ATTR_GET_AF_MODE,
MUSE_CAMERA_API_ATTR_GET_EXPOSURE_MODE,
MUSE_CAMERA_API_ATTR_GET_EXPOSURE,
- MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE, //85
+ MUSE_CAMERA_API_ATTR_GET_EXPOSURE_RANGE, /* 85 */
MUSE_CAMERA_API_ATTR_GET_ISO,
MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS,
MUSE_CAMERA_API_ATTR_GET_BRIGHTNESS_RANGE,
MUSE_CAMERA_API_ATTR_GET_CONTRAST,
- MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE, //90
+ MUSE_CAMERA_API_ATTR_GET_CONTRAST_RANGE, /* 90 */
MUSE_CAMERA_API_ATTR_GET_WHITEBALANCE,
MUSE_CAMERA_API_ATTR_GET_EFFECT,
MUSE_CAMERA_API_ATTR_GET_SCENE_MODE,
MUSE_CAMERA_API_ATTR_IS_ENABLED_TAG,
- MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION, //95
+ MUSE_CAMERA_API_ATTR_GET_TAG_IMAGE_DESCRIPTION, /* 95 */
MUSE_CAMERA_API_ATTR_GET_TAG_ORIENTATION,
MUSE_CAMERA_API_ATTR_GET_TAG_SOFTWARE,
MUSE_CAMERA_API_ATTR_GET_GEOTAG,
MUSE_CAMERA_API_ATTR_GET_FLASH_MODE,
- MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_AF_MODE, //100
+ MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_AF_MODE, /* 100 */
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EXPOSURE_MODE,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_ISO,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_WHITEBALANCE,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_EFFECT,
- MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_SCENE_MODE, //105
+ MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_SCENE_MODE, /* 105 */
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FLASH_MODE,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FPS,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_FLIP,
- MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_ROTATION, //110
+ MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_STREAM_ROTATION, /* 110 */
MUSE_CAMERA_API_ATTR_SET_STREAM_ROTATION,
MUSE_CAMERA_API_ATTR_GET_STREAM_ROTATION,
MUSE_CAMERA_API_ATTR_SET_STREAM_FLIP,
MUSE_CAMERA_API_ATTR_GET_STREAM_FLIP,
- MUSE_CAMERA_API_ATTR_SET_HDR_MODE, //115
+ MUSE_CAMERA_API_ATTR_SET_HDR_MODE, /* 115 */
MUSE_CAMERA_API_ATTR_GET_HDR_MODE,
MUSE_CAMERA_API_ATTR_IS_SUPPORTED_HDR_CAPTURE,
MUSE_CAMERA_API_ATTR_SET_HDR_CAPTURE_PROGRESS_CB,
MUSE_CAMERA_API_ATTR_UNSET_HDR_CAPTURE_PROGRESS_CB,
- MUSE_CAMERA_API_ATTR_ENABLE_ANTI_SHAKE, //120
+ MUSE_CAMERA_API_ATTR_ENABLE_ANTI_SHAKE, /* 120 */
MUSE_CAMERA_API_ATTR_IS_ENABLED_ANTI_SHAKE,
MUSE_CAMERA_API_ATTR_IS_SUPPORTED_ANTI_SHAKE,
MUSE_CAMERA_API_ATTR_ENABLE_VIDEO_STABILIZATION,
MUSE_CAMERA_API_ATTR_IS_ENABLED_VIDEO_STABILIZATION,
- MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION, //125
+ MUSE_CAMERA_API_ATTR_IS_SUPPORTED_VIDEO_STABILIZATION, /* 125 */
MUSE_CAMERA_API_ATTR_ENABLE_AUTO_CONTRAST,
MUSE_CAMERA_API_ATTR_IS_ENABLED_AUTO_CONTRAST,
MUSE_CAMERA_API_ATTR_IS_SUPPORTED_AUTO_CONTRAST,
MUSE_CAMERA_API_ATTR_DISABLE_SHUTTER_SOUND,
- MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE, //130
+ MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_BITRATE, /* 130 */
MUSE_CAMERA_API_ATTR_SET_ENCODED_PREVIEW_BITRATE,
MUSE_CAMERA_API_ATTR_GET_ENCODED_PREVIEW_GOP_INTERVAL,
MUSE_CAMERA_API_ATTR_SET_ENCODED_PREVIEW_GOP_INTERVAL,
MUSE_CAMERA_API_ATTR_SET_PAN,
- MUSE_CAMERA_API_ATTR_GET_PAN, //135
+ MUSE_CAMERA_API_ATTR_GET_PAN, /* 135 */
MUSE_CAMERA_API_ATTR_GET_PAN_RANGE,
MUSE_CAMERA_API_ATTR_SET_TILT,
MUSE_CAMERA_API_ATTR_GET_TILT,
MUSE_CAMERA_API_ATTR_GET_TILT_RANGE,
- MUSE_CAMERA_API_ATTR_SET_PTZ_TYPE, //140
+ MUSE_CAMERA_API_ATTR_SET_PTZ_TYPE, /* 140 */
MUSE_CAMERA_API_ATTR_FOREACH_SUPPORTED_PTZ_TYPE,
MUSE_CAMERA_API_SET_DISPLAY_ROI_AREA,
MUSE_CAMERA_API_GET_DISPLAY_ROI_AREA,
MUSE_CAMERA_API_RETURN_BUFFER,
- MUSE_CAMERA_API_PREVIEW_CB_RETURN, //145
+ MUSE_CAMERA_API_PREVIEW_CB_RETURN, /* 145 */
MUSE_CAMERA_API_SET_DISPLAY_REUSE_HINT,
MUSE_CAMERA_API_GET_DISPLAY_REUSE_HINT,
MUSE_CAMERA_API_MAX
* @brief Enumeration for the muse camera events.
*/
typedef enum {
- MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE, //0
+ MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE, /* 0 */
MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
MUSE_CAMERA_EVENT_TYPE_PREVIEW,
MUSE_CAMERA_EVENT_TYPE_MEDIA_PACKET_PREVIEW,
- MUSE_CAMERA_EVENT_TYPE_CAPTURE, //5
+ MUSE_CAMERA_EVENT_TYPE_CAPTURE, /* 5 */
MUSE_CAMERA_EVENT_TYPE_ERROR,
MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
- MUSE_CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR, //10
+ MUSE_CAMERA_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR, /* 10 */
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE, //15
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE, /* 15 */
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT, //20
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT, /* 20 */
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP, //25
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP, /* 25 */
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
- MUSE_CAMERA_EVENT_TYPE_NUM //28
-}muse_camera_event_e;
+ MUSE_CAMERA_EVENT_TYPE_NUM /* 28 */
+} muse_camera_event_e;
/**
* @brief Enumeration for the muse camera events class.
/**
* @brief Definition for the callback event id.
*/
-#define MUSE_CAMERA_CB_EVENT MUSE_CAMERA_API_MAX + 1 //129
+#define MUSE_CAMERA_CB_EVENT MUSE_CAMERA_API_MAX + 1 /* 148 */
/**
* @brief Definition for the max message length.
* @param[out] ret The delivered return value from the module to proxy side.
*/
#define muse_camera_msg_send(api, fd, cb_info, ret) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
__sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc.
* @param[in] cb_info The callback information, waiting for the ack from the module.
*/
#define muse_camera_msg_send_no_return(api, fd, cb_info) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
__sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
LOGE("sending message failed"); \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- } while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, waits more period of time for the ack.
* @param[out] ret The delivered return value from the module to proxy side.
*/
#define muse_camera_msg_send_longtime(api, fd, cb_info, ret) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
- __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, 0); \
__len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT_LONG); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding 1 more parameter.
* @param[in] param A single parameter to be included in the message.
*/
#define muse_camera_msg_send1(api, fd, cb_info, ret, type, param) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type __value__ = (type)param; \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding 1 more parameter.
* @param[in] param A single parameter to be included in the message.
*/
#define muse_camera_msg_send1_no_return(api, fd, cb_info, type, param) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type __value__ = (type)param; \
LOGE("sending message failed"); \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding 2 more parameters.
* @param[in] param2 The 2nd parameter to be included in the message.
*/
#define muse_camera_msg_send2(api, fd, cb_info, ret, type1, param1, type2, param2) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding 3 more parameters.
* @param[in] param3 The 3rd parameter to be included in the message.
*/
#define muse_camera_msg_send3(api, fd, cb_info, ret, type1, param1, type2, param2, type3, param3) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding an array data.
* @param[in] datum_size The size of the array.
*/
#define muse_camera_msg_send_array(api, fd, cb_info, ret, param, length, datum_size) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
int *__value__ = (int *)param; \
__sndMsg__ = muse_core_msg_json_factory_new(api, \
MUSE_TYPE_ARRAY, #param, \
- datum_size == sizeof(int)? length / sizeof(int) : \
- length / sizeof(int) + (length % sizeof(int)?1:0), \
+ datum_size == sizeof(int) ? length / sizeof(int) : \
+ length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
__value__, \
0); \
__len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Send the message from proxy to module via ipc, adding an array data and value.
* @param[in] param2 The 2rd parameter to be included in the message.
*/
#define muse_camera_msg_send_array_and_value(api, fd, cb_info, ret, param, length, datum_size, type, param2) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
int *__value__ = (int *)param; \
__sndMsg__ = muse_core_msg_json_factory_new(api, \
MUSE_TYPE_##type, #param2, __value2__, \
MUSE_TYPE_ARRAY, #param, \
- datum_size == sizeof(int)? length / sizeof(int) : \
- length / sizeof(int) + (length % sizeof(int)?1:0), \
+ datum_size == sizeof(int) ? length / sizeof(int) : \
+ length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
__value__, \
0); \
__len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
} else \
ret = _client_wait_for_cb_return(api, cb_info, CALLBACK_TIME_OUT); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the ack message from the server to client side.
* @param[in] module The module info for the ipc transportation.
*/
#define muse_camera_msg_return(api, class, ret, module) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
__sndMsg__ = muse_core_msg_json_factory_new(api, \
ret = CAMERA_ERROR_INVALID_OPERATION; \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the ack message from the server to client side.
* @param[in] param A parameter to be included in the message.
*/
#define muse_camera_msg_return1(api, class, ret, module, type, param) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type __value__ = (type)param; \
ret = CAMERA_ERROR_INVALID_OPERATION; \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the ack message from the server to client side, adding 2 parameters.
* @param[in] param2 The 2nd parameter to be included in the message.
*/
#define muse_camera_msg_return2(api, class, ret, module, type1, param1, type2, param2) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
ret = CAMERA_ERROR_INVALID_OPERATION; \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the ack message from the server to client side, adding 3 parameters.
* @param[in] param3 The 3rd parameter to be included in the message.
*/
#define muse_camera_msg_return3(api, class, ret, module, type1, param1, type2, param2, type3, param3) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
ret = CAMERA_ERROR_INVALID_OPERATION; \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the ack message from the server to client side, adding array parameter.
* @param[in] datum_size The size of the array.
*/
#define muse_camera_msg_return_array(api, class, ret, module, param, length, datum_size) \
- do{ \
+ do { \
char *__sndMsg__; \
int __len__; \
int *__value__ = (int *)param; \
MUSE_TYPE_INT, PARAM_API_CLASS, class, \
MUSE_TYPE_INT, PARAM_RET, ret, \
MUSE_TYPE_ARRAY, #param, \
- datum_size == sizeof(int)? length / sizeof(int) : \
- length / sizeof(int) + (length % sizeof(int)?1:0), \
+ datum_size == sizeof(int) ? length / sizeof(int) : \
+ length / sizeof(int) + (length % sizeof(int) ? 1 : 0), \
__value__, \
0); \
__len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
ret = CAMERA_ERROR_INVALID_OPERATION; \
} \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the event ack message from the server to client side, adding array parameter.
* @param[in] module The module info for the ipc transportation.
*/
#define muse_camera_msg_event(api, event, class, module) \
- do{ \
+ do { \
char *__sndMsg__; \
__sndMsg__ = muse_core_msg_json_factory_new(api, \
MUSE_TYPE_INT, PARAM_EVENT, event, \
0); \
muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the event ack message from the server to client side, adding array parameter.
* @param[in] param A parameter to be included in the message.
*/
#define muse_camera_msg_event1(api, event, class, module, type, param) \
- do{ \
+ do { \
char *__sndMsg__; \
type __value__ = (type)param; \
__sndMsg__ = muse_core_msg_json_factory_new(api, \
0); \
muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the event ack message from the server to client side, adding array parameter.
* @param[in] param2 The 2nd parameter to be included in the message.
*/
#define muse_camera_msg_event2(api, event, class, module, type1, param1, type2, param2) \
- do{ \
+ do { \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
0); \
muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
/**
* @brief Returning the event ack message from the server to client side, adding array parameter.
* @param[in] param3 The 3rd parameter to be included in the message.
*/
#define muse_camera_msg_event3(api, event, class, module, type1, param1, type2, param2, type3, param3) \
- do{ \
+ do { \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
0); \
muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
muse_core_msg_json_factory_free(__sndMsg__); \
- }while(0)
+ } while (0)
#ifdef __cplusplus
}
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_THEATER_MODE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_af_mode(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_AF_MODE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_exposure_mode(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EXPOSURE_MODE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_iso_mode(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_ISO,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_whitebalance(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_WHITEBALANCE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_effect(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_EFFECT,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_scene_mode(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_SCENE_MODE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_flash_mode(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FLASH_MODE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
int _camera_dispatcher_callback_supported_flash_mode2(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_fps_by_resolution(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_FPS_BY_RESOLUTION,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_stream_flip(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_FLIP,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_stream_rotation(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_STREAM_ROTATION,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_capture_format(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_FORMAT,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_preview_format(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_FORMAT,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
void _camera_dispatcher_callback_supported_preview_resolution(int param1, int param2, void *user_data)
LOGD("Enter!! param1 : %d, param2 : %d", param1, param2);
muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1,
- INT, param2);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PREVIEW_RESOLUTION,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1,
+ INT, param2);
}
void _camera_dispatcher_callback_supported_capture_resolution(int param1, int param2, void *user_data)
LOGD("Enter!! param1 : %d, param2 : %d", param1, param2);
muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1,
- INT, param2);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_CAPTURE_RESOLUTION,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1,
+ INT, param2);
}
void _camera_dispatcher_callback_supported_ptz_type(int param1, void *user_data)
LOGD("Enter!! param : %d", param1);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, param1);
+ MUSE_CAMERA_EVENT_TYPE_FOREACH_SUPPORTED_PTZ_TYPE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, param1);
}
static int _camera_remove_export_data(muse_module_h module, int key, int remove_all)
tbm_bo_unmap(bo_main);
tbm_key_main = tbm_bo_export(bo_main);
- if(tbm_key_main == 0) {
+ if (tbm_key_main == 0) {
LOGE("Create key_info ERROR!!");
goto main_image_error;
}
tbm_bo_unmap(bo_post);
tbm_key_post = tbm_bo_export(bo_post);
- if(tbm_key_post == 0) {
+ if (tbm_key_post == 0) {
LOGE("Create key_info ERROR!!");
goto postview_image_error;
}
tbm_bo_unmap(bo_thumb);
tbm_key_thumb = tbm_bo_export(bo_thumb);
- if(tbm_key_thumb == 0) {
+ if (tbm_key_thumb == 0) {
LOGE("Create key_info ERROR!!");
goto thumbnail_image_error;
}
/* send message */
muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_CAPTURE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
- module,
- INT, tbm_key_main,
- INT, tbm_key_post,
- INT, tbm_key_thumb);
+ MUSE_CAMERA_EVENT_TYPE_CAPTURE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_SUB,
+ module,
+ INT, tbm_key_main,
+ INT, tbm_key_post,
+ INT, tbm_key_thumb);
return;
previous, current, by_policy);
muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, previous,
- INT, current,
- INT, by_policy);
+ MUSE_CAMERA_EVENT_TYPE_STATE_CHANGE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, previous,
+ INT, current,
+ INT, by_policy);
return;
}
LOGD("Enter - policy %d, state previous %d, current %d", policy, previous, current);
muse_camera_msg_event3(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, policy,
- INT, previous,
- INT, current);
+ MUSE_CAMERA_EVENT_TYPE_INTERRUPTED,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, policy,
+ INT, previous,
+ INT, current);
return;
}
case MM_CAM_STREAM_DATA_ENCODED:
data_size = stream->data.encoded.length_data;
break;
- default :
+ default:
LOGW("unknown data type %d", stream->data_type);
break;
}
case MM_CAM_STREAM_DATA_ENCODED:
memcpy(buf_pos, stream->data.encoded.data, stream->data.encoded.length_data);
break;
- default :
+ default:
break;
}
}
tbm_key = tbm_bo_export(bo);
- if(tbm_key == 0) {
+ if (tbm_key == 0) {
LOGE("Create key_info ERROR!!");
goto _PREVIEW_CB_ERROR;
}
/*LOGD("wait preview callback return message");*/
if (!CHECK_PREVIEW_CB(muse_camera, PREVIEW_CB_TYPE_EVAS)) {
- gint64 end_time = g_get_monotonic_time () + G_TIME_SPAN_SECOND;
+ gint64 end_time = g_get_monotonic_time() + G_TIME_SPAN_SECOND;
if (!g_cond_wait_until(&muse_camera->preview_cb_cond, &muse_camera->preview_cb_lock, end_time)) {
LOGW("preview callback return message timeout");
LOGD("Enter");
muse_camera_msg_event(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module);
+ MUSE_CAMERA_EVENT_TYPE_CAPTURE_COMPLETE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module);
return;
}
/* send message */
muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, count,
- INT, tbm_key);
+ MUSE_CAMERA_EVENT_TYPE_FACE_DETECTION,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, count,
+ INT, tbm_key);
} else {
LOGW("invalid count for face detection - %d", count);
}
LOGD("Enter - state %d", state);
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, state);
+ MUSE_CAMERA_EVENT_TYPE_FOCUS_CHANGE,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, state);
return;
}
LOGD("Enter - error 0x%x, current_state %d", error, current_state);
muse_camera_msg_event2(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_ERROR,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, error,
- INT, current_state);
+ MUSE_CAMERA_EVENT_TYPE_ERROR,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, error,
+ INT, current_state);
return;
}
LOGD("Enter");
muse_camera_msg_event1(MUSE_CAMERA_CB_EVENT,
- MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
- MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
- module,
- INT, percent);
+ MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS,
+ MUSE_CAMERA_EVENT_CLASS_THREAD_MAIN,
+ module,
+ INT, percent);
return;
}
}
ret = legacy_camera_start_capture(muse_camera->camera_handle,
- (camera_capturing_cb)capturing_cb,
- (camera_capture_completed_cb)completed_cb,
- (void *)module);
+ (camera_capturing_cb)capturing_cb,
+ (camera_capture_completed_cb)completed_cb,
+ (void *)module);
muse_camera_msg_return(api, class, ret, module);
LOGD("Enter, handle : %p, module : %p", muse_camera, module);
ret = legacy_camera_start_continuous_capture(muse_camera->camera_handle,
- count,
- interval,
- (camera_capturing_cb)_camera_dispatcher_capturing_cb,
- (camera_capture_completed_cb)_camera_dispatcher_capture_completed_cb,
- (void *)module);
+ count,
+ interval,
+ (camera_capturing_cb)_camera_dispatcher_capturing_cb,
+ (camera_capture_completed_cb)_camera_dispatcher_capture_completed_cb,
+ (void *)module);
muse_camera_msg_return(api, class, ret, module);
LOGD("Enter, handle : 0x%x, module : %d", muse_camera, module);
ret = legacy_camera_start_face_detection(muse_camera->camera_handle,
- (camera_face_detected_cb)_camera_dispatcher_face_detected_cb,
- (void *)module);
+ (camera_face_detected_cb)_camera_dispatcher_face_detected_cb,
+ (void *)module);
muse_camera_msg_return(api, class, ret, module);
if (type == CAMERA_DISPLAY_TYPE_EVAS) {
ret = legacy_camera_set_preview_cb(muse_camera->camera_handle,
- (camera_preview_cb)_camera_dispatcher_preview_cb,
- (void *)module);
+ (camera_preview_cb)_camera_dispatcher_preview_cb,
+ (void *)module);
if (ret == CAMERA_ERROR_NONE)
SET_PREVIEW_CB_TYPE(muse_camera, PREVIEW_CB_TYPE_EVAS);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_preview_cb(muse_camera->camera_handle,
- (camera_preview_cb)_camera_dispatcher_preview_cb,
- (void *)module);
+ (camera_preview_cb)_camera_dispatcher_preview_cb,
+ (void *)module);
if (ret == CAMERA_ERROR_NONE)
SET_PREVIEW_CB_TYPE(muse_camera, PREVIEW_CB_TYPE_USER);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_media_packet_preview_cb(muse_camera->camera_handle,
- (camera_preview_cb)_camera_dispatcher_preview_cb,
- (void *)module);
+ (camera_preview_cb)_camera_dispatcher_preview_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_state_changed_cb(muse_camera->camera_handle,
- (camera_state_changed_cb)_camera_dispatcher_state_changed_cb,
- (void *)module);
+ (camera_state_changed_cb)_camera_dispatcher_state_changed_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_interrupted_cb(muse_camera->camera_handle,
- (camera_interrupted_cb)_camera_dispatcher_interrupted_cb,
- (void *)module);
+ (camera_interrupted_cb)_camera_dispatcher_interrupted_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_focus_changed_cb(muse_camera->camera_handle,
- (camera_focus_changed_cb)_camera_dispatcher_focus_changed_cb,
- (void *)module);
+ (camera_focus_changed_cb)_camera_dispatcher_focus_changed_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_set_error_cb(muse_camera->camera_handle,
- (camera_error_cb)_camera_dispatcher_error_cb,
- (void *)module);
+ (camera_error_cb)_camera_dispatcher_error_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_foreach_supported_preview_resolution(muse_camera->camera_handle,
- (camera_supported_preview_resolution_cb)_camera_dispatcher_callback_supported_preview_resolution,
- (void *)module);
+ (camera_supported_preview_resolution_cb)_camera_dispatcher_callback_supported_preview_resolution,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_foreach_supported_capture_resolution(muse_camera->camera_handle,
- (camera_supported_capture_resolution_cb)_camera_dispatcher_callback_supported_capture_resolution,
- (void *)module);
+ (camera_supported_capture_resolution_cb)_camera_dispatcher_callback_supported_capture_resolution,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_foreach_supported_capture_format(muse_camera->camera_handle,
- (camera_supported_capture_format_cb)_camera_dispatcher_callback_supported_capture_format,
- (void *)module);
+ (camera_supported_capture_format_cb)_camera_dispatcher_callback_supported_capture_format,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_foreach_supported_preview_format(muse_camera->camera_handle,
- (camera_supported_preview_format_cb)_camera_dispatcher_callback_supported_preview_format,
- (void *)module);
+ (camera_supported_preview_format_cb)_camera_dispatcher_callback_supported_preview_format,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_theater_mode(muse_camera->camera_handle,
- (camera_attr_supported_theater_mode_cb)_camera_dispatcher_callback_supported_theater_mode,
- (void *)module);
+ (camera_attr_supported_theater_mode_cb)_camera_dispatcher_callback_supported_theater_mode,
+ (void *)module);
muse_camera_msg_return(api, class, ret, module);
ret = legacy_camera_get_device_type(muse_camera->camera_handle, &device_type);
if (ret == CAMERA_ERROR_NONE) {
if (device_type == CAMERA_DEVICE_CAMERA0)
- muse_core_client_set_value(module, "flash_state_camera0", set_mode>0?1:0);
+ muse_core_client_set_value(module, "flash_state_camera0", set_mode > 0 ? 1 : 0);
else
- muse_core_client_set_value(module, "flash_state_camera1", set_mode>0?1:0);
+ muse_core_client_set_value(module, "flash_state_camera1", set_mode > 0 ? 1 : 0);
}
}
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_af_mode(muse_camera->camera_handle,
- (camera_attr_supported_af_mode_cb)_camera_dispatcher_callback_supported_af_mode,
- (void *)module);
+ (camera_attr_supported_af_mode_cb)_camera_dispatcher_callback_supported_af_mode,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : 0x%x, api : %d", muse_camera, api);
ret = legacy_camera_attr_foreach_supported_exposure_mode(muse_camera->camera_handle,
- (camera_attr_supported_exposure_mode_cb)_camera_dispatcher_callback_supported_exposure_mode,
- (void *)module);
+ (camera_attr_supported_exposure_mode_cb)_camera_dispatcher_callback_supported_exposure_mode,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_iso(muse_camera->camera_handle,
- (camera_attr_supported_iso_cb)_camera_dispatcher_callback_supported_iso_mode,
- (void *)module);
+ (camera_attr_supported_iso_cb)_camera_dispatcher_callback_supported_iso_mode,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_whitebalance(muse_camera->camera_handle,
- (camera_attr_supported_whitebalance_cb)_camera_dispatcher_callback_supported_whitebalance,
- (void *)module);
+ (camera_attr_supported_whitebalance_cb)_camera_dispatcher_callback_supported_whitebalance,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_effect(muse_camera->camera_handle,
- (camera_attr_supported_effect_cb)_camera_dispatcher_callback_supported_effect,
- (void *)module);
+ (camera_attr_supported_effect_cb)_camera_dispatcher_callback_supported_effect,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_scene_mode(muse_camera->camera_handle,
- (camera_attr_supported_scene_mode_cb)_camera_dispatcher_callback_supported_scene_mode,
- (void *)module);
+ (camera_attr_supported_scene_mode_cb)_camera_dispatcher_callback_supported_scene_mode,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_flash_mode(muse_camera->camera_handle,
- (camera_attr_supported_flash_mode_cb)_camera_dispatcher_callback_supported_flash_mode,
- (void *)module);
+ (camera_attr_supported_flash_mode_cb)_camera_dispatcher_callback_supported_flash_mode,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_fps(muse_camera->camera_handle,
- (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps,
- (void *)module);
+ (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_fps_by_resolution(muse_camera->camera_handle,
- width, height,
- (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps_by_resolution,
- (void *)module);
+ width, height,
+ (camera_attr_supported_fps_cb)_camera_dispatcher_callback_supported_fps_by_resolution,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_stream_flip(muse_camera->camera_handle,
- (camera_attr_supported_stream_flip_cb)_camera_dispatcher_callback_supported_stream_flip,
- (void *)module);
+ (camera_attr_supported_stream_flip_cb)_camera_dispatcher_callback_supported_stream_flip,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_stream_rotation(muse_camera->camera_handle,
- (camera_attr_supported_stream_rotation_cb)_camera_dispatcher_callback_supported_stream_rotation,
- (void *)module);
+ (camera_attr_supported_stream_rotation_cb)_camera_dispatcher_callback_supported_stream_rotation,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_set_hdr_capture_progress_cb(muse_camera->camera_handle,
- (camera_attr_hdr_progress_cb)_camera_dispatcher_hdr_progress_cb,
- (void *)module);
+ (camera_attr_hdr_progress_cb)_camera_dispatcher_hdr_progress_cb,
+ (void *)module);
LOGD("ret : 0x%x", ret);
LOGD("handle : %p", muse_camera);
ret = legacy_camera_attr_foreach_supported_ptz_type(muse_camera->camera_handle,
- (camera_attr_supported_ptz_type_cb)_camera_dispatcher_callback_supported_ptz_type,
- (void *)module);
+ (camera_attr_supported_ptz_type_cb)_camera_dispatcher_callback_supported_ptz_type,
+ (void *)module);
LOGD("ret : 0x%x", ret);
Name: mmsvc-camera
Summary: A Camera module for muse server
-Version: 0.2.41
+Version: 0.2.42
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0