*
* @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;
/**
* @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;
/**
* @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;
/**
*
* @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;
/**
*
* @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;
/**
*
* @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;
/**
*
* @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;
/**
*
* @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;
/**
*
* @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;
/**
*
* @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;
/**
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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.
* @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
* @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.
* @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);
/**
* @}
*
* @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;
/**
*
* @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;
/**
#define LOG_TAG "TIZEN_MEDIA_VISION"
#define MEDIA_VISION_FUNCTION_ENTER() \
- LOGI("[%s] <ENTER>", __FUNCTION__)
+ LOGI("[%s] <ENTER>", __FUNCTION__)
#define MEDIA_VISION_FUNCTION_LEAVE() \
- LOGI("[%s] <LEAVE>", __FUNCTION__)
+ LOGI("[%s] <LEAVE>", __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();
*
* @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
* @since_tizen 3.0
*/
struct FeaturesExtractingParams {
-
FeaturesExtractingParams();
KeypointType mKeypointType; /**< Keypoint's type. */
const std::vector<cv::Point2f>& roi);
private:
-
FeaturesExtractingParams m_featureExtractingParams;
FeaturePack m_features;
performed */
std::vector<cv::Mat> m_pyramid; /**< The pyramid had been calculated for
- the previous frame (or when
+ the previous frame(or when
initialize the model) */
};
*/
class EventManagerDestroyer {
public:
-
/**
* @brief Default destructor.
*
void initialize(EventManager *pointer);
private:
-
EventManager *__pInstance;
};
class EventManager {
public:
-
/**
* @brief Gets EventManager instance.
*
StringVector& eventResValNames);
private:
-
EventManager();
EventManager(const EventManager&);
friend class EventManagerDestroyer;
private:
-
static EventManager *__pInstance;
static EventManagerDestroyer Destroyer;
static EventTypesMap SupportedEventTypes;
private:
-
EventTriggersMap __eventTriggers;
};
void *user_data);
private:
-
void runCallbacks(mv_source_h source);
private:
-
struct TrackedRectangle {
cv::Rect rect;
histogramNormType(HOGDescriptor::L2Hys),
L2HysThreshold(0.2),
gammaCorrection(true),
- nlevels(HOGDescriptor::DEFAULT_NLEVELS)
- {}
+ nlevels(HOGDescriptor::DEFAULT_NLEVELS) {}
// constructor
HOGDescriptor(
histogramNormType(_histogramNormType),
L2HysThreshold(_L2HysThreshold),
gammaCorrection(_gammaCorrection),
- nlevels(_nlevels)
- {}
+ nlevels(_nlevels) {}
// default destructor
virtual ~HOGDescriptor() {}
*/
static int convertSourceMVRGB2GrayCVNeon(mv_source_h mvSource, cv::Mat& cvSource);
#endif
-
};
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
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;
const unsigned char *pInBuffer,
const ImageData& imageData,
unsigned char **pOutBuffer);
-
};
} /* namespace Common */
#include <stddef.h>
-typedef enum
-{
- FAIL_OR_SUCCESSS,
- FAIL_OR_DONE
+typedef enum {
+ FAIL_OR_SUCCESSS,
+ FAIL_OR_DONE
} notification_type_e;
/**
* @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.
* @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.
* 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.
* @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__ */
#include <dlog.h>
-//#define ROOTSTRAP_OUT // enables logs to console
+/* #define ROOTSTRAP_OUT // enables logs to console */
#define TEXT_RED "\x1b[31m"
#define TEXT_GREEN "\x1b[32m"
#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
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(
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) {