The Media Bookmark Information API provides functions to manage bookmark information on the media items.
Required Header
#include <media_content.h>
Overview
A Bookmark allows you to mark interesting moment in a media(video and audio) to enable fast searching. The Bookmark Information API provides functions to get information about bookmarks associated with video and audio items.
API allows to:
- get and filter existing bookmarks
- insert new bookmarks
- delete bookmarks
For inserting a bookmark to media item, call media_bookmark_insert_to_db() function and for deleting already set bookmark from a media, call media_bookmark_delete_from_db() function. For retrieving time where the bookmark is placed on the media, call media_bookmark_get_marked_time() function.
Foreach Operations
Define Documentation
Typedef Documentation
Called for every bookmark in the obtained list of bookmarks.
Iterates over a bookmark list.
- Parameters:
-
[in] | bookmark | The handle to the video bookmark |
[in] | user_data | The user data passed from the foreach function |
- Returns:
true
to continue with the next iteration of the loop, otherwise false
to break out of the loop
- Precondition:
- media_info_foreach_bookmark_from_db() will invoke this function.
- See also:
- media_info_foreach_bookmark_from_db()
Function Documentation
Clones a media bookmark.
This function copies the media bookmark handle from a source to destination. There is no media_bookmark_create() function. The media_bookmark_h is created internally and available through media bookmark foreach function such as media_info_foreach_bookmark_from_db(). To use this handle outside of these foreach functions, use this function.
- Since :
- 2.3.1
- Parameters:
-
[out] | dst | The destination handle to media bookmark |
[in] | src | The source handle to media bookmark |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- See also:
- media_bookmark_destroy()
-
media_info_foreach_bookmark_from_db()
Removes a media bookmark from the media database.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/content.write
- Parameters:
-
[in] | bookmark_id | The ID of media bookmark |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
-
media_bookmark_insert_to_db()
Destroys a media bookmark.
This function frees all the resources related to the bookmark handle. This handle no longer can be used to perform any operation. A new handle has to be created before the next use.
- Since :
- 2.3.1
- Parameters:
-
[in] | bookmark | The handle to media bookmark |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- Get copy of bookmark handle by calling media_bookmark_clone().
- See also:
- media_bookmark_clone()
Gets the number of bookmarks with an optional filter from the media database.
- Since :
- 2.3.1
- Parameters:
-
[in] | filter | The handle to the media filter |
[out] | bookmark_count | The count of the media bookmark |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
Gets the bookmark ID.
- Since :
- 2.3.1
- Parameters:
-
[in] | bookmark | The handle to media bookmark |
[out] | bookmark_id | The media bookmark ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the bookmark time marked parameter.
This function returns time offset in milliseconds from beginning of the movie on which bookmark was placed.
- Since :
- 2.3.1
- Parameters:
-
[in] | bookmark | The handle to media bookmark |
[out] | marked_time | The bookmark time offset (in milliseconds) |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the media bookmark thumbnail.
- Since :
- 2.3.1
- Parameters:
-
[in] | bookmark | The handle to media bookmark |
[out] | path | The thumbnail path of media bookmark |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Inserts a new bookmark in media on the specified time offset to the media database.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/content.write
- Parameters:
-
[in] | media_id | The media ID |
[in] | time | The bookmark time offset (in seconds) |
[in] | thumbnail_path | The thumbnail path of video bookmark\ n If the media type is audio, then thumbnail is null. |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
-
media_bookmark_delete_from_db()