From 43a24de64d9650bc734cbd070ee78812b01aec69 Mon Sep 17 00:00:00 2001 From: Tae-Young Chung Date: Fri, 1 Apr 2016 15:55:15 +0900 Subject: [PATCH] Applied C/C++ coding rules Change-Id: I7b2335e83af1c49134bcc2554e93fe49eeb6e46c Signed-off-by: Tae-Young Chung --- include/mv_barcode_type.h | 60 +++--- include/mv_common.h | 218 ++++++++++----------- include/mv_face_type.h | 28 ++- include/mv_private.h | 56 +++--- include/mv_surveillance_private.h | 11 +- mv_image/image/include/ImageConfig.h | 1 - mv_image/image/include/Recognition/ImageObject.h | 1 - mv_image/image/include/Tracking/MFTracker.h | 2 +- .../surveillance/include/EventManager.h | 6 - .../include/EventTriggerPersonAppearance.h | 2 - mv_surveillance/surveillance/include/HoGDetector.h | 6 +- .../surveillance/include/SurveillanceHelper.h | 1 - packaging/capi-media-vision.spec | 2 +- test/testsuites/barcode/barcode_test_suite.c | 2 +- .../common/image_helper/include/ImageHelper.h | 1 - .../common/testsuite_common/mv_testsuite_common.h | 29 ++- test/testsuites/common/video_helper/mv_log_cfg.h | 54 +++-- .../common/video_helper/mv_video_helper.c | 8 +- 18 files changed, 226 insertions(+), 262 deletions(-) diff --git a/include/mv_barcode_type.h b/include/mv_barcode_type.h index d8b2e74..af95729 100644 --- a/include/mv_barcode_type.h +++ b/include/mv_barcode_type.h @@ -37,17 +37,16 @@ extern "C" { * * @since_tizen 2.4 */ -typedef enum -{ - MV_BARCODE_QR, /**< 2D barcode - Quick Response code */ - MV_BARCODE_UPC_A, /**< 1D barcode - Universal Product Code with 12-digit */ - MV_BARCODE_UPC_E, /**< 1D barcode - Universal Product Code with 6-digit */ - MV_BARCODE_EAN_8, /**< 1D barcode - International Article Number with 8-digit */ - MV_BARCODE_EAN_13, /**< 1D barcode - International Article Number with 13-digit */ - MV_BARCODE_CODE128, /**< 1D barcode - Code 128 */ - MV_BARCODE_CODE39, /**< 1D barcode - Code 39 */ - MV_BARCODE_I2_5, /**< 1D barcode - Interleaved Two of Five */ - MV_BARCODE_UNDEFINED /**< Undefined */ +typedef enum { + MV_BARCODE_QR, /**< 2D barcode - Quick Response code */ + MV_BARCODE_UPC_A, /**< 1D barcode - Universal Product Code with 12-digit */ + MV_BARCODE_UPC_E, /**< 1D barcode - Universal Product Code with 6-digit */ + MV_BARCODE_EAN_8, /**< 1D barcode - International Article Number with 8-digit */ + MV_BARCODE_EAN_13, /**< 1D barcode - International Article Number with 13-digit */ + MV_BARCODE_CODE128, /**< 1D barcode - Code 128 */ + MV_BARCODE_CODE39, /**< 1D barcode - Code 39 */ + MV_BARCODE_I2_5, /**< 1D barcode - Interleaved Two of Five */ + MV_BARCODE_UNDEFINED /**< Undefined */ } mv_barcode_type_e; /** @@ -56,13 +55,12 @@ typedef enum * @since_tizen 2.4 * @remarks This is unavailable for 1D barcodes */ -typedef enum -{ - MV_BARCODE_QR_ECC_LOW, /**< Recovery up to 7% losses */ - MV_BARCODE_QR_ECC_MEDIUM, /**< Recovery up to 15% losses */ - MV_BARCODE_QR_ECC_QUARTILE, /**< Recovery up to 25% losses */ - MV_BARCODE_QR_ECC_HIGH, /**< Recovery up to 30% losses */ - MV_BARCODE_QR_ECC_UNAVAILABLE /**< Unavailable */ +typedef enum { + MV_BARCODE_QR_ECC_LOW, /**< Recovery up to 7% losses */ + MV_BARCODE_QR_ECC_MEDIUM, /**< Recovery up to 15% losses */ + MV_BARCODE_QR_ECC_QUARTILE, /**< Recovery up to 25% losses */ + MV_BARCODE_QR_ECC_HIGH, /**< Recovery up to 30% losses */ + MV_BARCODE_QR_ECC_UNAVAILABLE /**< Unavailable */ } mv_barcode_qr_ecc_e; /** @@ -71,13 +69,12 @@ typedef enum * @since_tizen 2.4 * @remarks This is unavailable for 1D barcodes */ -typedef enum -{ - MV_BARCODE_QR_MODE_NUMERIC, /**< Numeric digits */ - MV_BARCODE_QR_MODE_ALPHANUMERIC, /**< Alphanumeric characters */ - MV_BARCODE_QR_MODE_BYTE, /**< Raw 8-bit bytes */ - MV_BARCODE_QR_MODE_UTF8, /**< UTF-8 character encoding */ - MV_BARCODE_QR_MODE_UNAVAILABLE /**< Unavailable */ +typedef enum { + MV_BARCODE_QR_MODE_NUMERIC, /**< Numeric digits */ + MV_BARCODE_QR_MODE_ALPHANUMERIC, /**< Alphanumeric characters */ + MV_BARCODE_QR_MODE_BYTE, /**< Raw 8-bit bytes */ + MV_BARCODE_QR_MODE_UTF8, /**< UTF-8 character encoding */ + MV_BARCODE_QR_MODE_UNAVAILABLE /**< Unavailable */ } mv_barcode_qr_mode_e; /** @@ -85,13 +82,12 @@ typedef enum * * @since_tizen 2.4 */ -typedef enum -{ - MV_BARCODE_IMAGE_FORMAT_UNAVAILABLE = -1, /** Unavailable image format */ - MV_BARCODE_IMAGE_FORMAT_BMP, /**< BMP image format */ - MV_BARCODE_IMAGE_FORMAT_JPG, /**< JPEG image format */ - MV_BARCODE_IMAGE_FORMAT_PNG, /**< PNG image format */ - MV_BARCODE_IMAGE_FORMAT_NUM, /**< The number of supported image format */ +typedef enum { + MV_BARCODE_IMAGE_FORMAT_UNAVAILABLE = -1, /** Unavailable image format */ + MV_BARCODE_IMAGE_FORMAT_BMP, /**< BMP image format */ + MV_BARCODE_IMAGE_FORMAT_JPG, /**< JPEG image format */ + MV_BARCODE_IMAGE_FORMAT_PNG, /**< PNG image format */ + MV_BARCODE_IMAGE_FORMAT_NUM, /**< The number of supported image format */ } mv_barcode_image_format_e; /** diff --git a/include/mv_common.h b/include/mv_common.h index f8eb83e..11c640e 100644 --- a/include/mv_common.h +++ b/include/mv_common.h @@ -38,10 +38,9 @@ extern "C" { * * @since_tizen 2.4 */ -typedef struct -{ - int x; /**< X-axis coordinate of the point in 2D space */ - int y; /**< Y-axis coordinate of the point in 2D space */ +typedef struct { + int x; /**< X-axis coordinate of the point in 2D space */ + int y; /**< Y-axis coordinate of the point in 2D space */ } mv_point_s; /** @@ -49,10 +48,9 @@ typedef struct * * @since_tizen 2.4 */ -typedef struct -{ - mv_point_s points[4]; /**< Four points that define object bounding - quadrangle */ +typedef struct { + mv_point_s points[4]; /**< Four points that define object bounding + quadrangle */ } mv_quadrangle_s; /** @@ -61,11 +59,10 @@ typedef struct * * @since_tizen 2.4 */ -typedef struct -{ - mv_point_s point; /**< Top left corner of rectangle coordinates */ - int width; /**< Width of the bounding rectangle */ - int height; /**< Height of the bounding rectangle */ +typedef struct { + mv_point_s point; /**< Top left corner of rectangle coordinates */ + int width; /**< Width of the bounding rectangle */ + int height; /**< Height of the bounding rectangle */ } mv_rectangle_s; /** @@ -73,34 +70,33 @@ typedef struct * * @since_tizen 2.4 */ -typedef enum -{ - MEDIA_VISION_ERROR_NONE - = TIZEN_ERROR_NONE, /**< Successful */ - MEDIA_VISION_ERROR_NOT_SUPPORTED - = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ - MEDIA_VISION_ERROR_MSG_TOO_LONG - = TIZEN_ERROR_MSG_TOO_LONG, /**< Message too long */ - MEDIA_VISION_ERROR_NO_DATA - = TIZEN_ERROR_NO_DATA, /**< No data */ - MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE - = TIZEN_ERROR_KEY_NOT_AVAILABLE, /**< Key not available */ - MEDIA_VISION_ERROR_OUT_OF_MEMORY - = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - MEDIA_VISION_ERROR_INVALID_PARAMETER - = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - MEDIA_VISION_ERROR_INVALID_OPERATION - = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */ - MEDIA_VISION_ERROR_PERMISSION_DENIED - = TIZEN_ERROR_NOT_PERMITTED, /**< Not permitted */ - MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT - = TIZEN_ERROR_MEDIA_VISION | 0x01, /**< Not supported format */ - MEDIA_VISION_ERROR_INTERNAL - = TIZEN_ERROR_MEDIA_VISION | 0x02, /**< Internal error */ - MEDIA_VISION_ERROR_INVALID_DATA - = TIZEN_ERROR_MEDIA_VISION | 0x03, /**< Invalid data */ - MEDIA_VISION_ERROR_INVALID_PATH - = TIZEN_ERROR_MEDIA_VISION | 0x04, /**< Invalid path (Since 3.0) */ +typedef enum { + MEDIA_VISION_ERROR_NONE + = TIZEN_ERROR_NONE, /**< Successful */ + MEDIA_VISION_ERROR_NOT_SUPPORTED + = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ + MEDIA_VISION_ERROR_MSG_TOO_LONG + = TIZEN_ERROR_MSG_TOO_LONG, /**< Message too long */ + MEDIA_VISION_ERROR_NO_DATA + = TIZEN_ERROR_NO_DATA, /**< No data */ + MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE + = TIZEN_ERROR_KEY_NOT_AVAILABLE, /**< Key not available */ + MEDIA_VISION_ERROR_OUT_OF_MEMORY + = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + MEDIA_VISION_ERROR_INVALID_PARAMETER + = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + MEDIA_VISION_ERROR_INVALID_OPERATION + = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */ + MEDIA_VISION_ERROR_PERMISSION_DENIED + = TIZEN_ERROR_NOT_PERMITTED, /**< Not permitted */ + MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT + = TIZEN_ERROR_MEDIA_VISION | 0x01, /**< Not supported format */ + MEDIA_VISION_ERROR_INTERNAL + = TIZEN_ERROR_MEDIA_VISION | 0x02, /**< Internal error */ + MEDIA_VISION_ERROR_INVALID_DATA + = TIZEN_ERROR_MEDIA_VISION | 0x03, /**< Invalid data */ + MEDIA_VISION_ERROR_INVALID_PATH + = TIZEN_ERROR_MEDIA_VISION | 0x04, /**< Invalid path (Since 3.0) */ } mv_error_e; /** @@ -109,12 +105,11 @@ typedef enum * * @since_tizen 2.4 */ -typedef enum -{ - MV_ENGINE_CONFIG_ATTR_TYPE_DOUBLE, /**< Double attribute type */ - MV_ENGINE_CONFIG_ATTR_TYPE_INTEGER, /**< Integer attribute type */ - MV_ENGINE_CONFIG_ATTR_TYPE_BOOLEAN, /**< Boolean attribute type */ - MV_ENGINE_CONFIG_ATTR_TYPE_STRING /**< String attribute type */ +typedef enum { + MV_ENGINE_CONFIG_ATTR_TYPE_DOUBLE, /**< Double attribute type */ + MV_ENGINE_CONFIG_ATTR_TYPE_INTEGER, /**< Integer attribute type */ + MV_ENGINE_CONFIG_ATTR_TYPE_BOOLEAN, /**< Boolean attribute type */ + MV_ENGINE_CONFIG_ATTR_TYPE_STRING /**< String attribute type */ } mv_config_attribute_type_e; /** @@ -122,20 +117,19 @@ typedef enum * * @since_tizen 2.4 */ -typedef enum -{ - MEDIA_VISION_COLORSPACE_INVALID, /**< The colorspace type is invalid */ - MEDIA_VISION_COLORSPACE_Y800, /**< The colorspace type is Y800 */ - MEDIA_VISION_COLORSPACE_I420, /**< The colorspace type is I420 */ - MEDIA_VISION_COLORSPACE_NV12, /**< The colorspace type is NV12 */ - MEDIA_VISION_COLORSPACE_YV12, /**< The colorspace type is YV12 */ - MEDIA_VISION_COLORSPACE_NV21, /**< The colorspace type is NV21 */ - MEDIA_VISION_COLORSPACE_YUYV, /**< The colorspace type is YUYV */ - MEDIA_VISION_COLORSPACE_UYVY, /**< The colorspace type is UYVY */ - MEDIA_VISION_COLORSPACE_422P, /**< The colorspace type is 422P */ - MEDIA_VISION_COLORSPACE_RGB565, /**< The colorspace type is RGB565 */ - MEDIA_VISION_COLORSPACE_RGB888, /**< The colorspace type is RGB888 */ - MEDIA_VISION_COLORSPACE_RGBA, /**< The colorspace type is RGBA */ +typedef enum { + MEDIA_VISION_COLORSPACE_INVALID, /**< The colorspace type is invalid */ + MEDIA_VISION_COLORSPACE_Y800, /**< The colorspace type is Y800 */ + MEDIA_VISION_COLORSPACE_I420, /**< The colorspace type is I420 */ + MEDIA_VISION_COLORSPACE_NV12, /**< The colorspace type is NV12 */ + MEDIA_VISION_COLORSPACE_YV12, /**< The colorspace type is YV12 */ + MEDIA_VISION_COLORSPACE_NV21, /**< The colorspace type is NV21 */ + MEDIA_VISION_COLORSPACE_YUYV, /**< The colorspace type is YUYV */ + MEDIA_VISION_COLORSPACE_UYVY, /**< The colorspace type is UYVY */ + MEDIA_VISION_COLORSPACE_422P, /**< The colorspace type is 422P */ + MEDIA_VISION_COLORSPACE_RGB565, /**< The colorspace type is RGB565 */ + MEDIA_VISION_COLORSPACE_RGB888, /**< The colorspace type is RGB888 */ + MEDIA_VISION_COLORSPACE_RGBA, /**< The colorspace type is RGBA */ } mv_colorspace_e; /** @@ -179,7 +173,7 @@ typedef void *mv_source_h; * @see mv_destroy_source() */ int mv_create_source( - mv_source_h *source); + mv_source_h *source); /** * @brief Destroys the source handle and releases all its resources. @@ -194,7 +188,7 @@ int mv_create_source( * @see mv_create_source() */ int mv_destroy_source( - mv_source_h source); + mv_source_h source); /** * @brief Fills the media source based on the media packet. @@ -217,8 +211,8 @@ int mv_destroy_source( * @see mv_destroy_source() */ int mv_source_fill_by_media_packet( - mv_source_h source, - media_packet_h media_packet); + mv_source_h source, + media_packet_h media_packet); /** * @brief Fills the media source based on the buffer and metadata. @@ -241,12 +235,12 @@ int mv_source_fill_by_media_packet( * @see mv_source_clear() */ int mv_source_fill_by_buffer( - mv_source_h source, - unsigned char *data_buffer, - unsigned int buffer_size, - unsigned int image_width, - unsigned int image_height, - mv_colorspace_e image_colorspace); + mv_source_h source, + unsigned char *data_buffer, + unsigned int buffer_size, + unsigned int image_width, + unsigned int image_height, + mv_colorspace_e image_colorspace); /** * @brief Clears the buffer of the media source. @@ -261,7 +255,7 @@ int mv_source_fill_by_buffer( * @see mv_source_fill_by_buffer() */ int mv_source_clear( - mv_source_h source); + mv_source_h source); /** * @brief Gets buffer of the media source. @@ -284,9 +278,9 @@ int mv_source_clear( * @see mv_source_get_colorspace() */ int mv_source_get_buffer( - mv_source_h source, - unsigned char **data_buffer, - unsigned int *buffer_size); + mv_source_h source, + unsigned char **data_buffer, + unsigned int *buffer_size); /** * @brief Gets height of the media source. @@ -304,8 +298,8 @@ int mv_source_get_buffer( * @see mv_source_get_buffer() */ int mv_source_get_height( - mv_source_h source, - unsigned int *image_height); + mv_source_h source, + unsigned int *image_height); /** * @brief Gets width of the media source. @@ -323,8 +317,8 @@ int mv_source_get_height( * @see mv_source_get_buffer() */ int mv_source_get_width( - mv_source_h source, - unsigned int *image_width); + mv_source_h source, + unsigned int *image_width); /** * @brief Gets colorspace of the media source. @@ -342,8 +336,8 @@ int mv_source_get_width( * @see mv_source_get_buffer() */ int mv_source_get_colorspace( - mv_source_h source, - mv_colorspace_e *image_colorspace); + mv_source_h source, + mv_colorspace_e *image_colorspace); /** * @brief Creates the handle to the configuration of engine. @@ -373,7 +367,7 @@ int mv_source_get_colorspace( * @see mv_engine_config_get_string_attribute() */ int mv_create_engine_config( - mv_engine_config_h *engine_cfg); + mv_engine_config_h *engine_cfg); /** * @brief Destroys the engine configuration handle and releases all its @@ -391,7 +385,7 @@ int mv_create_engine_config( * @see mv_create_engine_config() */ int mv_destroy_engine_config( - mv_engine_config_h engine_cfg); + mv_engine_config_h engine_cfg); /** * @brief Sets the double attribute to the configuration. @@ -415,9 +409,9 @@ int mv_destroy_engine_config( * @see mv_engine_config_set_string_attribute() */ int mv_engine_config_set_double_attribute( - mv_engine_config_h engine_cfg, - const char *name, - double value); + mv_engine_config_h engine_cfg, + const char *name, + double value); /** * @brief Sets the integer attribute to the configuration. @@ -443,9 +437,9 @@ int mv_engine_config_set_double_attribute( * @see mv_barcode_generate_attr_text_e */ int mv_engine_config_set_int_attribute( - mv_engine_config_h engine_cfg, - const char *name, - int value); + mv_engine_config_h engine_cfg, + const char *name, + int value); /** * @brief Sets the boolean attribute to the configuration. @@ -469,9 +463,9 @@ int mv_engine_config_set_int_attribute( * @see mv_engine_config_set_string_attribute() */ int mv_engine_config_set_bool_attribute( - mv_engine_config_h engine_cfg, - const char *name, - bool value); + mv_engine_config_h engine_cfg, + const char *name, + bool value); /** * @brief Sets the string attribute to the configuration. @@ -495,9 +489,9 @@ int mv_engine_config_set_bool_attribute( * @see mv_engine_config_set_bool_attribute() */ int mv_engine_config_set_string_attribute( - mv_engine_config_h engine_cfg, - const char *name, - const char *value); + mv_engine_config_h engine_cfg, + const char *name, + const char *value); /** * @brief Gets the double attribute from the configuration dictionary. @@ -522,9 +516,9 @@ int mv_engine_config_set_string_attribute( * @see mv_engine_config_get_string_attribute() */ int mv_engine_config_get_double_attribute( - mv_engine_config_h engine_cfg, - const char *name, - double *value); + mv_engine_config_h engine_cfg, + const char *name, + double *value); /** * @brief Gets the integer attribute from the configuration dictionary. @@ -551,9 +545,9 @@ int mv_engine_config_get_double_attribute( * @see mv_barcode_generate_attr_text_e */ int mv_engine_config_get_int_attribute( - mv_engine_config_h engine_cfg, - const char *name, - int *value); + mv_engine_config_h engine_cfg, + const char *name, + int *value); /** * @brief Gets the boolean attribute from the configuration dictionary. @@ -578,9 +572,9 @@ int mv_engine_config_get_int_attribute( * @see mv_engine_config_get_string_attribute() */ int mv_engine_config_get_bool_attribute( - mv_engine_config_h engine_cfg, - const char *name, - bool *value); + mv_engine_config_h engine_cfg, + const char *name, + bool *value); /** * @brief Gets the string attribute from the configuration dictionary. @@ -607,9 +601,9 @@ int mv_engine_config_get_bool_attribute( * @see mv_engine_config_get_bool_attribute() */ int mv_engine_config_get_string_attribute( - mv_engine_config_h engine_cfg, - const char *name, - char **value); + mv_engine_config_h engine_cfg, + const char *name, + char **value); /** * @brief Called to get information (type and name) once for each supported @@ -628,9 +622,9 @@ int mv_engine_config_get_string_attribute( * @see mv_engine_config_foreach_supported_attribute() */ typedef bool (*mv_supported_attribute_cb)( - mv_config_attribute_type_e attribute_type, - const char *attribute_name, - void *user_data); + mv_config_attribute_type_e attribute_type, + const char *attribute_name, + void *user_data); /** * @brief Traverses the list of supported attribute names and types. @@ -670,8 +664,8 @@ typedef bool (*mv_supported_attribute_cb)( * @see mv_engine_config_get_string_attribute() */ int mv_engine_config_foreach_supported_attribute( - mv_supported_attribute_cb callback, - void *user_data); + mv_supported_attribute_cb callback, + void *user_data); /** * @} diff --git a/include/mv_face_type.h b/include/mv_face_type.h index 2164e94..7a0a4fe 100644 --- a/include/mv_face_type.h +++ b/include/mv_face_type.h @@ -39,11 +39,10 @@ extern "C" { * * @see mv_face_eye_condition_recognize() */ -typedef enum -{ - MV_FACE_EYES_OPEN, /**< Eyes are open */ - MV_FACE_EYES_CLOSED, /**< Eyes are closed */ - MV_FACE_EYES_NOT_FOUND /**< The eyes condition wasn't determined */ +typedef enum { + MV_FACE_EYES_OPEN, /**< Eyes are open */ + MV_FACE_EYES_CLOSED, /**< Eyes are closed */ + MV_FACE_EYES_NOT_FOUND /**< The eyes condition wasn't determined */ } mv_face_eye_condition_e; /** @@ -53,16 +52,15 @@ typedef enum * * @see mv_face_facial_expression_recognize() */ -typedef enum -{ - MV_FACE_UNKNOWN, /**< Unknown face expression */ - MV_FACE_NEUTRAL, /**< Face expression is neutral */ - MV_FACE_SMILE, /**< Face expression is smiling */ - MV_FACE_SADNESS, /**< Face expression is sadness */ - MV_FACE_SURPRISE, /**< Face expression is surprise */ - MV_FACE_ANGER, /**< Face expression is anger */ - MV_FACE_FEAR, /**< Face expression is fear */ - MV_FACE_DISGUST, /**< Face expression is disgust */ +typedef enum { + MV_FACE_UNKNOWN, /**< Unknown face expression */ + MV_FACE_NEUTRAL, /**< Face expression is neutral */ + MV_FACE_SMILE, /**< Face expression is smiling */ + MV_FACE_SADNESS, /**< Face expression is sadness */ + MV_FACE_SURPRISE, /**< Face expression is surprise */ + MV_FACE_ANGER, /**< Face expression is anger */ + MV_FACE_FEAR, /**< Face expression is fear */ + MV_FACE_DISGUST, /**< Face expression is disgust */ } mv_face_facial_expression_e; /** diff --git a/include/mv_private.h b/include/mv_private.h index 7877a2b..67290cf 100644 --- a/include/mv_private.h +++ b/include/mv_private.h @@ -31,47 +31,43 @@ extern "C" { #define LOG_TAG "TIZEN_MEDIA_VISION" #define MEDIA_VISION_FUNCTION_ENTER() \ - LOGI("[%s] ", __FUNCTION__) + LOGI("[%s] ", __FUNCTION__) #define MEDIA_VISION_FUNCTION_LEAVE() \ - LOGI("[%s] ", __FUNCTION__) + LOGI("[%s] ", __FUNCTION__) #define MEDIA_VISION_ASSERT(function, msg) \ - do \ - { \ - int error_code = function; \ - if(error_code != MEDIA_VISION_ERROR_NONE) \ - { \ - LOGE("%s(0x%08x)", msg, error_code); \ - return error_code; \ - } \ - } \ - while(0) + do { \ + int error_code = function; \ + if (error_code != MEDIA_VISION_ERROR_NONE) { \ + LOGE("%s(0x%08x)", msg, error_code); \ + return error_code; \ + } \ + } \ + while (0) -#define MEDIA_VISION_CHECK_CONDITION(condition,error,msg) \ - do \ - { \ - if(!(condition)) \ - { \ - LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); \ - return error; \ - } \ - } \ - while(0) +#define MEDIA_VISION_CHECK_CONDITION(condition, error, msg) \ + do { \ + if (!(condition)) { \ + LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); \ + return error; \ + } \ + } \ + while (0) #define MEDIA_VISION_INSTANCE_CHECK(arg) \ - MEDIA_VISION_CHECK_CONDITION(arg != NULL, \ - MEDIA_VISION_ERROR_INVALID_PARAMETER, \ - "MEDIA_VISION_ERROR_INVALID_PARAMETER") + MEDIA_VISION_CHECK_CONDITION(arg != NULL, \ + MEDIA_VISION_ERROR_INVALID_PARAMETER, \ + "MEDIA_VISION_ERROR_INVALID_PARAMETER") #define MEDIA_VISION_NULL_ARG_CHECK(arg) \ - MEDIA_VISION_CHECK_CONDITION(arg != NULL, \ - MEDIA_VISION_ERROR_INVALID_PARAMETER, \ - "MEDIA_VISION_ERROR_INVALID_PARAMETER") + MEDIA_VISION_CHECK_CONDITION(arg != NULL, \ + MEDIA_VISION_ERROR_INVALID_PARAMETER, \ + "MEDIA_VISION_ERROR_INVALID_PARAMETER") #define MEDIA_VISION_SUPPORT_CHECK(arg) \ - MEDIA_VISION_CHECK_CONDITION(arg != false, MEDIA_VISION_ERROR_NOT_SUPPORTED, \ - "MEDIA_VISION_ERROR_NOT_SUPPORTED") + MEDIA_VISION_CHECK_CONDITION(arg != false, MEDIA_VISION_ERROR_NOT_SUPPORTED, \ + "MEDIA_VISION_ERROR_NOT_SUPPORTED") bool __mv_check_system_info_feature_supported(); bool __mv_barcode_detect_check_system_info_feature_supported(); diff --git a/include/mv_surveillance_private.h b/include/mv_surveillance_private.h index 4dc4bad..9b5b25f 100644 --- a/include/mv_surveillance_private.h +++ b/include/mv_surveillance_private.h @@ -33,12 +33,11 @@ extern "C" { * * @since_tizen 3.0 */ -typedef struct -{ - unsigned int trigger_id; /**< Unique event trigger identifier */ - const char *event_type; /**< Type of the event */ - int number_of_roi_points; /**< Number of ROI (Region of interest) points */ - mv_point_s *roi; /**< ROI points array */ +typedef struct { + unsigned int trigger_id; /**< Unique event trigger identifier */ + const char *event_type; /**< Type of the event */ + int number_of_roi_points; /**< Number of ROI (Region of interest) points */ + mv_point_s *roi; /**< ROI points array */ } mv_surveillance_event_trigger_s; #ifdef __cplusplus diff --git a/mv_image/image/include/ImageConfig.h b/mv_image/image/include/ImageConfig.h index 6caa166..e43987d 100644 --- a/mv_image/image/include/ImageConfig.h +++ b/mv_image/image/include/ImageConfig.h @@ -67,7 +67,6 @@ const std::string DescriptorNames[DT_SIZE] = { * @since_tizen 3.0 */ struct FeaturesExtractingParams { - FeaturesExtractingParams(); KeypointType mKeypointType; /**< Keypoint's type. */ diff --git a/mv_image/image/include/Recognition/ImageObject.h b/mv_image/image/include/Recognition/ImageObject.h index e8bc67a..a73dcf5 100644 --- a/mv_image/image/include/Recognition/ImageObject.h +++ b/mv_image/image/include/Recognition/ImageObject.h @@ -173,7 +173,6 @@ private: const std::vector& roi); private: - FeaturesExtractingParams m_featureExtractingParams; FeaturePack m_features; diff --git a/mv_image/image/include/Tracking/MFTracker.h b/mv_image/image/include/Tracking/MFTracker.h index 90652e4..3ff98ba 100644 --- a/mv_image/image/include/Tracking/MFTracker.h +++ b/mv_image/image/include/Tracking/MFTracker.h @@ -141,7 +141,7 @@ private: performed */ std::vector m_pyramid; /**< The pyramid had been calculated for - the previous frame (or when + the previous frame(or when initialize the model) */ }; diff --git a/mv_surveillance/surveillance/include/EventManager.h b/mv_surveillance/surveillance/include/EventManager.h index fd13f52..540957b 100644 --- a/mv_surveillance/surveillance/include/EventManager.h +++ b/mv_surveillance/surveillance/include/EventManager.h @@ -38,7 +38,6 @@ class EventManager; */ class EventManagerDestroyer { public: - /** * @brief Default destructor. * @@ -55,7 +54,6 @@ public: void initialize(EventManager *pointer); private: - EventManager *__pInstance; }; @@ -68,7 +66,6 @@ private: class EventManager { public: - /** * @brief Gets EventManager instance. * @@ -156,7 +153,6 @@ public: StringVector& eventResValNames); private: - EventManager(); EventManager(const EventManager&); @@ -172,7 +168,6 @@ private: friend class EventManagerDestroyer; private: - static EventManager *__pInstance; static EventManagerDestroyer Destroyer; @@ -180,7 +175,6 @@ private: static EventTypesMap SupportedEventTypes; private: - EventTriggersMap __eventTriggers; }; diff --git a/mv_surveillance/surveillance/include/EventTriggerPersonAppearance.h b/mv_surveillance/surveillance/include/EventTriggerPersonAppearance.h index 7aeecff..3e50e37 100644 --- a/mv_surveillance/surveillance/include/EventTriggerPersonAppearance.h +++ b/mv_surveillance/surveillance/include/EventTriggerPersonAppearance.h @@ -155,11 +155,9 @@ private: void *user_data); private: - void runCallbacks(mv_source_h source); private: - struct TrackedRectangle { cv::Rect rect; diff --git a/mv_surveillance/surveillance/include/HoGDetector.h b/mv_surveillance/surveillance/include/HoGDetector.h index d4bb400..76b0f2f 100644 --- a/mv_surveillance/surveillance/include/HoGDetector.h +++ b/mv_surveillance/surveillance/include/HoGDetector.h @@ -73,8 +73,7 @@ struct HOGDescriptor { histogramNormType(HOGDescriptor::L2Hys), L2HysThreshold(0.2), gammaCorrection(true), - nlevels(HOGDescriptor::DEFAULT_NLEVELS) - {} + nlevels(HOGDescriptor::DEFAULT_NLEVELS) {} // constructor HOGDescriptor( @@ -99,8 +98,7 @@ struct HOGDescriptor { histogramNormType(_histogramNormType), L2HysThreshold(_L2HysThreshold), gammaCorrection(_gammaCorrection), - nlevels(_nlevels) - {} + nlevels(_nlevels) {} // default destructor virtual ~HOGDescriptor() {} diff --git a/mv_surveillance/surveillance/include/SurveillanceHelper.h b/mv_surveillance/surveillance/include/SurveillanceHelper.h index ffb6302..1ad303a 100644 --- a/mv_surveillance/surveillance/include/SurveillanceHelper.h +++ b/mv_surveillance/surveillance/include/SurveillanceHelper.h @@ -60,7 +60,6 @@ public: */ static int convertSourceMVRGB2GrayCVNeon(mv_source_h mvSource, cv::Mat& cvSource); #endif - }; diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index ba1a363..2e40b49 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -1,6 +1,6 @@ Name: capi-media-vision Summary: Media Vision library for Tizen Native API -Version: 0.3.10 +Version: 0.3.11 Release: 0 Group: Multimedia/Framework License: Apache-2.0 and BSD-2.0 diff --git a/test/testsuites/barcode/barcode_test_suite.c b/test/testsuites/barcode/barcode_test_suite.c index 6f03926..1304806 100644 --- a/test/testsuites/barcode/barcode_test_suite.c +++ b/test/testsuites/barcode/barcode_test_suite.c @@ -120,7 +120,7 @@ int convert_rgb_to(unsigned char *src_buffer, unsigned char **dst_buffer, int picture_size = avpicture_get_size(pixel_format, image_data.image_width, image_data.image_height); - if(picture_size < 0) { + if (picture_size < 0) { avpicture_free(&dst_picture); MEDIA_VISION_FUNCTION_LEAVE(); return MEDIA_VISION_ERROR_OUT_OF_MEMORY; diff --git a/test/testsuites/common/image_helper/include/ImageHelper.h b/test/testsuites/common/image_helper/include/ImageHelper.h index 43109e4..673f4ad 100644 --- a/test/testsuites/common/image_helper/include/ImageHelper.h +++ b/test/testsuites/common/image_helper/include/ImageHelper.h @@ -219,7 +219,6 @@ private: const unsigned char *pInBuffer, const ImageData& imageData, unsigned char **pOutBuffer); - }; } /* namespace Common */ diff --git a/test/testsuites/common/testsuite_common/mv_testsuite_common.h b/test/testsuites/common/testsuite_common/mv_testsuite_common.h index f159dd0..ab67636 100644 --- a/test/testsuites/common/testsuite_common/mv_testsuite_common.h +++ b/test/testsuites/common/testsuite_common/mv_testsuite_common.h @@ -21,10 +21,9 @@ #include -typedef enum -{ - FAIL_OR_SUCCESSS, - FAIL_OR_DONE +typedef enum { + FAIL_OR_SUCCESSS, + FAIL_OR_DONE } notification_type_e; /** @@ -35,8 +34,8 @@ typedef enum * @param [in] action_return_value Return value of action */ void print_fail_result( - const char *action_name, - int action_return_value); + const char *action_name, + int action_return_value); /** * @brief Prints success result of action. @@ -63,9 +62,9 @@ void print_success_result(const char *action_name); * @param [in] notification_type_e Type of notification */ void print_action_result( - const char *action_name, - int action_return_value, - notification_type_e notification_type_e); + const char *action_name, + int action_return_value, + notification_type_e notification_type_e); /** * @brief Gets srting from console. @@ -138,10 +137,10 @@ bool show_confirm_dialog(const char *title); * otherwise a negative error value */ int show_menu( - const char *title, - const int *options, - const char **names, - int number_of_option); + const char *title, + const int *options, + const char **names, + int number_of_option); /** * @brief Loads media source from JPEG image. @@ -152,7 +151,7 @@ int show_menu( * @return @c 0 on success, otherwise a negative error value */ int load_mv_source_from_file( - const char *path_to_image, - mv_source_h source); + const char *path_to_image, + mv_source_h source); #endif /* __MV_TESTSUITE_COMMON_H__ */ diff --git a/test/testsuites/common/video_helper/mv_log_cfg.h b/test/testsuites/common/video_helper/mv_log_cfg.h index cb6e0a3..392b5c2 100644 --- a/test/testsuites/common/video_helper/mv_log_cfg.h +++ b/test/testsuites/common/video_helper/mv_log_cfg.h @@ -19,7 +19,7 @@ #include -//#define ROOTSTRAP_OUT // enables logs to console +/* #define ROOTSTRAP_OUT // enables logs to console */ #define TEXT_RED "\x1b[31m" #define TEXT_GREEN "\x1b[32m" @@ -32,40 +32,36 @@ #ifdef ROOTSTRAP_OUT #define LOGD(...) \ -do \ -{ \ - printf("<%s:%d>", __FUNCTION__, __LINE__); \ - printf(TEXT_CYAN); \ - printf(__VA_ARGS__); \ - printf(TEXT_RESET "\n"); \ -} while(0) +do { \ + printf("<%s:%d>", __FUNCTION__, __LINE__); \ + printf(TEXT_CYAN); \ + printf(__VA_ARGS__); \ + printf(TEXT_RESET "\n"); \ +} while (0) #define LOGI(...) \ -do \ -{ \ - printf("<%s:%d>", __FUNCTION__, __LINE__); \ - printf(TEXT_GREEN); \ - printf(__VA_ARGS__); \ - printf(TEXT_RESET "\n"); \ -} while(0) +do { \ + printf("<%s:%d>", __FUNCTION__, __LINE__); \ + printf(TEXT_GREEN); \ + printf(__VA_ARGS__); \ + printf(TEXT_RESET "\n"); \ +} while (0) #define LOGW(...) \ -do \ -{ \ - printf("<%s:%d>", __FUNCTION__, __LINE__); \ - printf(TEXT_YELLOW); \ - printf(__VA_ARGS__); \ - printf(TEXT_RESET "\n"); \ -} while(0) +do { \ + printf("<%s:%d>", __FUNCTION__, __LINE__); \ + printf(TEXT_YELLOW); \ + printf(__VA_ARGS__); \ + printf(TEXT_RESET "\n"); \ +} while (0) #define LOGE(...) \ -do \ -{ \ - printf("<%s:%d>", __FUNCTION__, __LINE__); \ - printf(TEXT_RED); \ - printf(__VA_ARGS__); \ - printf(TEXT_RESET "\n"); \ -} while(0) +do { \ + printf("<%s:%d>", __FUNCTION__, __LINE__); \ + printf(TEXT_RED); \ + printf(__VA_ARGS__); \ + printf(TEXT_RESET "\n"); \ +} while (0) #endif diff --git a/test/testsuites/common/video_helper/mv_video_helper.c b/test/testsuites/common/video_helper/mv_video_helper.c index 1bf0ca2..c46fcb7 100644 --- a/test/testsuites/common/video_helper/mv_video_helper.c +++ b/test/testsuites/common/video_helper/mv_video_helper.c @@ -84,7 +84,7 @@ static void appsink_eos(GstAppSink *appsink, gpointer user_data); static GstFlowReturn appsink_newsample(GstAppSink *appsink, gpointer user_data); static void cb_newpad(GstElement *decodebin, GstPad *new_pad, gpointer user_data); -static GstPadProbeReturn pad_probe_data_cb (GstPad *pad, GstPadProbeInfo *info, gpointer user_data); +static GstPadProbeReturn pad_probe_data_cb(GstPad *pad, GstPadProbeInfo *info, gpointer user_data); /* video reader */ int mv_create_video_reader( @@ -892,14 +892,14 @@ static void cb_newpad( g_object_unref(video_pad); } -static GstPadProbeReturn pad_probe_data_cb ( +static GstPadProbeReturn pad_probe_data_cb( GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { - if (user_data == NULL) { + if (user_data == NULL) return GST_PAD_PROBE_PASS; - } + mv_video_reader_s *reader = (mv_video_reader_s *) user_data; if (reader->caps == NULL) { -- 2.7.4