* @post media_info_insert_to_db_with_data()
*/
int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
+
/**
* @deprecated Deprecated since 4.0.
* @brief Sets the genre of media info handle.
*/
int media_bookmark_get_thumbnail_path(media_bookmark_h bookmark, char **path);
+/**
+ * @brief Gets the media bookmark name which user set.
+ * @since_tizen 4.0
+ *
+ * @remarks You must release @a name using free().
+ *
+ * @param[in] bookmark The handle to media bookmark
+ * @param[out] name The name of media bookmark. If name was not set, empty string is returned.
+ * If User set bookmark name to NULL, name will be empty string also.
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ */
+int media_bookmark_get_name(media_bookmark_h bookmark, char **name);
+
+/**
+ * @brief Sets the media bookmark name.
+ * @since_tizen 4.0
+ *
+ * @param[in] bookmark The handle to media bookmark
+ * @param[in] name The name of media bookmark. Can be NULL, empty or non-empty string.
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @post media_bookmark_update_to_db()
+ */
+int media_bookmark_set_name(media_bookmark_h bookmark, const char *name);
+
+/**
+ * @brief Updates bookmark information to the media database.
+ * @details The function updates the given bookmark meta in the media database. \n
+ * The function should be called after any change in bookmark attributes, to be updated to the media database. \n
+ * For example, after using media_bookmark_set_name() for setting the name of the bookmark, \n
+ * the media_bookmark_update_to_db() function should be called so as to update the given bookmark attributes in the media database.
+ * @since_tizen 4.0
+ *
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/content.write
+ *
+ * @remarks Do not call this function in callback function of foreach function like media_info_foreach_bookmark_from_db().
+ * @param[in] bookmark The handle to media bookmark
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #MEDIA_CONTENT_ERROR_NONE Successful
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed
+ * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy
+ * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail
+ * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied when Application has no privilege
+ *
+ * @pre This function requires opened connection to content service by media_content_connect().
+ *
+ * @see media_content_connect()
+ * @see media_bookmark_set_name()
+ */
+int media_bookmark_update_to_db(media_bookmark_h bookmark);
/**
* @}
MEDIA_CONTENT_STORAGE_INTERNAL = 0, /**< The device's internal storage */
MEDIA_CONTENT_STORAGE_EXTERNAL = 1, /**< The device's external storage like sd card*/
MEDIA_CONTENT_STORAGE_EXTERNAL_USB = 2, /**< The external USB storage (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
- MEDIA_CONTENT_STORAGE_CLOUD = 100, /**< The Cloud storage (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
+ MEDIA_CONTENT_STORAGE_CLOUD = 100, /**< The Cloud storage (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, Deprecated since 4.0) */
} media_content_storage_e;
/**
* @ingroup CAPI_MEDIA_CONTENT_MODULE
* @brief Called when the media scanning is finished.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks The callback is called in a separate thread(not in the main loop).
*
* @param[in] error The error code
* @param[in] user_data The user data passed from the foreach function
* @brief Called when the notification of the media DB change is subscribed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
+ * @remarks The callback is called in a separate thread(not in the main loop).
+ *
* @param[in] error The error code
* @param[in] pid The PID which publishes notification
* @param[in] update_item The update item of notification
*
* @details Iterates over a list of media info.
*
- * @remarks To use the @a media outside this function, copy the handle with media_info_clone() function.
+ * @remarks To use the @a media outside this function, copy the handle with media_info_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] media The handle to the media info
* @param[in] user_data The user data passed from the foreach function
* @brief Called when media items are inserted completely.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
+ * @remarks The callback is called in a separate thread(not in the main loop).
+ *
* @param[in] media The handle to the media info
* @param[in] user_data The user data passed from the foreach function
*
* @brief Called when the burst shot is inserted completely.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
+ * @remarks The callback is called in a separate thread(not in the main loop).
+ *
* @param[in] media The handle to the media info
* @param[in] user_data The user data passed from the foreach function
*
* #MEDIA_CONTENT_ERROR_DB_FAILED, \n
* #MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT
*
+ * @remarks The callback is called in a separate thread(not in the main loop).
+ *
* @param[in] error The error code
* @param[in] path The path of the thumbnail which is generated
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a list of folders.
*
- * @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function.
+ * @remarks To use the @a folder outside this function, copy the handle with the media_folder_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] folder The handle to the media folder
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a playlist list.
*
- * @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function.
+ * @remarks To use the @a playlist outside this function, copy the handle with the media_playlist_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] playlist The handle to the media playlist
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over playlist members.
*
- * @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function.
+ * @remarks To use the @a media outside this function, copy the handle with the media_info_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] playlist_member_id The ID to member of the playlist
* @param[in] media The handle to the media info
*
* @details Iterates over a list of tags.
*
- * @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function.
+ * @remarks To use the @a tag outside this function, copy the handle with the media_tag_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] tag The handle to the media tag
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a bookmark list.
*
- * @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function.
+ * @remarks To use the @a bookmark outside this function, copy the handle with the media_bookmark_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] bookmark The handle to the video bookmark
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over an album list.
*
- * @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function.
+ * @remarks To use the @a album outside this function, copy the handle with the media_album_clone() function. \n
+ * The callback is called in the main loop.
*
* @param[in] album The handle to the media album
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a media group list.
*
- * @remarks You should not free @a group_name returned by this function.
+ * @remarks You should not free @a group_name returned by this function. \n
+ * The callback is called in the main loop.
*
* @param[in] group_name The name of the media group
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a media storage list.
*
- * @remarks You should not destroy @a storage returned by this function.
+ * @remarks You should not destroy @a storage returned by this function. \n
+ * The callback is called in the main loop.
*
* @param[in] storage The handle of the media storage
* @param[in] user_data The user data passed from the foreach function
*
* @details Iterates over a media face list.
*
- * @remarks You should not destroy @a face returned by this function.
+ * @remarks You should not destroy @a face returned by this function. \n
+ * The callback is called in the main loop.
*
* @param[in] face The handle of the media face
* @param[in] user_data The user data passed from the foreach function
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
*/
-#define MEDIA_SIZE "MEDIA_SIZE" /**< Media MIME size */
+#define MEDIA_SIZE "MEDIA_SIZE" /**< Media file size */
/**
* @brief You can use above define to set the condition of media filter and order keyword.
*/
#define BOOKMARK_MARKED_TIME "BOOKMARK_MARKED_TIME" /**< Bookmark marked time */
+/**
+ * @brief You can use above define to set the condition of bookmark filter and order keyword.
+ * @since_tizen 4.0
+ */
+#define BOOKMARK_NAME "BOOKMARK_NAME" /**< Bookmark name */
+
/**
* @}
*/
#define MEDIA_STORAGE_PATH "STORAGE_PATH" /**< Storage path */
/**
+ * @}
+ */
+
+/**
+ * @addtogroup CAPI_CONTENT_MEDIA_FACE_MODULE
+ * @{
* @brief You can use above define to set the condition of face filter and order keyword.
* @since_tizen 3.0
*/
* @details This function can mark favorite of the media. If set to @c true, this fuction record the time of the change moment. \n
* So, If you use it in order parameter, you can sort the order of the time was a favorite. \n
* Or, if you use it in condition parameter, you can get the result of the favorite media.
+ *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] media The media info handle
int media_info_cancel_face_detection(media_info_h media);
/**
+* @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
* @brief Creates the media info handle.
* @details If the information about the file that is already known, you can use this API to generate empty handler.
* And you can add the information to the generated handler using media_info_set_XXX() API.
* @see media_info_insert_to_db_with_data()
* @see media_info_destroy()
*/
-int media_info_create(const char *path, media_info_h *media);
+int media_info_create(const char *path, media_info_h *media) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0. Use media_info_insert_to_db() instead.
* @brief Inserts media info to database with media info data.
* @details After filling the information to the generated handler using media_info_create() API, you can insert into database using this API.
* @since_tizen 3.0
*
* @see media_info_create()
*/
-int media_info_insert_to_db_with_data(media_info_h media);
+int media_info_insert_to_db_with_data(media_info_h media) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0.
* @brief Sets the title of media info handle.
* @since_tizen 3.0
*
*
* @post media_info_insert_to_db_with_data()
*/
-int media_info_set_title(media_info_h media, const char *title);
+int media_info_set_title(media_info_h media, const char *title) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0.
* @brief Sets the album of media info handle.
* @since_tizen 3.0
*
*
* @post media_info_insert_to_db_with_data()
*/
-int media_info_set_album(media_info_h media, const char *album);
+int media_info_set_album(media_info_h media, const char *album) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0.
* @brief Sets the artist of media info handle.
* @since_tizen 3.0
*
*
* @post media_info_insert_to_db_with_data()
*/
-int media_info_set_artist(media_info_h media, const char *artist);
+int media_info_set_artist(media_info_h media, const char *artist) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0.
* @brief Sets the genre of media info handle.
* @since_tizen 3.0
*
*
* @post media_info_insert_to_db_with_data()
*/
-int media_info_set_genre(media_info_h media, const char *genre);
+int media_info_set_genre(media_info_h media, const char *genre) TIZEN_DEPRECATED_API;
/**
+* @deprecated Deprecated since 4.0.
* @brief Sets the recorded date of media info handle.
* @since_tizen 3.0
*
*
* @post media_info_insert_to_db_with_data()
*/
-int media_info_set_recorded_date(media_info_h media, const char *recorded_date);
+int media_info_set_recorded_date(media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API;
/**
char *media_id;
time_t marked_time;
char *thumbnail_path;
+ char *name;
} media_bookmark_s;
typedef struct {
int width;
int height;
int played_count;
+ int rotation;
time_t played_time;
int played_position;
} video_meta_s;
/* DB field for bookmark */
#define DB_FIELD_BOOKMARK_ID "bookmark_id"
#define DB_FIELD_BOOKMARK_MARKED_TIME "marked_time"
+#define DB_FIELD_BOOKMARK_NAME "name"
/* DB field for album*/
#define DB_FIELD_ALBUM_ID "album_id"
#define UPDATE_PLAYLIST_ORDER_FROM_PLAYLIST_MAP "UPDATE "DB_TABLE_PLAYLIST_MAP" SET play_order=%d WHERE playlist_id=%d AND _id=%d;"
/* Bookmark */
-#define INSERT_BOOKMARK_TO_BOOKMARK "INSERT INTO "DB_TABLE_BOOKMARK" (media_uuid, marked_time, thumbnail_path) VALUES ('%q', '%d', %Q)"
+#define INSERT_BOOKMARK_TO_BOOKMARK "INSERT INTO "DB_TABLE_BOOKMARK" (media_uuid, marked_time, thumbnail_path, name) VALUES ('%q', '%d', %Q, %Q)"
#define SELECT_BOOKMARK_COUNT_BY_MEDIA_ID "SELECT COUNT(*) FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
-#define SELECT_BOOKMARK_LIST_BY_MEDIA_ID "SELECT b.bookmark_id, b.media_uuid, b.marked_time, b.thumbnail_path FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
+#define SELECT_BOOKMARK_LIST_BY_MEDIA_ID "SELECT b.bookmark_id, b.media_uuid, b.marked_time, b.thumbnail_path, b.name FROM "BOOKMARK_MEDIA_JOIN" AND b.media_uuid='%s'"
+#define UPDATE_BOOKMARK_FROM_BOOKMARK "UPDATE "DB_TABLE_BOOKMARK" SET name=%Q WHERE bookmark_id=%d;"
/* Update Meta*/
#define UPDATE_AV_META_FROM_MEDIA "UPDATE '%s' SET played_count=%d, last_played_time=%d, last_played_position=%d WHERE media_uuid='%q'"
*/
int video_meta_get_height(video_meta_h video, int *height);
+/**
+ * @brief Gets the rotation of the given video metadata.
+ * @since_tizen 4.0
+ *
+ * @param[in] video The video metadata handle
+ * @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360)
+ *
+ * @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 video_meta_get_rotation(video_meta_h video, int *rotation);
+
+
/**
* @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. [Use media_info_get_played_count() instead]
* @brief Gets the played count of the video.
Name: capi-content-media-content
Summary: A Media content library in Tizen Native API
-Version: 0.3.6
+Version: 0.3.7
Release: 0
Group: Multimedia/API
License: Apache-2.0