*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path The file path
*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path The folder path
#define MEDIA_KEYWORD_PINYIN "MEDIA_KEYWORD_PINYIN" /**< Media keyword pinyin*/
/**
+ * @brief You can use above define to set the condition of media filter and order keyword.
+ * @since_tizen 3.0
+ *
+ */
+#define MEDIA_360 "MEDIA_360"
+
+/**
* @}
*/
* @remarks You must release the handle using media_info_destroy(). \n
* You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path The path to the media file
*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path_array The path array to the media files
*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage with this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path_array The path array to the burst shot images
int media_info_is_drm(media_info_h media, bool *is_drm);
/**
+ * @brief Checks whether the media is 360 content.
+ * @since_tizen 3.0
+ *
+ * @param[in] media The media info handle
+ * @param[out] is_360 @c true if media is 360 content,
+ * otherwise @c false if media is not 360 content
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int media_info_is_360_content(media_info_h media, bool *is_360);
+
+/**
* @brief Gets the storage type of media info.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you should add all privilege.
*
* @param[in] media_id The ID of the media info
*
* @remarks You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path. \n
* If you want to access only internal storage by using this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
- * Or if you want to access only external storage by using this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+ * Or if you want to access only external storage by using this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you should add all privilege.
*
* @param[in] media The media info handle
* @privlevel public
* @privilege %http://tizen.org/privilege/content.write
*
- * @remarks If you request cancel for the alreay thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
+ * @remarks If you request cancel for the already thumbnail created media, this API return MEDIA_CONTENT_ERROR_INVALID_OPERATION
*
* @param[in] media The media info handle
*
* %http://tizen.org/privilege/externalstorage
*
* @remarks If you want to access only internal storage with this API, you should add privilege http://tizen.org/privilege/mediastorage. \n
-* Or if you want to access only external storage with this API, you shold add privilege http://tizen.org/privilege/externalstorage. \n
+* Or if you want to access only external storage with this API, you should add privilege http://tizen.org/privilege/externalstorage. \n
* If you can access both storage, you must add all privilege.
*
* @param[in] path The path to create the media info handle
MEDIA_INFO_WEATHER,
MEDIA_INFO_SYNC_STATUS,
MEDIA_INFO_STORAGE_UUID,
+ MEDIA_INFO_IS_360,
MEDIA_INFO_ITEM_MAX,
} media_info_item_e;
char *storage_uuid;
int sync_status;
unsigned int request_id;
+ int is_360;
image_meta_s *image_meta;
video_meta_s *video_meta;
audio_meta_s *audio_meta;
#define DB_FIELD_MEDIA_LOCATION_TAG_PINYIN "location_tag_pinyin"
#define DB_FIELD_MEDIA_AGE_RATING_PINYIN "age_rating_pinyin"
#define DB_FIELD_MEDIA_KEYWORD_PINYIN "keyword_pinyin"
+#define DB_FIELD_MEDIA_360 "is_360"
/* DB field for folder */
#define DB_FIELD_FOLDER_ID "folder_uuid"
/* Get Media list of Group */
#define MEDIA_INFO_ITEM "media_uuid, path, file_name, media_type, mime_type, size, added_time, modified_time, thumbnail_path, description, \
- rating, favourite, author, provider, content_name, category, location_tag, age_rating, keyword, is_drm, storage_type, longitude, latitude, altitude, exposure_time, fnumber, iso, model, width, height, datetaken, orientation, title, album, artist, album_artist, genre, composer, year, recorded_date, copyright, track_num, bitrate, bitpersample, duration, played_count, last_played_time, last_played_position, samplerate, channel, burst_id, timeline, weather, sync_status, storage_uuid"
+ rating, favourite, author, provider, content_name, category, location_tag, age_rating, keyword, is_drm, storage_type, longitude, latitude, altitude, exposure_time, fnumber, iso, model, width, height, datetaken, orientation, title, album, artist, album_artist, genre, composer, year, recorded_date, copyright, track_num, bitrate, bitpersample, duration, played_count, last_played_time, last_played_position, samplerate, channel, burst_id, timeline, weather, sync_status, storage_uuid, is_360"
/*Folder info*/
#define UPDATE_FOLDER_ORDER "UPDATE "DB_TABLE_FOLDER" SET folder_order=%d WHERE folder_uuid=%Q"
Name: capi-content-media-content
Summary: A Media content library in Tizen Native API
-Version: 0.2.77
+Version: 0.2.78
Release: 0
Group: Multimedia/API
License: Apache-2.0
ret = _media_filter_attribute_add(g_attr_handle, BOOKMARK_MARKED_TIME, DB_FIELD_BOOKMARK_MARKED_TIME);
media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ ret = _media_filter_attribute_add(g_attr_handle, MEDIA_360, DB_FIELD_MEDIA_360);
+ media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+
/* Storage*/
ret = _media_filter_attribute_add(g_attr_handle, MEDIA_STORAGE_ID, DB_FIELD_STORAGE_ID);
media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _media_filter_attribute_add(g_alias_attr_handle, MEDIA_STORAGE_TYPE, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_STORAGE_TYPE);
media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ ret = _media_filter_attribute_add(g_alias_attr_handle, MEDIA_360, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_360);
+ media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+
/* Pinyin*/
ret = _media_filter_attribute_add(g_alias_attr_handle, MEDIA_FILE_NAME_PINYIN, DB_TABLE_ALIAS_MEDIA"."DB_FIELD_MEDIA_FILE_NAME_PINYIN);
media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
_media->weather = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_WEATHER));
_media->sync_status = (int)sqlite3_column_int(stmt, MEDIA_INFO_SYNC_STATUS);
_media->storage_uuid = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_STORAGE_UUID));
+ _media->is_360 = (int)sqlite3_column_int(stmt, MEDIA_INFO_IS_360);
if (_media->media_type == MEDIA_CONTENT_TYPE_IMAGE) {
_media->image_meta = (image_meta_s *)calloc(1, sizeof(image_meta_s));
_dst->played_position = _src->played_position;
_dst->sync_status = _src->sync_status;
_dst->request_id = _src->request_id;
+ _dst->is_360 = _src->is_360;
if (_src->media_type == MEDIA_CONTENT_TYPE_IMAGE && _src->image_meta) {
_dst->image_meta = (image_meta_s *)calloc(1, sizeof(image_meta_s));
return ret;
}
+int media_info_is_360_content(media_info_h media, bool *is_360)
+{
+ int ret = MEDIA_CONTENT_ERROR_NONE;
+ media_info_s *_media = (media_info_s*)media;
+
+ if (_media) {
+ *is_360 = _media->is_360;
+ ret = MEDIA_CONTENT_ERROR_NONE;
+ } else {
+ media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
+ }
+
+ return ret;
+}
+
int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
media_content_error("error when get info : [%d]", ret);
media_content_debug("is_drm : [%d]", b_value);
+ ret = media_info_is_360(media, &b_value);
+ if(ret != MEDIA_CONTENT_ERROR_NONE)
+ media_content_error("error when get info : [%d]", ret);
+ media_content_debug("is_360 : [%d]", b_value);
+
ret = media_info_set_weather(media, "Sunny");
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_content_error("Fail to set weather");