summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2023-08-30 09:26:23 +0900
committerKwanghoon Son <k.son@samsung.com>2023-09-04 13:57:02 +0900
commit873b7646e138d772c2bc03aa416e0a2aac7dd4fa (patch)
treeb5f5c991ba34a4b28fdc40fce64bfda7052fb429
parentfdbd84f1ff3b30c9f18598b65da777f65611e4cb (diff)
downloadmediavision-873b7646e138d772c2bc03aa416e0a2aac7dd4fa.tar.gz
mediavision-873b7646e138d772c2bc03aa416e0a2aac7dd4fa.tar.bz2
mediavision-873b7646e138d772c2bc03aa416e0a2aac7dd4fa.zip
mv_common: Drop common_c functions
[Issue type] refactoring common_c functions was created for individual adapter layer requirements, but was never used. Delete it because it slows down execution and only increases complexity. Change-Id: I550e5a354f413635a45277eaa0abef028bb452ab Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r--mv_barcode/barcode_detector/src/BarcodeUtils.cpp10
-rw-r--r--mv_barcode/barcode_generator/src/mv_barcode_generate_open.cpp6
-rw-r--r--mv_common/include/mv_common_c.h489
-rw-r--r--mv_common/src/mv_common.c311
-rw-r--r--mv_common/src/mv_common.cpp (renamed from mv_common/src/mv_common_c.cpp)321
-rw-r--r--mv_face/face/include/FaceExpressionRecognizer.h2
-rw-r--r--mv_face/face/include/FaceEyeCondition.h2
-rw-r--r--mv_face/face/include/FaceUtil.h2
-rw-r--r--mv_face/face/src/mv_face_open.cpp18
-rw-r--r--mv_image/image/src/mv_image_open.cpp52
10 files changed, 208 insertions, 1005 deletions
diff --git a/mv_barcode/barcode_detector/src/BarcodeUtils.cpp b/mv_barcode/barcode_detector/src/BarcodeUtils.cpp
index f002dcd6..96920b01 100644
--- a/mv_barcode/barcode_detector/src/BarcodeUtils.cpp
+++ b/mv_barcode/barcode_detector/src/BarcodeUtils.cpp
@@ -15,7 +15,7 @@
*/
#include "BarcodeUtils.h"
-#include "mv_common_c.h"
+#include "mv_common.h"
#include <mv_private.h>
@@ -35,7 +35,7 @@ int convertSourceMV2Zbar(mv_source_h mvSource, zbar::Image &zbarSource)
unsigned int size = 0;
mv_colorspace_e colorspace = MEDIA_VISION_COLORSPACE_INVALID;
- err = mv_source_get_colorspace_c(mvSource, &colorspace);
+ err = mv_source_get_colorspace(mvSource, &colorspace);
if (err != MEDIA_VISION_ERROR_NONE) {
LOGE("Can't determine mv_source_h colorspace to convert"
" to ZBar colorspace. Conversion failed");
@@ -81,19 +81,19 @@ int convertSourceMV2Zbar(mv_source_h mvSource, zbar::Image &zbarSource)
return MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT;
}
- err = mv_source_get_buffer_c(mvSource, &buffer, &size);
+ err = mv_source_get_buffer(mvSource, &buffer, &size);
if (err != MEDIA_VISION_ERROR_NONE) {
LOGE("Can't get mv_source_h buffer to convert to ZBar image. Conversion failed");
return err;
}
- err = mv_source_get_height_c(mvSource, &height);
+ err = mv_source_get_height(mvSource, &height);
if (err != MEDIA_VISION_ERROR_NONE) {
LOGE("Can't get mv_source_h height for conversion. Conversion failed");
return err;
}
- err = mv_source_get_width_c(mvSource, &width);
+ err = mv_source_get_width(mvSource, &width);
if (err != MEDIA_VISION_ERROR_NONE) {
LOGE("Can't get mv_source_h width for conversion. Conversion failed");
return err;
diff --git a/mv_barcode/barcode_generator/src/mv_barcode_generate_open.cpp b/mv_barcode/barcode_generator/src/mv_barcode_generate_open.cpp
index abf01777..fcce2bbf 100644
--- a/mv_barcode/barcode_generator/src/mv_barcode_generate_open.cpp
+++ b/mv_barcode/barcode_generator/src/mv_barcode_generate_open.cpp
@@ -16,7 +16,7 @@
#include "mv_barcode_generate_open.h"
-#include "mv_common_c.h"
+#include "mv_common.h"
#include "BarcodeGenerator.h"
#include <mv_private.h>
@@ -336,8 +336,8 @@ int mv_barcode_generate_source_open(mv_engine_config_h engine_cfg, const char *m
"Buffer size = %ui x %ui; Channels = %ui; Message = %s",
imageWidth, imageHeight, imageChannels, messageStr.c_str());
- error = mv_source_fill_by_buffer_c(image, imageBuffer, imageBufferSize, imageWidth, imageHeight,
- MEDIA_VISION_COLORSPACE_RGB888);
+ error = mv_source_fill_by_buffer(image, imageBuffer, imageBufferSize, imageWidth, imageHeight,
+ MEDIA_VISION_COLORSPACE_RGB888);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Meidiavision source fill by generated buffer failed");
diff --git a/mv_common/include/mv_common_c.h b/mv_common/include/mv_common_c.h
deleted file mode 100644
index cbcb7314..00000000
--- a/mv_common/include/mv_common_c.h
+++ /dev/null
@@ -1,489 +0,0 @@
-/**
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __MEDIA_VISION_COMMON_C_H__
-#define __MEDIA_VISION_COMMON_C_H__
-
-#include "mv_common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * @file mv_common_c.h
- * @brief This file contains the Media Vision Common module API.
- */
-
-/**
- * @brief Creates a source handle.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @remarks You must release @a source by using @ref mv_destroy_source_c().
- * @param [out] source A new handle to the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see mv_destroy_source_c()
- */
-int mv_create_source_c(mv_source_h *source);
-
-/**
- * @brief Destroys the source handle and releases all its resources.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] source The handle to the source to be destroyed
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_create_source_c()
- */
-int mv_destroy_source_c(mv_source_h source);
-
-/**
- * @brief Fills the media source based on the media packet.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in,out] source The handle to the source
- * @param [in] media_packet The handle to the media packet from which
- * will be filled the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported media format
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @pre Create a source handle by calling @ref mv_create_source_c()
- *
- * @see mv_create_source_c()
- * @see mv_destroy_source_c()
- */
-int mv_source_fill_by_media_packet_c(mv_source_h source, media_packet_h media_packet);
-
-/**
- * @brief Fills the media source based on the buffer and metadata.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in,out] source The handle to the source
- * @param [in] data_buffer The buffer of image data
- * @param [in] buffer_size The buffer size
- * @param [in] image_width The image width
- * @param [in] image_height The image height
- * @param [in] image_colorspace The image colorspace
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @pre Create a source handle by calling @ref mv_create_source_c()
- *
- * @see mv_source_clear_c()
- */
-int mv_source_fill_by_buffer_c(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.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] source The handle to the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_source_fill_by_buffer_c()
- */
-int mv_source_clear_c(mv_source_h source);
-
-/**
- * @brief Gets buffer of the media source.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @remarks Note that the retrieved buffer will be destroyed when
- * @ref mv_destroy_source_c() or @ref mv_source_clear_c() function
- * is called for the @a source.
- *
- * @param [in] source The handle to the source
- * @param [out] data_buffer The buffer of the source
- * @param [out] buffer_size The size of buffer
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_source_get_width_c()
- * @see mv_source_get_height_c()
- * @see mv_source_get_colorspace_c()
- */
-int mv_source_get_buffer_c(mv_source_h source, unsigned char **data_buffer, unsigned int *buffer_size);
-
-/**
- * @brief Gets height of the media source.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] source The handle to the source
- * @param [out] image_height The height of the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_source_get_width_c()
- * @see mv_source_get_colorspace_c()
- * @see mv_source_get_buffer_c()
- */
-int mv_source_get_height_c(mv_source_h source, unsigned int *image_height);
-
-/**
- * @brief Gets width of the media source.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] source The handle to the source
- * @param [out] image_width The width of the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_source_get_height_c()
- * @see mv_source_get_colorspace_c()
- * @see mv_source_get_buffer_c()
- */
-int mv_source_get_width_c(mv_source_h source, unsigned int *image_width);
-
-/**
- * @brief Gets colorspace of the media source.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] source The handle to the source
- * @param [out] image_colorspace The colorspace of the source
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_source_get_width_c()
- * @see mv_source_get_height_c()
- * @see mv_source_get_buffer_c()
- */
-int mv_source_get_colorspace_c(mv_source_h source, mv_colorspace_e *image_colorspace);
-
-/**
- * @brief Creates the handle to the configuration of engine.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [out] engine_cfg The handle to the engine to be created
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see mv_engine_config_h
- * @see mv_destroy_engine_config_c()
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_set_bool_attribute_c()
- * @see mv_engine_config_set_string_attribute_c()
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_get_bool_attribute_c()
- * @see mv_engine_config_get_string_attribute_c()
- */
-int mv_create_engine_config_c(mv_engine_config_h *engine_cfg);
-
-/**
- * @brief Destroys the engine configuration handle and releases all its
- * resources.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg The handle to the engine configuration
- * to be destroyed
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_h
- * @see mv_create_engine_config_c()
- */
-int mv_destroy_engine_config_c(mv_engine_config_h engine_cfg);
-
-/**
- * @brief Sets the double attribute to the configuration.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration for which @a value has
- * to be set
- * @param [in] name String key of the attribute will be used for
- * storing the @a value into configuration
- * dictionary
- * @param [in] value The double value of the attribute
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_set_bool_attribute_c()
- * @see mv_engine_config_set_string_attribute_c()
- */
-int mv_engine_config_set_double_attribute_c(mv_engine_config_h engine_cfg, const char *name, double value);
-
-/**
- * @brief Sets the integer attribute to the configuration.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration for which @a value has
- * to be set
- * @param [in] name String key of the attribute will be used for
- * storing the @a value into configuration
- * dictionary
- * @param [in] value The integer value of the attribute
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_set_bool_attribute_c()
- * @see mv_engine_config_set_string_attribute_c()
- */
-int mv_engine_config_set_int_attribute_c(mv_engine_config_h engine_cfg, const char *name, int value);
-
-/**
- * @brief Sets the boolean attribute to the configuration.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration for which @a value has
- * to be set
- * @param [in] name String key of the attribute will be used for
- * storing the @a value into configuration
- * dictionary
- * @param [in] value The boolean value of the attribute
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_get_bool_attribute_c()
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_set_string_attribute_c()
- */
-int mv_engine_config_set_bool_attribute_c(mv_engine_config_h engine_cfg, const char *name, bool attribute);
-
-/**
- * @brief Sets the string attribute to the configuration.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration for which @a value has
- * to be set
- * @param [in] name String key of the attribute will be used for
- * storing the @a value into configuration
- * dictionary
- * @param [in] value The string value of the attribute
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_get_string_attribute_c()
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_set_bool_attribute_c()
- */
-int mv_engine_config_set_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, const char *value);
-
-/**
- * @brief Sets the array of string attribute to the configuration.
- *
- * @since_tizen 5.5
- * @param [in] engine_cfg Engine configuration for which @a values has
- * to be set
- * @param [in] name String key of the attribute will be used for
- * storing the @a values into configuration
- * dictionary
- * @param [in] values The string values of the attribute
- * @param [in] size The number of string @values
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see mv_engine_config_get_array_string_attribute_c()
- */
-int mv_engine_config_set_array_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, const char **values,
- unsigned int size);
-
-/**
- * @brief Gets the double attribute from the configuration dictionary.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration from which @a value
- * has to be gotten
- * @param [in] name String key of the attribute will be used for
- * getting the @a value from the
- * configuration dictionary
- * @param [out] value The attribute to be filled with double value
- * from dictionary
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Parameter key isn't available
- *
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_get_bool_attribute_c()
- * @see mv_engine_config_get_string_attribute_c()
- */
-int mv_engine_config_get_double_attribute_c(mv_engine_config_h engine_cfg, const char *name, double *value);
-
-/**
- * @brief Gets the integer attribute from the configuration dictionary.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration from which @a value
- * has to be gotten
- * @param [in] name String key of the attribute will be used for
- * getting the @a value from the
- * configuration dictionary
- * @param [out] value The attribute to be filled with integer value
- * from dictionary
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Parameter key isn't available
- *
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_get_bool_attribute_c()
- * @see mv_engine_config_get_string_attribute_c()
- */
-int mv_engine_config_get_int_attribute_c(mv_engine_config_h engine_cfg, const char *name, int *value);
-
-/**
- * @brief Gets the boolean attribute from the configuration dictionary.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @param [in] engine_cfg Engine configuration from which @a value
- * has to be gotten
- * @param [in] name String key of the attribute will be used for
- * getting the @a value from the
- * configuration dictionary
- * @param [out] value The attribute to be filled with boolean value
- * from dictionary
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Parameter key isn't available
- *
- * @see mv_engine_config_set_bool_attribute_c()
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_get_string_attribute_c()
- */
-int mv_engine_config_get_bool_attribute_c(mv_engine_config_h engine_cfg, const char *name, bool *value);
-
-/**
- * @brief Gets the string attribute from the configuration dictionary.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @remarks Function allocates memory required for output @a value, so
- * it has to be removed by the user himself.
- * @param [in] engine_cfg Engine configuration from which @a value
- * has to be gotten
- * @param [in] name String key of the attribute will be used for
- * getting the @a value from the
- * configuration dictionary
- * @param [out] value The attribute to be filled with string value
- * from dictionary
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Parameter key isn't available
- *
- * @see mv_engine_config_set_string_attribute_c()
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_get_bool_attribute_c()
- */
-int mv_engine_config_get_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, char **value);
-
-/**
- * @brief Gets the array of string attribute from the configuration dictionary.
- *
- * @since_tizen 5.5
- * @remarks Function allocates memory required for output @a values, so
- * it has to be removed by the user himself.
- * @param [in] engine_cfg Engine configuration from which @a values
- * has to be gotten
- * @param [in] name String key of the attribute will be used for
- * getting the @a values from the
- * configuration dictionary
- * @param [out] values The attribute to be filled with string value
- * from dictionary
- * @param [out] size The number of elements in @a values
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_KEY_NOT_AVAILABLE Parameter key isn't available
- *
- * @see mv_engine_config_set_array_string_attribute_c()
- */
-int mv_engine_config_get_array_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, char ***values,
- int *size);
-
-/**
- * @brief Traverses the list of supported attribute names and types.
- * @details Using this function names of supported attributes can be obtained.
- * Names of the attributes can be used with @ref mv_engine_config_h
- * related getters and setters to get/set appropriate attribute values.
- *
- * @since_tizen @if MOBILE 2.4 @else 3.0 @endif
- * @remarks If @a callback is called zero times after
- * @ref mv_engine_config_foreach_supported_attribute() call, then
- * engine configuration is not supported and setting of attributes will
- * cause no effect. In this case for all Media Vision functions which
- * require @ref mv_engine_config_h handle as in parameter this
- * parameter can be set NULL.
- * @remarks If @a callback is called at least once, then attribute names and
- * types obtained in the @ref mv_supported_attribute_cb callback can be
- * changed after mv_engine_config_h handle creation (with
- * @ref mv_create_engine_config_c() function) by corresponding setters.
- * Although, if attributes aren't changed by setters, then default
- * values will be used.\n
- * Changing of attribute values will affect internal functionality
- * provided by concrete library underlying Media Vision API.
- * @param [in] callback The iteration callback function
- * @param [in] user_data The user data to be passed to the callback function
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * (@a callback can't be NULL)
- * @retval #MEDIA_VISION_ERROR_NO_DATA Can't determine list of supported attributes
- *
- * @see mv_engine_config_set_double_attribute_c()
- * @see mv_engine_config_set_int_attribute_c()
- * @see mv_engine_config_set_bool_attribute_c()
- * @see mv_engine_config_set_string_attribute_c()
- * @see mv_engine_config_get_double_attribute_c()
- * @see mv_engine_config_get_int_attribute_c()
- * @see mv_engine_config_get_bool_attribute_c()
- * @see mv_engine_config_get_string_attribute_c()
- */
-int mv_engine_config_foreach_supported_attribute_c(mv_supported_attribute_cb callback, void *user_data);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __MEDIA_VISION_COMMON_C_H__ */
diff --git a/mv_common/src/mv_common.c b/mv_common/src/mv_common.c
deleted file mode 100644
index 19b54325..00000000
--- a/mv_common/src/mv_common.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/**
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "mv_private.h"
-#include "mv_common.h"
-#include "mv_common_c.h"
-
-int mv_create_source(mv_source_h *source)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(source);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_create_source_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_destroy_source(mv_source_h source)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_destroy_source_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_fill_by_media_packet(mv_source_h source, media_packet_h media_packet)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(media_packet);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_fill_by_media_packet_c(source, media_packet);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-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)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_fill_by_buffer_c(source, data_buffer, buffer_size, image_width, image_height, image_colorspace);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_clear(mv_source_h source)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_clear_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_get_buffer(mv_source_h source, unsigned char **data_buffer, unsigned int *buffer_size)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
- MEDIA_VISION_NULL_ARG_CHECK(buffer_size);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_buffer_c(source, data_buffer, buffer_size);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_get_height(mv_source_h source, unsigned int *image_height)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_height);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_height_c(source, image_height);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_get_width(mv_source_h source, unsigned int *image_width)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_width);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_width_c(source, image_width);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_source_get_colorspace(mv_source_h source, mv_colorspace_e *image_colorspace)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_colorspace);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_colorspace_c(source, image_colorspace);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_create_engine_config(mv_engine_config_h *engine_cfg)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(engine_cfg);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_create_engine_config_c(engine_cfg);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_destroy_engine_config(mv_engine_config_h engine_cfg)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_destroy_engine_config_c(engine_cfg);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_set_double_attribute(mv_engine_config_h engine_cfg, const char *name, double value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_double_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_set_int_attribute(mv_engine_config_h engine_cfg, const char *name, int value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_int_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_set_bool_attribute(mv_engine_config_h engine_cfg, const char *name, bool value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_bool_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_set_string_attribute(mv_engine_config_h engine_cfg, const char *name, const char *value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_string_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_set_array_string_attribute(mv_engine_config_h engine_cfg, const char *name, const char **values,
- unsigned int size)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(values);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- int ret = mv_engine_config_set_array_string_attribute_c(engine_cfg, name, values, size);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_get_double_attribute(mv_engine_config_h engine_cfg, const char *name, double *value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_double_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_get_int_attribute(mv_engine_config_h engine_cfg, const char *name, int *value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_int_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_get_bool_attribute(mv_engine_config_h engine_cfg, const char *name, bool *value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_bool_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_get_string_attribute(mv_engine_config_h engine_cfg, const char *name, char **value)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_string_attribute_c(engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_get_array_string_attribute(mv_engine_config_h engine_cfg, const char *name, char ***values,
- int *size)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(values);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_array_string_attribute_c(engine_cfg, name, values, size);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
-
-int mv_engine_config_foreach_supported_attribute(mv_supported_attribute_cb callback, void *user_data)
-{
- MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(callback);
-
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_foreach_supported_attribute_c(callback, user_data);
- MEDIA_VISION_FUNCTION_LEAVE();
-
- return ret;
-}
diff --git a/mv_common/src/mv_common_c.cpp b/mv_common/src/mv_common.cpp
index 6e1ba1a6..ae9e593b 100644
--- a/mv_common/src/mv_common_c.cpp
+++ b/mv_common/src/mv_common.cpp
@@ -14,61 +14,60 @@
* limitations under the License.
*/
-#include "mv_common_c.h"
-
-#include "MediaSource.h"
-#include "EngineConfig.h"
-
-#include <mv_private.h>
-#include <mv_common_internal.h>
-
#include <new>
#include <memory>
#include <string.h>
#include <stdlib.h>
#include <stdexcept>
+
#include <media_packet.h>
+#include <mv_common.h>
+#include <mv_common_internal.h>
+#include <mv_private.h>
-int mv_create_source_c(mv_source_h *source_ptr)
+#include "MediaSource.h"
+#include "EngineConfig.h"
+
+int mv_create_source(mv_source_h *source)
{
- if (source_ptr == NULL)
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(source);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Creating media vision source");
- (*source_ptr) = (static_cast<mv_source_h>(new (std::nothrow) MediaVision::Common::MediaSource()));
+ (*source) = (static_cast<mv_source_h>(new (std::nothrow) MediaVision::Common::MediaSource()));
- if (*source_ptr == NULL) {
+ if (*source == NULL) {
LOGE("Failed to create media vision source");
return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
}
- LOGD("Media vision source [%p] has been created", *source_ptr);
+ LOGD("Media vision source [%p] has been created", *source);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_destroy_source_c(mv_source_h source)
+int mv_destroy_source(mv_source_h source)
{
- if (!source) {
- LOGE("Media source can't be destroyed because handle is NULL");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Destroying media vision source [%p]", source);
delete (static_cast<MediaVision::Common::MediaSource *>(source));
LOGD("Media vision source has been destroyed");
+ MEDIA_VISION_FUNCTION_LEAVE();
+
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_fill_by_media_packet_c(mv_source_h source, media_packet_h media_packet)
+int mv_source_fill_by_media_packet(mv_source_h source, media_packet_h media_packet)
{
- if (!source || !media_packet) {
- LOGE("Media source can't be filled by media_packet handle because "
- "one of the source or media_packet handles is NULL. "
- "source = %p; media_packet = %p",
- source, media_packet);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(media_packet);
+ MEDIA_VISION_FUNCTION_ENTER();
bool is_video = false;
unsigned int ind = 0;
@@ -194,19 +193,18 @@ int mv_source_fill_by_media_packet_c(mv_source_h source, media_packet_h media_pa
}
LOGD("Media source has been filled from media packet");
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_fill_by_buffer_c(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)
+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)
{
- if (!source || buffer_size == 0 || data_buffer == NULL) {
- LOGE("Media source can't be filled by buffer because "
- "one of the source or data_buffer is NULL or buffer_size = 0. "
- "source = %p; data_buffer = %p; buffer_size = %u",
- source, data_buffer, buffer_size);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(buffer_size);
+ MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
+ MEDIA_VISION_FUNCTION_ENTER();
if (!(static_cast<MediaVision::Common::MediaSource *>(source))
->fill(data_buffer, buffer_size, image_width, image_height, image_colorspace)) {
@@ -215,87 +213,92 @@ int mv_source_fill_by_buffer_c(mv_source_h source, unsigned char *data_buffer, u
}
LOGD("Media source has been filled from buffer");
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_clear_c(mv_source_h source)
+int mv_source_clear(mv_source_h source)
{
- if (!source) {
- LOGE("Media source can't be cleared because source handle is NULL");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Clear media vision source [%p]", source);
(static_cast<MediaVision::Common::MediaSource *>(source))->clear();
LOGD("Media vision source [%p] has been cleared", source);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_get_buffer_c(mv_source_h source, unsigned char **buffer, unsigned int *size)
+int mv_source_get_buffer(mv_source_h source, unsigned char **data_buffer, unsigned int *buffer_size)
{
- if (!source) {
- LOGE("Impossible to get buffer for NULL mv_source_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
+ MEDIA_VISION_NULL_ARG_CHECK(buffer_size);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Get media vision source [%p] buffer and buffer size to be returned", source);
- *buffer = (static_cast<MediaVision::Common::MediaSource *>(source))->getBuffer();
- *size = (static_cast<MediaVision::Common::MediaSource *>(source))->getBufferSize();
- LOGD("Media vision source [%p] buffer (%p) and buffer size (%ui) has been returned", source, buffer, *size);
+ *data_buffer = (static_cast<MediaVision::Common::MediaSource *>(source))->getBuffer();
+ *buffer_size = (static_cast<MediaVision::Common::MediaSource *>(source))->getBufferSize();
+ LOGD("Media vision source [%p] buffer (%p) and buffer size (%ui) has been returned", source, data_buffer,
+ *buffer_size);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_get_height_c(mv_source_h source, unsigned int *height)
+int mv_source_get_height(mv_source_h source, unsigned int *image_height)
{
- if (!source) {
- LOGE("Impossible to get height for NULL mv_source_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_height);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Get media vision source [%p] height to be returned", source);
- *height = (static_cast<MediaVision::Common::MediaSource *>(source))->getHeight();
- LOGD("Media vision source [%p] height (%ui) has been returned", source, *height);
+ *image_height = (static_cast<MediaVision::Common::MediaSource *>(source))->getHeight();
+ LOGD("Media vision source [%p] height (%ui) has been returned", source, *image_height);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_get_width_c(mv_source_h source, unsigned int *width)
+int mv_source_get_width(mv_source_h source, unsigned int *image_width)
{
- if (!source) {
- LOGE("Impossible to get width for NULL mv_source_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_width);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Get media vision source [%p] width to be returned", source);
- *width = (static_cast<MediaVision::Common::MediaSource *>(source))->getWidth();
- LOGD("Media vision source [%p] width (%ui) has been returned", source, *width);
+ *image_width = (static_cast<MediaVision::Common::MediaSource *>(source))->getWidth();
+ LOGD("Media vision source [%p] width (%ui) has been returned", source, *image_width);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_source_get_colorspace_c(mv_source_h source, mv_colorspace_e *colorspace)
+int mv_source_get_colorspace(mv_source_h source, mv_colorspace_e *image_colorspace)
{
- if (!source) {
- LOGE("Impossible to get colorspace for NULL mv_source_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_colorspace);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Get media vision source [%p] colorspace to be returned", source);
- *colorspace = (static_cast<MediaVision::Common::MediaSource *>(source))->getColorspace();
- LOGD("Media vision source [%p] colorspace (%i) has been returned", source, *colorspace);
+ *image_colorspace = (static_cast<MediaVision::Common::MediaSource *>(source))->getColorspace();
+ LOGD("Media vision source [%p] colorspace (%i) has been returned", source, *image_colorspace);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_create_engine_config_c(mv_engine_config_h *engine_cfg)
+int mv_create_engine_config(mv_engine_config_h *engine_cfg)
{
- if (engine_cfg == NULL) {
- LOGE("Impossible to create mv_engine_config_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(engine_cfg);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Creating media vision engine config");
try {
(*engine_cfg) = static_cast<mv_engine_config_h>(new MediaVision::Common::EngineConfig());
@@ -305,31 +308,30 @@ int mv_create_engine_config_c(mv_engine_config_h *engine_cfg)
}
LOGD("Media vision engine config [%p] has been created", *engine_cfg);
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_destroy_engine_config_c(mv_engine_config_h engine_cfg)
+int mv_destroy_engine_config(mv_engine_config_h engine_cfg)
{
- if (!engine_cfg) {
- LOGE("Impossible to destroy NULL mv_engine_config_h handle");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_FUNCTION_ENTER();
LOGD("Destroying media vision engine config [%p]", engine_cfg);
delete (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg));
LOGD("Media vision engine config has been destroyed");
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
-int mv_engine_config_set_double_attribute_c(mv_engine_config_h engine_cfg, const char *name, double value)
+int mv_engine_config_set_double_attribute(mv_engine_config_h engine_cfg, const char *name, double value)
{
- if (!engine_cfg || name == NULL) {
- LOGE("Impossible to set attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p;",
- engine_cfg, name);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))->setAttribute(std::string(name), value);
@@ -339,17 +341,16 @@ int mv_engine_config_set_double_attribute_c(mv_engine_config_h engine_cfg, const
}
LOGD("Attribute [%s] (value %f) has been set", name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_set_int_attribute_c(mv_engine_config_h engine_cfg, const char *name, int value)
+int mv_engine_config_set_int_attribute(mv_engine_config_h engine_cfg, const char *name, int value)
{
- if (!engine_cfg || name == NULL) {
- LOGE("Impossible to set attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p;",
- engine_cfg, name);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))->setAttribute(std::string(name), value);
@@ -360,17 +361,16 @@ int mv_engine_config_set_int_attribute_c(mv_engine_config_h engine_cfg, const ch
LOGD("Attribute [%s] (value %i) has been set", name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_set_bool_attribute_c(mv_engine_config_h engine_cfg, const char *name, bool value)
+int mv_engine_config_set_bool_attribute(mv_engine_config_h engine_cfg, const char *name, bool value)
{
- if (!engine_cfg || name == NULL) {
- LOGE("Impossible to set attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p;",
- engine_cfg, name);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))->setAttribute(std::string(name), value);
@@ -380,17 +380,17 @@ int mv_engine_config_set_bool_attribute_c(mv_engine_config_h engine_cfg, const c
}
LOGD("Attribute [%s] (value %s) has been set", name, value ? "TRUE" : "FALSE");
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_set_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, const char *value)
+int mv_engine_config_set_string_attribute(mv_engine_config_h engine_cfg, const char *name, const char *value)
{
- if (!engine_cfg || name == NULL || value == NULL) {
- LOGE("Impossible to set attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; value = %p;",
- engine_cfg, name, value);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))
->setAttribute(std::string(name), std::string(value));
@@ -401,18 +401,18 @@ int mv_engine_config_set_string_attribute_c(mv_engine_config_h engine_cfg, const
}
LOGD("Attribute [%s] (value %s) has been set", name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_set_array_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, const char **values,
- unsigned int size)
+int mv_engine_config_set_array_string_attribute(mv_engine_config_h engine_cfg, const char *name, const char **values,
+ unsigned int size)
{
- if (!engine_cfg || name == NULL || values == NULL) {
- LOGE("Impossible to set attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; values = %p;",
- engine_cfg, name, values);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(values);
+ MEDIA_VISION_FUNCTION_ENTER();
unsigned int elmIdx = 0;
std::vector<std::string> arrayValues;
@@ -434,17 +434,17 @@ int mv_engine_config_set_array_string_attribute_c(mv_engine_config_h engine_cfg,
}
LOGD("Attribute [%s] has been set", name);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_get_double_attribute_c(mv_engine_config_h engine_cfg, const char *name, double *value)
+int mv_engine_config_get_double_attribute(mv_engine_config_h engine_cfg, const char *name, double *value)
{
- if (!engine_cfg || name == NULL || value == NULL) {
- LOGE("Impossible to get attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; value = %p;",
- engine_cfg, name, value);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret =
(static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))->getDoubleAttribute(std::string(name), value);
@@ -455,17 +455,17 @@ int mv_engine_config_get_double_attribute_c(mv_engine_config_h engine_cfg, const
}
LOGD("Attribute [%s] (value %f) has been gotten", name, *value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_get_int_attribute_c(mv_engine_config_h engine_cfg, const char *name, int *value)
+int mv_engine_config_get_int_attribute(mv_engine_config_h engine_cfg, const char *name, int *value)
{
- if (!engine_cfg || name == NULL || value == NULL) {
- LOGE("Impossible to get attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; value = %p;",
- engine_cfg, name, value);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))
->getIntegerAttribute(std::string(name), value);
@@ -476,17 +476,17 @@ int mv_engine_config_get_int_attribute_c(mv_engine_config_h engine_cfg, const ch
}
LOGD("Attribute [%s] (value %i) has been gotten", name, *value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_get_bool_attribute_c(mv_engine_config_h engine_cfg, const char *name, bool *value)
+int mv_engine_config_get_bool_attribute(mv_engine_config_h engine_cfg, const char *name, bool *value)
{
- if (!engine_cfg || name == NULL || value == NULL) {
- LOGE("Impossible to get attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; value = %p;",
- engine_cfg, name, value);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_FUNCTION_ENTER();
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))
->getBooleanAttribute(std::string(name), value);
@@ -497,17 +497,17 @@ int mv_engine_config_get_bool_attribute_c(mv_engine_config_h engine_cfg, const c
}
LOGD("Attribute [%s] (value %s) has been gotten", name, *value ? "TRUE" : "FALSE");
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_get_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, char **value)
+int mv_engine_config_get_string_attribute(mv_engine_config_h engine_cfg, const char *name, char **value)
{
- if (!engine_cfg || name == NULL || value == NULL) {
- LOGE("Impossible to get attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; value = %p;",
- engine_cfg, name, value);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_FUNCTION_ENTER();
std::string attributeValue;
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))
@@ -543,18 +543,19 @@ int mv_engine_config_get_string_attribute_c(mv_engine_config_h engine_cfg, const
(*value)[stringSize] = '\0';
LOGD("Attribute [%s] (value %s) has been gotten", name, *value);
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_get_array_string_attribute_c(mv_engine_config_h engine_cfg, const char *name, char ***values,
- int *size)
+int mv_engine_config_get_array_string_attribute(mv_engine_config_h engine_cfg, const char *name, char ***values,
+ int *size)
{
- if (!engine_cfg || name == NULL || values == NULL) {
- LOGE("Impossible to get attribute. One of the required parameters is "
- "NULL. engine_cfg = %p; name = %p; values = %p;",
- engine_cfg, name, values);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(values);
+ MEDIA_VISION_NULL_ARG_CHECK(size);
+ MEDIA_VISION_FUNCTION_ENTER();
std::vector<std::string> attributeValue;
int ret = (static_cast<MediaVision::Common::EngineConfig *>(engine_cfg))
@@ -608,16 +609,16 @@ int mv_engine_config_get_array_string_attribute_c(mv_engine_config_h engine_cfg,
LOGD("Attribute [%s] (value[%d] %s) has been gotten", name, idx, (*values)[idx]);
}
+ MEDIA_VISION_FUNCTION_LEAVE();
return ret;
}
-int mv_engine_config_foreach_supported_attribute_c(mv_supported_attribute_cb callback, void *user_data)
+int mv_engine_config_foreach_supported_attribute(mv_supported_attribute_cb callback, void *user_data)
{
- if (NULL == callback) {
- LOGE("Impossible to traverse supported by Media Vision engine "
- "configuration attributes. Callback is NULL");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(_mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(callback);
+ MEDIA_VISION_NULL_ARG_CHECK(user_data);
+ MEDIA_VISION_FUNCTION_ENTER();
using namespace MediaVision::Common;
std::unique_ptr<EngineConfig> config;
@@ -669,6 +670,8 @@ int mv_engine_config_foreach_supported_attribute_c(mv_supported_attribute_cb cal
}
LOGD("Attribute names/types has been gotten");
+
+ MEDIA_VISION_FUNCTION_LEAVE();
return MEDIA_VISION_ERROR_NONE;
}
diff --git a/mv_face/face/include/FaceExpressionRecognizer.h b/mv_face/face/include/FaceExpressionRecognizer.h
index 740ac9b9..a9d5a296 100644
--- a/mv_face/face/include/FaceExpressionRecognizer.h
+++ b/mv_face/face/include/FaceExpressionRecognizer.h
@@ -17,7 +17,7 @@
#ifndef __MEDIA_VISION_FACE_EXPRESSION_RECOGNIZER_H__
#define __MEDIA_VISION_FACE_EXPRESSION_RECOGNIZER_H__
-#include "mv_common_c.h"
+#include "mv_common.h"
#include "mv_face_open.h"
#include <opencv2/objdetect.hpp>
diff --git a/mv_face/face/include/FaceEyeCondition.h b/mv_face/face/include/FaceEyeCondition.h
index c301f47f..cc842693 100644
--- a/mv_face/face/include/FaceEyeCondition.h
+++ b/mv_face/face/include/FaceEyeCondition.h
@@ -17,7 +17,7 @@
#ifndef __MEDIA_VISION_FACE_EYE_CONDITION_H__
#define __MEDIA_VISION_FACE_EYE_CONDITION_H__
-#include <mv_common_c.h>
+#include <mv_common.h>
#include <mv_face.h>
#include <opencv2/imgproc.hpp>
diff --git a/mv_face/face/include/FaceUtil.h b/mv_face/face/include/FaceUtil.h
index bdc121e5..5642e0b3 100644
--- a/mv_face/face/include/FaceUtil.h
+++ b/mv_face/face/include/FaceUtil.h
@@ -19,7 +19,7 @@
#include <opencv2/core.hpp>
-#include "mv_common_c.h"
+#include "mv_common.h"
/**
* @file FaceUtil.h
diff --git a/mv_face/face/src/mv_face_open.cpp b/mv_face/face/src/mv_face_open.cpp
index 458480b9..2a1f752a 100644
--- a/mv_face/face/src/mv_face_open.cpp
+++ b/mv_face/face/src/mv_face_open.cpp
@@ -48,7 +48,7 @@ static void extractRecognitionParams(mv_engine_config_h engine_cfg, RecognitionP
}
int algType = 0;
- mv_engine_config_get_int_attribute_c(working_cfg, "MV_FACE_RECOGNITION_MODEL_TYPE", &algType);
+ mv_engine_config_get_int_attribute(working_cfg, "MV_FACE_RECOGNITION_MODEL_TYPE", &algType);
if (0 < algType && 4 > algType)
recognitionParams.mRecognitionAlgType = (FaceRecognitionModelType) algType;
@@ -87,8 +87,8 @@ int mv_face_detect_open(mv_source_h source, mv_engine_config_h engine_cfg, mv_fa
/* set face detection model */
char *haarcascadeFilepath;
- error = mv_engine_config_get_string_attribute_c(engine_cfg, "MV_FACE_DETECTION_MODEL_FILE_PATH",
- &haarcascadeFilepath);
+ error = mv_engine_config_get_string_attribute(engine_cfg, "MV_FACE_DETECTION_MODEL_FILE_PATH",
+ &haarcascadeFilepath);
if (error == MEDIA_VISION_ERROR_NONE) {
LOGI("Haarcascade file was set as default");
haarcascadeFilePathStr = std::string(haarcascadeFilepath);
@@ -102,38 +102,38 @@ int mv_face_detect_open(mv_source_h source, mv_engine_config_h engine_cfg, mv_fa
}
/* Set roi to be detected */
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_ROI_X, &roi.x);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_ROI_X, &roi.x);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection roi (x) receiving."
" (%i)",
error);
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_ROI_Y, &roi.y);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_ROI_Y, &roi.y);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection roi (y) receiving."
" (%i)",
error);
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_ROI_WIDTH, &roi.width);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_ROI_WIDTH, &roi.width);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection roi (width) receiving."
" (%i)",
error);
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_ROI_HEIGHT, &roi.height);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_ROI_HEIGHT, &roi.height);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection roi (height) receiving."
" (%i)",
error);
/* Set minimum size to be detected */
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_MIN_SIZE_WIDTH, &minWidth);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_MIN_SIZE_WIDTH, &minWidth);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection minimum width receiving."
" (%i)",
error);
- error = mv_engine_config_get_int_attribute_c(engine_cfg, MV_FACE_DETECTION_MIN_SIZE_HEIGHT, &minHeight);
+ error = mv_engine_config_get_int_attribute(engine_cfg, MV_FACE_DETECTION_MIN_SIZE_HEIGHT, &minHeight);
if (error != MEDIA_VISION_ERROR_NONE)
LOGE("Error occurred during face detection minimum height receiving."
" (%i)",
diff --git a/mv_image/image/src/mv_image_open.cpp b/mv_image/image/src/mv_image_open.cpp
index 8599892f..b8a207a1 100644
--- a/mv_image/image/src/mv_image_open.cpp
+++ b/mv_image/image/src/mv_image_open.cpp
@@ -17,7 +17,7 @@
#include "mv_image_open.h"
#include "mv_private.h"
-#include "mv_common_c.h"
+#include "mv_common.h"
#include "ImageConfig.h"
#include "Features/FeatureExtractor.h"
@@ -131,11 +131,11 @@ void extractTargetFeaturesExtractingParams(mv_engine_config_h engine_cfg,
featuresExtractingParams = DefaultConfiguration::getInstance().getObjectFeaturesExtractingParams();
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR,
- &featuresExtractingParams.ORB.mScaleFactor);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_RECOGNITION_OBJECT_SCALE_FACTOR,
+ &featuresExtractingParams.ORB.mScaleFactor);
- mv_engine_config_get_int_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM,
- &featuresExtractingParams.ORB.mMaximumFeaturesNumber);
+ mv_engine_config_get_int_attribute(working_cfg, MV_IMAGE_RECOGNITION_OBJECT_MAX_KEYPOINTS_NUM,
+ &featuresExtractingParams.ORB.mMaximumFeaturesNumber);
if (NULL == engine_cfg)
mv_destroy_engine_config(working_cfg);
@@ -154,11 +154,11 @@ void extractSceneFeaturesExtractingParams(mv_engine_config_h engine_cfg,
featuresExtractingParams = DefaultConfiguration::getInstance().getSceneFeaturesExtractingParams();
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR,
- &featuresExtractingParams.ORB.mScaleFactor);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_RECOGNITION_SCENE_SCALE_FACTOR,
+ &featuresExtractingParams.ORB.mScaleFactor);
- mv_engine_config_get_int_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM,
- &featuresExtractingParams.ORB.mMaximumFeaturesNumber);
+ mv_engine_config_get_int_attribute(working_cfg, MV_IMAGE_RECOGNITION_SCENE_MAX_KEYPOINTS_NUM,
+ &featuresExtractingParams.ORB.mMaximumFeaturesNumber);
if (NULL == engine_cfg)
mv_destroy_engine_config(working_cfg);
@@ -176,14 +176,14 @@ void extractRecognitionParams(mv_engine_config_h engine_cfg, MediaVision::Image:
recognitionParams = DefaultConfiguration::getInstance().getRecognitionParams();
- mv_engine_config_get_int_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_MIN_MATCH_NUM,
- &recognitionParams.mMinMatchesNumber);
+ mv_engine_config_get_int_attribute(working_cfg, MV_IMAGE_RECOGNITION_MIN_MATCH_NUM,
+ &recognitionParams.mMinMatchesNumber);
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_REQ_MATCH_PART,
- &recognitionParams.mRequiredMatchesPart);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_RECOGNITION_REQ_MATCH_PART,
+ &recognitionParams.mRequiredMatchesPart);
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR,
- &recognitionParams.mTolerantMatchesPartError);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_RECOGNITION_TOLERANT_MATCH_PART_ERR,
+ &recognitionParams.mTolerantMatchesPartError);
if (NULL == engine_cfg)
mv_destroy_engine_config(working_cfg);
@@ -203,20 +203,20 @@ void extractStabilizationParams(mv_engine_config_h engine_cfg,
stabilizationParams = DefaultConfiguration::getInstance().getStabilizationParams();
- mv_engine_config_get_bool_attribute_c(working_cfg, MV_IMAGE_TRACKING_USE_STABLIZATION,
- &stabilizationParams.mIsEnabled);
+ mv_engine_config_get_bool_attribute(working_cfg, MV_IMAGE_TRACKING_USE_STABLIZATION,
+ &stabilizationParams.mIsEnabled);
- mv_engine_config_get_int_attribute_c(working_cfg, MV_IMAGE_TRACKING_HISTORY_AMOUNT, &_history_amount);
+ mv_engine_config_get_int_attribute(working_cfg, MV_IMAGE_TRACKING_HISTORY_AMOUNT, &_history_amount);
stabilizationParams.mHistoryAmount = static_cast<size_t>(static_cast<unsigned int>(_history_amount));
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT,
- &stabilizationParams.mTolerantShift);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_TOLERANT_SHIFT,
+ &stabilizationParams.mTolerantShift);
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_SPEED,
- &stabilizationParams.mStabilizationSpeed);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_SPEED,
+ &stabilizationParams.mStabilizationSpeed);
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION,
- &stabilizationParams.mStabilizationAcceleration);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_TRACKING_STABLIZATION_ACCELERATION,
+ &stabilizationParams.mStabilizationAcceleration);
if (NULL == engine_cfg)
mv_destroy_engine_config(working_cfg);
@@ -240,8 +240,8 @@ void extractTrackingParams(mv_engine_config_h engine_cfg, MediaVision::Image::Tr
extractStabilizationParams(working_cfg, trackingParams.mStabilizationParams);
- mv_engine_config_get_double_attribute_c(working_cfg, MV_IMAGE_TRACKING_EXPECTED_OFFSET,
- &trackingParams.mExpectedOffset);
+ mv_engine_config_get_double_attribute(working_cfg, MV_IMAGE_TRACKING_EXPECTED_OFFSET,
+ &trackingParams.mExpectedOffset);
if (NULL == engine_cfg)
mv_destroy_engine_config(working_cfg);