"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
}
- if (attributeValue.copy(*value, stringSize) != attributeValue.size()) {
+ try {
+ size_t copiedSize = attributeValue.copy(*value, stringSize);
+ if (copiedSize != attributeValue.size()) {
+ LOGE("Conversion from string to char* failed");
+ free(*value);
+ (*value) = NULL;
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
+ }
+ } catch (std::out_of_range& e) {
LOGE("Conversion from string to char* failed");
free(*value);
(*value) = NULL;
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
filePath = fileName;
- std::string prefixPath = filePath.substr(0, filePath.find_last_of('/'));
- LOGD("prefixPath: %s", prefixPath.c_str());
-
- /* check the directory is available */
- if (access(prefixPath.c_str(), F_OK)) {
- LOGE("Can't save tracking model. Path[%s] doesn't existed.", prefixPath.c_str());
-
+ try {
+ std::string prefixPath = filePath.substr(0, filePath.find_last_of('/'));
+ LOGD("prefixPath: %s", prefixPath.c_str());
+ /* check the directory is available */
+ if (access(prefixPath.c_str(), F_OK)) {
+ LOGE("Can't save tracking model. Path[%s] doesn't existed.", prefixPath.c_str());
+
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
+ } catch (std::out_of_range& e) {
+ LOGE("Can't save tracking model. Path[%s] is invalid.", filePath.c_str());
return MEDIA_VISION_ERROR_INVALID_PATH;
}
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
Version: 0.5.0
-Release: 1
+Release: 2
Group: Multimedia/Framework
License: Apache-2.0 and BSD-3-Clause
Source0: %{name}-%{version}.tar.gz
"http://tizen.org/feature/vision.inference.image",
&isInferenceImageSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal5 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.image");
return false;
}
"http://tizen.org/feature/vision.inference.face",
&isInferenceFaceSupported);
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ if (nRetVal6 != SYSTEM_INFO_ERROR_NONE) {
LOGE("SYSTEM_INFO_ERROR: vision.inference.face");
return false;
}
}
err = mv_source_get_colorspace(frame, &image_data.image_colorspace);
+ if (MEDIA_VISION_ERROR_NONE != err) {
+ printf(
+ "ERROR: Errors were occurred during getting image colorspace from the "
+ "source; code %i\n",
+ err);
+ return err;
+ }
if (location) {
printf(
int err2 = mv_destroy_source(mvSource);
if (err2 != MEDIA_VISION_ERROR_NONE) {
printf("Fail to destroy mvSource.\n", err2);
- free(in_file_name);
- return err2;
}
+ free(in_file_name);
+ break;
}
-
free(in_file_name);
// Run
printf("Fail to destroy mvSource.\n", err2);
}
free(in_file_name);
- return err2;
+ break;
}
free(in_file_name);
printf("Fail to destroy mvSource.\n", err2);
}
free(in_file_name);
- return err2;
+ break;
}
free(in_file_name);
printf("Fail to destroy mvSource.\n", err2);
}
free(in_file_name);
- return err2;
+ break;
}
free(in_file_name);