*/
#include <media_info.h>
-#include <media-util-dcm.h>
#include <media_info_private.h>
#include <media_util_private.h>
#include <system_info.h>
return isFaceRecognitionSupported;
}
-static void __media_info_face_completed_cb(int error, const int face_count, void *user_data)
-{
- int error_value = MEDIA_CONTENT_ERROR_NONE;
-
- media_face_cb_s *_face_cb = (media_face_cb_s *)user_data;
-
- if (_face_cb != NULL) {
- content_debug("error [%d], face_count [%d]", error, face_count);
- error_value = _content_error_capi(error);
- if (_face_cb->face_completed_cb)
- _face_cb->face_completed_cb(error_value, face_count, _face_cb->user_data);
- }
-
- g_free(_face_cb);
-
- return;
-}
// LCOV_EXCL_STOP
static int __media_info_insert_batch(const char **path_array,
unsigned int array_length,
int media_info_start_face_detection(media_info_h media, media_face_detection_completed_cb callback, void *user_data)
{
content_warn("DEPRECATION WARNING: media_info_start_face_detection() is deprecated and will be removed from next release.");
- int ret = MEDIA_CONTENT_ERROR_NONE;
- static unsigned int req_id = 0;
media_info_s *_media = (media_info_s*)media;
if (!__media_info_isFaceRecognition_feature_supported()) {
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
- media_face_cb_s *_face_cb = g_new0(media_face_cb_s, 1);
-
- req_id++;
- _media->face_request_id = req_id;
-
- _face_cb->user_data = user_data;
- _face_cb->face_completed_cb = callback;
-
- ret = dcm_request_extract_face_async(_media->face_request_id, _media->file_path, (FaceFunc)__media_info_face_completed_cb, (void *)_face_cb, _content_get_uid());
- ret = _content_error_capi(ret);
-
- return ret;
+ return MEDIA_CONTENT_ERROR_NONE;
}
int media_info_cancel_face_detection(media_info_h media)
{
content_warn("DEPRECATION WARNING: media_info_cancel_face_detection() is deprecated and will be removed from next release.");
- int ret = MEDIA_CONTENT_ERROR_NONE;
media_info_s *_media = (media_info_s*)media;
if (!__media_info_isFaceRecognition_feature_supported()) {
content_retip_if_fail(STRING_VALID(_media->media_id));
content_retip_if_fail(_media->face_request_id > 0);
- ret = dcm_request_cancel_face(_media->face_request_id);
- return _content_error_capi(ret);
+ return MEDIA_CONTENT_ERROR_NONE;
}
// LCOV_EXCL_STOP
\ No newline at end of file