- int mmf_error = FILEINFO_ERROR_NONE;
- MMHandleType tag = 0;
- MMHandleType content = 0;
- char *p = NULL;
- unsigned int size = 0;
-
- mmf_error = mm_file_create_tag_attrs_no_albumart(&tag, content_info->path);
-
- if (mmf_error == FILEINFO_ERROR_NONE) {
- mmf_error = mm_file_get_attrs(tag, MM_FILE_TAG_RECDATE, &p, &size, NULL);
- if ((mmf_error == FILEINFO_ERROR_NONE) && (size > 0)) {
- if (g_str_has_suffix(content_info->mime_type, "mp4") || g_str_has_suffix(content_info->mime_type, "3gpp")) {
- /*Creation time format is 20130101 00:00:00 +0000. change it to 2013:01:01 00:00:00 +0000 like exif time format*/
- content_info->media_meta.recorded_date = g_strdelimit(g_strdup(p), "-", ':');
- } else {
- content_info->media_meta.recorded_date = g_strdup(p);
- }
- }
-
- if (content_info->media_meta.recorded_date == NULL)
- content_info->media_meta.recorded_date = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
- content_info->media_meta.datetaken = g_strdup(content_info->media_meta.recorded_date);
-
- mmf_error = mm_file_destroy_tag_attrs(tag);
- if (mmf_error != FILEINFO_ERROR_NONE)
- media_svc_error("fail to free tag attr - err(%x)", mmf_error);
- }
- /*Get Content attribute ===========*/
- mmf_error = mm_file_create_content_attrs_simple(&content, content_info->path);
- media_svc_retvm_if(mmf_error != FILEINFO_ERROR_NONE, MS_MEDIA_ERR_NONE, "mm_file_create_content_attrs failed");
-
- mm_file_get_attrs(content, MM_FILE_CONTENT_VIDEO_WIDTH, &content_info->media_meta.width,
- MM_FILE_CONTENT_VIDEO_HEIGHT, &content_info->media_meta.height,
- NULL);
-
- mm_file_destroy_content_attrs(content);
-