diff options
author | Hyunjun Ko <zzoon.ko@samsung.com> | 2013-05-06 18:39:00 +0900 |
---|---|---|
committer | Hyunjun Ko <zzoon.ko@samsung.com> | 2013-05-06 18:39:00 +0900 |
commit | 4e6d6e263d437909072c99674e68964c9705b0fa (patch) | |
tree | 0ae34ad7fc5c1a350bf3b7fd915ad63cafa25aea | |
parent | 3d5ef6ea2ef485e656a609d2b8494d7e4d381665 (diff) | |
download | libmedia-service-4e6d6e263d437909072c99674e68964c9705b0fa.tar.gz libmedia-service-4e6d6e263d437909072c99674e68964c9705b0fa.tar.bz2 libmedia-service-4e6d6e263d437909072c99674e68964c9705b0fa.zip |
Set filename as title for other type mediasubmit/tizen_2.1/20130514.053021submit/tizen/20130517.045030accepted/tizen/20130520.101126tizen_2.1
-rwxr-xr-x | packaging/libmedia-service.spec | 2 | ||||
-rwxr-xr-x | src/common/media-svc-util.c | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/packaging/libmedia-service.spec b/packaging/libmedia-service.spec index 3a75a98..8403384 100755 --- a/packaging/libmedia-service.spec +++ b/packaging/libmedia-service.spec @@ -1,6 +1,6 @@ Name: libmedia-service Summary: Media information service library for multimedia applications. -Version: 0.2.42 +Version: 0.2.43 Release: 3 Group: System/Libraries License: Apache License, Version 2.0 diff --git a/src/common/media-svc-util.c b/src/common/media-svc-util.c index b824595..2fb6fe0 100755 --- a/src/common/media-svc-util.c +++ b/src/common/media-svc-util.c @@ -569,10 +569,21 @@ int _media_svc_set_media_info(media_svc_content_info_s *content_info, media_svc_ content_info->media_meta.latitude = MEDIA_SVC_DEFAULT_GPS_VALUE; content_info->media_meta.altitude = MEDIA_SVC_DEFAULT_GPS_VALUE; - /* Set default value before extracting meta information */ - ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.title, MEDIA_SVC_TAG_UNKNOWN); - media_svc_retv_del_if(ret != MEDIA_INFO_ERROR_NONE, ret, content_info); + /* Set filename to title for all media */ + char *title = NULL; + title = _media_svc_get_title_from_filepath(content_info->path); + if (title) { + ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.title, title); + if(ret != MEDIA_INFO_ERROR_NONE) + media_svc_error("strcpy error"); + SAFE_FREE(title); + } else { + media_svc_error("Can't extract title from filepath [%s]", content_info->path); + ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.title, MEDIA_SVC_TAG_UNKNOWN); + media_svc_retv_del_if(ret != MEDIA_INFO_ERROR_NONE, ret, content_info); + } + /* Set default value before extracting meta information */ ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.description, MEDIA_SVC_TAG_UNKNOWN); media_svc_retv_del_if(ret != MEDIA_INFO_ERROR_NONE, ret, content_info); |