X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Finclude%2Fcommon%2Fmedia-svc-util.h;h=d38de2d8bd5190e6415c5a94d1c6eeceb3174295;hb=refs%2Fchanges%2F81%2F307481%2F4;hp=405833ff138d75b4b48a821f7e648c651179c3b9;hpb=3ccf2be2eb5775ed33689efb5df348289c62b5d4;p=platform%2Fcore%2Fmultimedia%2Flibmedia-service.git diff --git a/src/include/common/media-svc-util.h b/src/include/common/media-svc-util.h index 405833f..d38de2d 100755 --- a/src/include/common/media-svc-util.h +++ b/src/include/common/media-svc-util.h @@ -24,61 +24,55 @@ #include #include +#include #include #include -#include +#include +#include #ifdef __cplusplus extern "C" { #endif -#define STRING_VALID(str) (str != NULL && strlen(str) > 0) +#define STRING_VALID(str) (str && strlen(str) > 0) /** * Media meta data information */ typedef struct { - char *title; /**< track title*/ - char *album; /**< album name*/ - char *artist; /**< artist name*/ - char *album_artist; /**< artist name*/ - char *genre; /**< genre of track*/ - char *composer; /**< composer name*/ - char *year; /**< year*/ - char *recorded_date; /**< recorded date*/ - char *copyright; /**< copyright*/ - char *track_num; /**< track number*/ - char *description; /**< description*/ - int bitrate; /**< bitrate*/ - int samplerate; /**< samplerate*/ - int channel; /**< channel*/ - int duration; /**< duration*/ - int width; /**< width*/ - int height; /**< height*/ - char *datetaken; /**< datetaken*/ - int orientation; /**< orientation*/ - int rating; /**< user defined rating */ - int bitpersample; /**< bitrate*/ + char *title; /**< track title*/ + char *album; /**< album name*/ + char *artist; /**< artist name*/ + char *album_artist; /**< artist name*/ + char *genre; /**< genre of track*/ + char *year; /**< year*/ + char *recorded_date; /**< recorded date*/ + char *copyright; /**< copyright*/ + char *track_num; /**< track number*/ + int width; /**< width*/ + int height; /**< height*/ + char *datetaken; /**< datetaken*/ + int orientation; /**< orientation*/ } media_svc_content_meta_s; /** * Media data information */ typedef struct { - char *media_uuid; /**< Unique ID of item */ - char *path; /**< Full path of media file */ - char *file_name; /**< File name of media file. Display name */ - int media_type; /**< Type of media file : internal/external */ - char *mime_type; /**< Full path and file name of media file */ - unsigned long long size; /**< size */ - time_t added_time; /**< added time, time_t */ - time_t modified_time; /**< modified time, time_t */ - time_t timeline; /**< timeline of media, time_t */ - long long int folder_id; /**< Unique ID of folder */ - int album_id; /**< Unique ID of album */ - char *thumbnail_path; /**< Thumbnail image file path */ - char *storage_uuid; /**< Unique ID of storage */ - media_svc_content_meta_s media_meta; /**< meta data structure for audio files */ + char *media_uuid; /**< Unique ID of item */ + char *path; /**< Full path of media file */ + char *file_name; /**< File name of media file. Display name */ + int media_type; /**< Type of media file : internal/external */ + char *mime_type; /**< Full path and file name of media file */ + unsigned long long size; /**< size */ + time_t added_time; /**< added time, time_t */ + time_t modified_time; /**< modified time, time_t */ + time_t timeline; /**< timeline of media, time_t */ + long long int folder_id; /**< Unique ID of folder */ + int album_id; /**< Unique ID of album */ + char *thumbnail_path; /**< Thumbnail image file path */ + char *storage_uuid; /**< Unique ID of storage */ + media_svc_content_meta_s media_meta; /**< meta data structure */ } media_svc_content_info_s; /** @@ -99,12 +93,12 @@ typedef enum { } media_svc_search_type_e; void _media_svc_remove_file(const char *path); -int _media_svc_get_thumbnail_path(char *thumb_path, const char *pathname, const char *img_format, uid_t uid); int _media_svc_get_file_time(const char *full_path); -char * _media_svc_get_title_by_path(const char *path); +char * _media_svc_get_title_from_filename(const char *filename); int _media_svc_set_media_info(media_svc_content_info_s *content_info, const char *storage_id, const char *path, bool refresh); int _media_svc_extract_image_metadata(media_svc_content_info_s *content_info); -int _media_svc_extract_media_metadata(sqlite3 *handle, bool is_direct, media_svc_content_info_s *content_info, uid_t uid); +void _media_svc_extract_audio_metadata(sqlite3 *handle, bool is_direct, media_svc_content_info_s *content_info, uid_t uid); +int _media_svc_extract_video_metadata(media_svc_content_info_s *content_info); int _media_svc_extract_book_metadata(media_svc_content_info_s *content_info); void _media_svc_destroy_content_info(media_svc_content_info_s *content_info); int _media_svc_create_thumbnail(const char *path, char *thumb_path, media_svc_media_type_e media_type, uid_t uid);