Tizen Native API  5.0
Media Information

The Media Information API provides functions to get information about media items stored on an internal and external storage.

Required Header

#include <media_content.h>

Overview

The Media Information API provides functions to get basic information e.g. path, date, type etc about media items (media_info_h) present in the device. Media Information (media_info_h) is a generalization of media content of any type (audio, image, video and others).

Received information about media items can be the processed using dedicated APIs:

API Description
Media Information Provides details about all items present in the device.
Provide functions to get information (e.g. title, size, mime type etc) about the files.
Audio Metadata Provides details about audio items present in the device.
Provide functions to get information (e.g. genre, album, year, bitrate etc) about the audio files.
Image Metadata Provides details about image items present in the device.
Provide functions to get information (e.g. longitude, description, date etc) about the image files.
Video Metadata Provides details about video items present in the device.
Provide functions to get information (e.g. title, duration, date etc) about the video files.


The media information API provides the following information. Regarding the information of each media type (audio, video, or image), please refer to the type-specific metadata page.

Attribute Filter Keyword Comments
media_id MEDIA_ID UUID
file_path MEDIA_PATH Full path of the file
display_name MEDIA_DISPLAY_NAME Base name of the file
media_type MEDIA_TYPE Type (media_content_type_e)
mime_type MEDIA_MIME_TYPE MIME type
size MEDIA_SIZE File size
added_time MEDIA_ADDED_TIME Added time to Media DB
modified_time MEDIA_MODIFIED_TIME Time of last modification
timeline MEDIA_TIMELINE Same as date taken time(for image) or recorded time(for Audio/Video) if exit. if not, same as modified time.
is_drm MEDIA_IS_DRM Whether DRM content or not
storage_id STORAGE_ID Storage UUID.
storage_type MEDIA_STORAGE_TYPE Storage type (media_content_storage_e)
favorite MEDIA_FAVOURITE User data. Not guarantee independence between applications.
provider MEDIA_PROVIDER User data. Not guarantee independence between applications.
category MEDIA_CATEGORY User data. Not guarantee independence between applications.
location_tag MEDIA_LOCATION_TAG User data. Not guarantee independence between applications.
age_rating MEDIA_AGE_RATING User data. Not guarantee independence between applications.
weather MEDIA_WEATHER User data. Not guarantee independence between applications.
played_count MEDIA_PLAYED_COUNT User data. Not guarantee independence between applications. (deprecated since 4.0)
played_time MEDIA_LAST_PLAYED_TIME User data. Not guarantee independence between applications. (deprecated since 4.0)
played_position MEDIA_LAST_PLAYED_POSITION User data. Not guarantee independence between applications. (deprecated since 4.0)
content_name MEDIA_CONTENT_NAME User data. Not guarantee independence between applications. (deprecated since 4.0)
keyword MEDIA_KEYWORD User data. Not guarantee independence between applications. (deprecated since 4.0)
thumbnail_path MEDIA_THUMBNAIL_PATH Thumbnail path(album art for Audio) if exist.
description MEDIA_DESCRIPTION Get from metadata if exist.


Video and Audio information can be further processed with respect to its properties i.e. playlist, album, using their respective APIs.

Foreach Operations

FOREACH CALLBACK DESCRIPTION
media_info_foreach_media_from_db() media_info_cb() Iterates through items
media_info_foreach_tag_from_db() media_tag_cb() Iterate through tags
media_info_foreach_bookmark_from_db() media_bookmark_cb() Iterate through bookmark

Functions

int media_info_insert_to_db (const char *path, media_info_h *info)
 Inserts the content file into the media database.
int media_info_insert_batch_to_db (const char **path_array, unsigned int array_length, media_insert_completed_cb callback, void *user_data)
 Inserts content files into the media database, asynchronously.
int media_info_insert_burst_shot_to_db (const char **path_array, unsigned int array_length, media_insert_burst_shot_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API
 Inserts the burst shot images into the media database, asynchronously.
int media_info_delete_from_db (const char *media_id) TIZEN_DEPRECATED_API
 Deletes the media information from the media database.
int media_info_delete_batch_from_db (filter_h filter) TIZEN_DEPRECATED_API
 Deletes media information that meets the conditions of the filter from the media database.
int media_info_destroy (media_info_h media)
 Destroys media info.
int media_info_clone (media_info_h *dst, media_info_h src)
 Clones the media info handle.
int media_info_get_media_count_from_db (filter_h filter, int *media_count)
 Gets the count of media info for the passed filter from the media database.
int media_info_foreach_media_from_db (filter_h filter, media_info_cb callback, void *user_data)
 Iterates through media info from the media database.
int media_info_get_tag_count_from_db (const char *media_id, filter_h filter, int *tag_count)
 Gets the count of media tags for the passed filter in the given media_id from the media database.
int media_info_foreach_tag_from_db (const char *media_id, filter_h filter, media_tag_cb callback, void *user_data)
 Iterates through the media tag in the given media info from the media database.
int media_info_get_bookmark_count_from_db (const char *media_id, filter_h filter, int *bookmark_count)
 Gets the number of bookmarks for the passed filter in the given media ID from the media database.
int media_info_foreach_bookmark_from_db (const char *media_id, filter_h filter, media_bookmark_cb callback, void *user_data)
 Iterates through the media bookmark in the given media info from the media database.
int media_info_get_face_count_from_db (const char *media_id, filter_h filter, int *face_count)
 Gets the number of face for the passed media_id from the media database.
int media_info_foreach_face_from_db (const char *media_id, filter_h filter, media_face_cb callback, void *user_data)
 Iterates through the media files with optional filter in the given media_id from the media database.
int media_info_get_image (media_info_h media, image_meta_h *image)
 Gets the image metadata handle for a given media info.
int media_info_get_video (media_info_h media, video_meta_h *video)
 Gets a video metadata handle for a given media info.
int media_info_get_audio (media_info_h media, audio_meta_h *audio)
 Gets an audio metadata handle for a given media info.
int media_info_get_media_id (media_info_h media, char **media_id)
 Gets the media ID.
int media_info_get_file_path (media_info_h media, char **path)
 Gets the full path of the content file.
int media_info_get_display_name (media_info_h media, char **name)
 Gets the file name including the extension of the content file.
int media_info_get_media_type (media_info_h media, media_content_type_e *type)
 Gets the content type of the content file.
int media_info_get_mime_type (media_info_h media, char **mime_type)
 Gets the MIME type of the content file.
int media_info_get_size (media_info_h media, unsigned long long *size)
 Gets the content file size.
int media_info_get_added_time (media_info_h media, time_t *added_time)
 Gets the added time of the content file.
int media_info_get_modified_time (media_info_h media, time_t *time)
 Gets the modified time of the content file.
int media_info_get_timeline (media_info_h media, time_t *time)
 Gets the timeline of content file.
int media_info_get_thumbnail_path (media_info_h media, char **path)
 Gets the thumbnail path of content file.
int media_info_get_description (media_info_h media, char **description)
 Gets the description of content file.
int media_info_get_longitude (media_info_h media, double *longitude)
 Gets the longitude of content file.
int media_info_get_latitude (media_info_h media, double *latitude)
 Gets the latitude of content file.
int media_info_get_altitude (media_info_h media, double *altitude)
 Gets the altitude of content file.
int media_info_get_weather (media_info_h media, char **weather) TIZEN_DEPRECATED_API
 Gets the weather of content file.
int media_info_get_rating (media_info_h media, int *rating)
 Gets the rating of content file.
int media_info_get_favorite (media_info_h media, bool *favorite)
 Gets the favorite status of content file which User set.
int media_info_get_author (media_info_h media, char **author) TIZEN_DEPRECATED_API
 Gets the author of content file.
int media_info_get_provider (media_info_h media, char **provider) TIZEN_DEPRECATED_API
 Gets the provider of content file which User set.
int media_info_get_content_name (media_info_h media, char **content_name) TIZEN_DEPRECATED_API
 Gets the content name of content file which User set.
int media_info_get_title (media_info_h media, char **title)
 Gets the title of content file.
int media_info_get_category (media_info_h media, char **category) TIZEN_DEPRECATED_API
 Gets the category of content file which User set.
int media_info_get_location_tag (media_info_h media, char **location_tag) TIZEN_DEPRECATED_API
 Gets the location tag of content file which User set.
int media_info_get_age_rating (media_info_h media, char **age_rating) TIZEN_DEPRECATED_API
 Gets the age_rating of content file which User set.
int media_info_get_keyword (media_info_h media, char **keyword) TIZEN_DEPRECATED_API
 Gets the keyword of content file which User set.
int media_info_get_storage_id (media_info_h media, char **storage_id) TIZEN_DEPRECATED_API
 Gets the storage id of content file.
int media_info_is_drm (media_info_h media, bool *is_drm)
 Checks whether the media is protected via DRM.
int media_info_is_360_content (media_info_h media, bool *is_360)
 Checks whether the content file is 360 content.
int media_info_get_storage_type (media_info_h media, media_content_storage_e *storage_type) TIZEN_DEPRECATED_API
 Gets the storage type of content file.
int media_info_get_played_count (media_info_h media, int *played_count) TIZEN_DEPRECATED_API
 Gets number which represents how many times given content has been played.
int media_info_get_played_time (media_info_h media, time_t *played_time) TIZEN_DEPRECATED_API
 Gets the content's played time parameter.
int media_info_get_media_from_db (const char *media_id, media_info_h *media)
 Gets the media info from the media database.
int media_info_increase_played_count (media_info_h media) TIZEN_DEPRECATED_API
 Increments the played count to content meta handle.
int media_info_set_played_time (media_info_h media) TIZEN_DEPRECATED_API
 Sets the played time to content meta handle.
int media_info_set_display_name (media_info_h media, const char *display_name) TIZEN_DEPRECATED_API
 Sets the file name including the extension of the content file.
int media_info_set_description (media_info_h media, const char *description) TIZEN_DEPRECATED_API
 Sets the description of media info.
int media_info_set_longitude (media_info_h media, double longitude) TIZEN_DEPRECATED_API
 Sets the longitude of media info.
int media_info_set_latitude (media_info_h media, double latitude) TIZEN_DEPRECATED_API
 Sets the latitude of media info.
int media_info_set_altitude (media_info_h media, double altitude) TIZEN_DEPRECATED_API
 Sets the altitude of media info.
int media_info_set_weather (media_info_h media, const char *weather) TIZEN_DEPRECATED_API
 Sets the weather of media info.
int media_info_set_rating (media_info_h media, int rating) TIZEN_DEPRECATED_API
 Sets the rating of media info.
int media_info_set_favorite (media_info_h media, bool favorite)
 Sets the favorite of media info.
int media_info_set_author (media_info_h media, const char *author) TIZEN_DEPRECATED_API
 Sets the author of media info.
int media_info_set_provider (media_info_h media, const char *provider) TIZEN_DEPRECATED_API
 Sets the provider of media info.
int media_info_set_content_name (media_info_h media, const char *content_name) TIZEN_DEPRECATED_API
 Sets the content name of media info.
int media_info_set_category (media_info_h media, const char *category) TIZEN_DEPRECATED_API
 Sets the category of media info.
int media_info_set_location_tag (media_info_h media, const char *location_tag) TIZEN_DEPRECATED_API
 Sets the location tag of media info.
int media_info_set_age_rating (media_info_h media, const char *age_rating) TIZEN_DEPRECATED_API
 Sets the age rating of media info.
int media_info_set_keyword (media_info_h media, const char *keyword) TIZEN_DEPRECATED_API
 Sets the keyword of media info.
int media_info_update_to_db (media_info_h media)
 Updates the media info to the media database.
int media_info_refresh_metadata_to_db (const char *media_id) TIZEN_DEPRECATED_API
 Refreshes the media metadata to the media database.
int media_info_set_added_time (media_info_h media, time_t added_time) TIZEN_DEPRECATED_API
 Sets the added time of media info.
int media_info_move_to_db (media_info_h media, const char *dst_path)
 Moves the media info to the given destination path in the media database.
int media_info_create_thumbnail (media_info_h media, media_thumbnail_completed_cb callback, void *user_data) TIZEN_DEPRECATED_API
 Creates a thumbnail file for the given media, asynchronously.
int media_info_cancel_thumbnail (media_info_h media) TIZEN_DEPRECATED_API
 Cancels the creation of thumbnail file for the given media.
int media_info_generate_thumbnail (media_info_h media)
 Generates a thumbnail file for the given media, synchronously.
int media_info_create (const char *path, media_info_h *media) TIZEN_DEPRECATED_API
 Creates the media info handle.
int media_info_insert_to_db_with_data (media_info_h media) TIZEN_DEPRECATED_API
 Inserts media info to database with media info data.
int media_info_set_title (media_info_h media, const char *title) TIZEN_DEPRECATED_API
 Sets the title of media info handle.
int media_info_set_album (media_info_h media, const char *album) TIZEN_DEPRECATED_API
 Sets the album of media info handle.
int media_info_set_artist (media_info_h media, const char *artist) TIZEN_DEPRECATED_API
 Sets the artist of media info handle.
int media_info_set_genre (media_info_h media, const char *genre) TIZEN_DEPRECATED_API
 Sets the genre of media info handle.
int media_info_set_recorded_date (media_info_h media, const char *recorded_date) TIZEN_DEPRECATED_API
 Sets the recorded date of media info handle.

Typedefs

typedef struct media_info_s * media_info_h
 The structure type for the Media info handle.
typedef bool(* media_info_cb )(media_info_h media, void *user_data)
 Called for every available media info.
typedef void(* media_insert_completed_cb )(media_content_error_e error, void *user_data)
 Called when media items are inserted completely.
typedef void(* media_insert_burst_shot_completed_cb )(media_content_error_e error, void *user_data)
 Called when the burst shot is inserted completely.
typedef void(* media_thumbnail_completed_cb )(media_content_error_e error, const char *path, void *user_data)
 Called when creating a thumbnail image.

Typedef Documentation

typedef bool(* media_info_cb)(media_info_h media, void *user_data)

Called for every available media info.

Iterates over a list of media info.

Since :
2.3
Remarks:
To use the media outside this function, copy the handle with media_info_clone() function.
The callback is called in the main loop.
Parameters:
[in]mediaThe handle to the media info
[in]user_dataThe 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_tag_foreach_media_from_db(), media_playlist_foreach_media_from_db(), media_genre_foreach_media_from_db(), media_info_foreach_media_from_db(), media_folder_foreach_media_from_db() will invoke this function.
See also:
media_info_clone()
media_album_foreach_media_from_db()
media_playlist_foreach_media_from_db()
media_tag_foreach_media_from_db()
media_info_foreach_media_from_db()
media_folder_foreach_media_from_db()
typedef struct media_info_s* media_info_h

The structure type for the Media info handle.

Since :
2.3
typedef void(* media_insert_burst_shot_completed_cb)(media_content_error_e error, void *user_data)

Called when the burst shot is inserted completely.

Deprecated:
Deprecated since 4.0.

The following error codes can be received:
MEDIA_CONTENT_ERROR_NONE : Success
MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter
MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation
MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory
MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy
MEDIA_CONTENT_ERROR_NETWORK : Network fail

Since :
2.3
Remarks:
The callback is called in a separate thread(not in the main loop).
Parameters:
[in]errorThe error code
[in]user_dataThe user data passed from the foreach function
Precondition:
media_info_insert_burst_shot_to_db()
See also:
media_info_insert_burst_shot_to_db()
typedef void(* media_insert_completed_cb)(media_content_error_e error, void *user_data)

Called when media items are inserted completely.

The following error codes can be received:
MEDIA_CONTENT_ERROR_NONE : Success
MEDIA_CONTENT_ERROR_INVALID_PARAMETER : Invalid parameter
MEDIA_CONTENT_ERROR_INVALID_OPERATION : Invalid operation
MEDIA_CONTENT_ERROR_PERMISSION_DENIED : Permission denied
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY : Out of memory
MEDIA_CONTENT_ERROR_DB_FAILED : DB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSY : DB Operation busy
MEDIA_CONTENT_ERROR_NETWORK : Network fail
MEDIA_CONTENT_ERROR_NOT_SUPPORTED : Not supported

Since :
2.3
Remarks:
The callback is called in a separate thread(not in the main loop).
Parameters:
[in]errorThe error code
[in]user_dataThe user data passed from the foreach function
Precondition:
media_info_insert_batch_to_db()
See also:
media_info_insert_batch_to_db()
typedef void(* media_thumbnail_completed_cb)(media_content_error_e error, const char *path, void *user_data)

Called when creating a thumbnail image.

Deprecated:
Deprecated since 5.0.

This callback is called for completion of generating the thumbnail image. The following error codes can be delivered.
MEDIA_CONTENT_ERROR_NONE,
MEDIA_CONTENT_ERROR_INVALID_PARAMETER,
MEDIA_CONTENT_ERROR_INVALID_OPERATION,
MEDIA_CONTENT_ERROR_PERMISSION_DENIED,
MEDIA_CONTENT_ERROR_DB_FAILED,
MEDIA_CONTENT_ERROR_UNSUPPORTED_CONTENT

Since :
2.3
Remarks:
The callback is called in a separate thread(not in the main loop).
Parameters:
[in]errorThe error code
[in]pathThe path of the thumbnail which is generated
[in]user_dataThe user data passed from the foreach function
Precondition:
media_info_create_thumbnail()
See also:
media_info_create_thumbnail()

Enumeration Type Documentation

Enumeration for orientation types.

Since :
2.3
Enumerator:
MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE 

Not available

MEDIA_CONTENT_ORIENTATION_NORMAL 

Normal

MEDIA_CONTENT_ORIENTATION_HFLIP 

Flip horizontal

MEDIA_CONTENT_ORIENTATION_ROT_180 

Rotate 180 degrees

MEDIA_CONTENT_ORIENTATION_VFLIP 

Flip vertical

MEDIA_CONTENT_ORIENTATION_TRANSPOSE 

Transpose

MEDIA_CONTENT_ORIENTATION_ROT_90 

Rotate 90 degrees

MEDIA_CONTENT_ORIENTATION_TRANSVERSE 

Transverse

MEDIA_CONTENT_ORIENTATION_ROT_270 

Rotate 270 degrees


Function Documentation

Cancels the creation of thumbnail file for the given media.

Deprecated:
Deprecated since 5.0.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Remarks:
If you request cancel for the already thumbnail created media, this function return MEDIA_CONTENT_ERROR_INVALID_OPERATION
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
int media_info_clone ( media_info_h dst,
media_info_h  src 
)

Clones the media info handle.

This function copies the media info handle from a source to the destination. There is no media_info_create() function. The media_info_h is created internally and available through media info foreach function such as media_info_foreach_media_from_db() or media_info_insert_to_db(). To use this handle outside of these foreach functions, use this function.

Since :
2.3
Remarks:
The dst should be released using media_info_destroy().
Parameters:
[out]dstThe destination handle to the media info
[in]srcThe source handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
media_info_destroy()
media_album_foreach_media_from_db()
media_playlist_foreach_media_from_db()
media_group_foreach_media_from_db()
media_tag_foreach_media_from_db()
media_info_foreach_media_from_db()
media_info_insert_to_db()
media_folder_foreach_media_from_db()
int media_info_create ( const char *  path,
media_info_h media 
)

Creates the media info handle.

Deprecated:
Deprecated since 4.0. Use media_info_insert_to_db() instead.

If the information about the file that is already known, you can use this function to generate empty handler.

Since :
3.0
Privilege:
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
The media should be released using media_info_destroy().
If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you must add all privilege.
Parameters:
[in]pathThe path to create the media info handle
[out]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB operation failed
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_info_destroy()
int media_info_create_thumbnail ( media_info_h  media,
media_thumbnail_completed_cb  callback,
void *  user_data 
)

Creates a thumbnail file for the given media, asynchronously.

Deprecated:
Deprecated since 5.0. Use media_info_generate_thumbnail() instead.

This function creates an thumbnail file for given media item and calls callback for completion of creating the thumbnail. If a thumbnail already exists for the given media, then the path of thumbnail will be returned in callback function.
Since 3.0, a thumbnail is not automatically extracted during media scanning.
Therefore, if there exists no thumbnail for the given media, you MUST call this function to create a thumbnail.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
If you want to destroy media handle before callback invoked, you must cancel thumbnail request by using media_info_cancel_thumbnail()
Since 3.0, if creation of a thumbnail is failed, empty string will be passed through media_thumbnail_completed_cb(). Items in external storage except MMC not supported.
Parameters:
[in]mediaThe handle to the media info
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()

Deletes media information that meets the conditions of the filter from the media database.

Deprecated:
Deprecated since 4.0.

This function can delete multiple media information from the media database.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Parameters:
[in]filterThe handle to the media filter
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_delete_from_db ( const char *  media_id)

Deletes the media information from the media database.

Deprecated:
Deprecated since 5.0. Use media_content_scan_file() instead.

This function only remove media information in the media database.
You can use media_content_scan_file()/media_content_scan_folder() function instead of this function if a file is removed from the file system.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Parameters:
[in]media_idThe media ID. It can get from media info handle.
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_content_scan_file()
media_content_scan_folder()

Destroys media info.

The function frees all resources related to the media info handle. This handle can no longer be used to perform any operations. New media info handle has to be created before the next usage.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Get copy of media_info handle by calling media_info_clone().
See also:
media_info_clone()
int media_info_foreach_bookmark_from_db ( const char *  media_id,
filter_h  filter,
media_bookmark_cb  callback,
void *  user_data 
)

Iterates through the media bookmark in the given media info from the media database.

This function gets all media bookmarks associated with the given media and calls callback for every retrieved media bookmark. If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
Postcondition:
This function invokes media_bookmark_cb().
See also:
media_content_connect()
media_bookmark_cb()
media_filter_create()
int media_info_foreach_face_from_db ( const char *  media_id,
filter_h  filter,
media_face_cb  callback,
void *  user_data 
)

Iterates through the media files with optional filter in the given media_id from the media database.

This function gets all media face info associated with the given media id and meeting desired filter option and calls callback for every retrieved media face info. If NULL is passed to the filter, no filtering is applied.

Since :
3.0
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value.
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_foreach_media_from_db ( filter_h  filter,
media_info_cb  callback,
void *  user_data 
)

Iterates through media info from the media database.

This function gets all media info handles meeting the given filter. The callback function will be invoked for every retrieved media info. If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Remarks:
Do not call updating DB function like media_info_update_to_db(), media_info_refresh_metadata_to_db(), audio_meta_update_to_db(), image_meta_update_to_db() and video_meta_update_to_db() in your callback function, your callback function is invoked as inline function. So, your callback function is in read state in SQLite. When you are in read state, sometimes you do not update DB. We do not recommend you call updating DB function in callback of foreach function.
Parameters:
[in]filterThe handle to the media filter
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
Postcondition:
This function invokes media_info_cb().
See also:
media_content_connect()
media_info_cb
media_filter_create()
int media_info_foreach_tag_from_db ( const char *  media_id,
filter_h  filter,
media_tag_cb  callback,
void *  user_data 
)

Iterates through the media tag in the given media info from the media database.

This function gets all the media tags associated with the given media_id and calls callback for every retrieved media tag.
If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
Postcondition:
This function invokes media_tag_cb().
See also:
media_content_connect()
media_tag_cb
media_filter_create()

Generates a thumbnail file for the given media, synchronously.

Since :
5.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Remarks:
http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.
http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.
Items in external storage are not supported, with the exception of MMC.
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_info_get_thumbnail_path()
int media_info_get_added_time ( media_info_h  media,
time_t *  added_time 
)

Gets the added time of the content file.

The added time refers to the time that content file was first added to media database.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]added_timeThe added time to the media database
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_age_rating ( media_info_h  media,
char **  age_rating 
)

Gets the age_rating of content file which User set.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The age_rating should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]age_ratingThe age rating of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_altitude ( media_info_h  media,
double *  altitude 
)

Gets the altitude of content file.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]altitudeThe altitude of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_audio ( media_info_h  media,
audio_meta_h audio 
)

Gets an audio metadata handle for a given media info.

This function returns an audio metadata handle retrieved from the media info handle.

Since :
2.3
Remarks:
The audio should be released using audio_meta_destroy().
Parameters:
[in]mediaThe handle to the media info
[out]audioThe handle to the audio metadata
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
audio_meta_destroy()
int media_info_get_author ( media_info_h  media,
char **  author 
)

Gets the author of content file.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The author should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]authorThe author of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_bookmark_count_from_db ( const char *  media_id,
filter_h  filter,
int *  bookmark_count 
)

Gets the number of bookmarks for the passed filter in the given media ID from the media database.

If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[out]bookmark_countThe count of the media tag
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_get_category ( media_info_h  media,
char **  category 
)

Gets the category of content file which User set.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The category should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]categoryThe category of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_content_name ( media_info_h  media,
char **  content_name 
)

Gets the content name of content file which User set.

Deprecated:
Deprecated since 4.0. Redundant, use media_info_get_display_name() instead.
Since :
2.3
Remarks:
The content_name should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]content_nameThe content name of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_description ( media_info_h  media,
char **  description 
)

Gets the description of content file.

If the value is an empty string, the method returns "Unknown".
Since 3.0, if the media info has no description, the method returns empty string.

Since :
2.3
Remarks:
The description should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]descriptionThe description of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_display_name ( media_info_h  media,
char **  name 
)

Gets the file name including the extension of the content file.

Since :
2.3
Remarks:
The name should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]nameThe file name including the extension of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_face_count_from_db ( const char *  media_id,
filter_h  filter,
int *  face_count 
)

Gets the number of face for the passed media_id from the media database.

If NULL is passed to the filter, then no filtering is applied.

Since :
3.0
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[out]face_countThe count of media face
Returns:
0 on success, otherwise a negative error value.
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB operation failed
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_get_favorite ( media_info_h  media,
bool *  favorite 
)

Gets the favorite status of content file which User set.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]favoritetrue if content file is set as favorite, otherwise false if content file is not set as favorite
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
media_info_set_favorite()
int media_info_get_file_path ( media_info_h  media,
char **  path 
)

Gets the full path of the content file.

Since :
2.3
Remarks:
The path should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]pathThe full path of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_image ( media_info_h  media,
image_meta_h image 
)

Gets the image metadata handle for a given media info.

This function returns an image metadata handle retrieved from the media info.

Since :
2.3
Remarks:
The image should be released using image_meta_destroy().
Parameters:
[in]mediaThe handle to the media info
[out]imageThe handle to the image metadata
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
image_meta_destroy()
int media_info_get_keyword ( media_info_h  media,
char **  keyword 
)

Gets the keyword of content file which User set.

Deprecated:
Deprecated since 4.0. Use media_tag_insert_to_db() instead.
Since :
2.3
Remarks:
The keyword should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]keywordThe keyword of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_latitude ( media_info_h  media,
double *  latitude 
)

Gets the latitude of content file.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]latitudeThe latitude of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_location_tag ( media_info_h  media,
char **  location_tag 
)

Gets the location tag of content file which User set.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The location_tag should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]location_tagThe location of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_longitude ( media_info_h  media,
double *  longitude 
)

Gets the longitude of content file.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]longitudeThe longitude of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_media_count_from_db ( filter_h  filter,
int *  media_count 
)

Gets the count of media info for the passed filter from the media database.

If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Parameters:
[in]filterThe handle to the media filter
[out]media_countThe count of media
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_get_media_from_db ( const char *  media_id,
media_info_h media 
)

Gets the media info from the media database.

This function creates a new media handle from the media database by the given media_id. Media info will be created and filled with information.

Since :
2.3
Remarks:
The media should be released using media_info_destroy().
Parameters:
[in]media_idThe media ID
[out]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_info_destroy()
int media_info_get_media_id ( media_info_h  media,
char **  media_id 
)

Gets the media ID.

Since :
2.3
Remarks:
The media_id should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]media_idThe media ID
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter

Gets the content type of the content file.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]typeThe content type of the content file (media_content_type_e)
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
media_content_type_e
int media_info_get_mime_type ( media_info_h  media,
char **  mime_type 
)

Gets the MIME type of the content file.

Since :
2.3
Remarks:
The mime_type should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]mime_typeThe MIME type of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_modified_time ( media_info_h  media,
time_t *  time 
)

Gets the modified time of the content file.

The modified time refers to the last modification time provided by the file system.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]timeThe last modification time of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_played_count ( media_info_h  media,
int *  played_count 
)

Gets number which represents how many times given content has been played.

Deprecated:
Deprecated since 4.0.
This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.
Since :
2.4
Parameters:
[in]mediaThe handle to the media info
[out]played_countThe counter of content played
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_played_time ( media_info_h  media,
time_t *  played_time 
)

Gets the content's played time parameter.

Deprecated:
Deprecated since 4.0.
This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.

Function returns content's elapsed playback time parameter as period starting from the beginning of the track.

Since :
2.4
Parameters:
[in]mediaThe handle to the media info
[out]played_timeThe elapsed time of the content
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_provider ( media_info_h  media,
char **  provider 
)

Gets the provider of content file which User set.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The provider should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]providerThe provider of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_rating ( media_info_h  media,
int *  rating 
)

Gets the rating of content file.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]ratingThe rating of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_size ( media_info_h  media,
unsigned long long *  size 
)

Gets the content file size.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]sizeThe content file size
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_storage_id ( media_info_h  media,
char **  storage_id 
)

Gets the storage id of content file.

Deprecated:
Deprecated since 5.0.
Since :
2.4
Remarks:
The storage_id should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]storage_idThe ID of the media storage
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter

Gets the storage type of content file.

Deprecated:
Deprecated since 5.0. Use storage_get_type_dev() instead.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]storage_typeThe storage type of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_tag_count_from_db ( const char *  media_id,
filter_h  filter,
int *  tag_count 
)

Gets the count of media tags for the passed filter in the given media_id from the media database.

If NULL is passed to the filter, then no filtering is applied.

Since :
2.3
Parameters:
[in]media_idThe media ID
[in]filterThe handle to the media filter
[out]tag_countThe count of the media tag
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_filter_create()
int media_info_get_thumbnail_path ( media_info_h  media,
char **  path 
)

Gets the thumbnail path of content file.

Since :
2.3
Remarks:
The path should be released using free().
If the thumbnail extraction for the given media has not been requested yet, this function returns NULL.
To create a thumbnail, you should use media_info_generate_thumbnail() function.
This function returns an empty string if media_info_generate_thumbnail() has failed to create a thumbnail for the given media.
Parameters:
[in]mediaThe handle to the media info
[out]pathThe thumbnail path
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_timeline ( media_info_h  media,
time_t *  time 
)

Gets the timeline of content file.

If the content file has the creation time information (like Content recorded date or Image creation date), that value is timeline.
Otherwise, timeline value is the same as modified time.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]timeThe timeline of content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_title ( media_info_h  media,
char **  title 
)

Gets the title of content file.

If the content file does not have a title, this method returns the filename without the extension.

Since :
2.3
Remarks:
The title should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]titleThe title of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_get_video ( media_info_h  media,
video_meta_h video 
)

Gets a video metadata handle for a given media info.

This function returns a video metadata handle retrieved from the media info handle.

Since :
2.3
Remarks:
The video should be released using video_meta_destroy().
Parameters:
[in]mediaThe handle to the media info
[out]videoThe handle to the video metadata
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
See also:
video_meta_destroy()
int media_info_get_weather ( media_info_h  media,
char **  weather 
)

Gets the weather of content file.

Deprecated:
Deprecated since 4.0.
Since :
2.3
Remarks:
The weather should be released using free().
Parameters:
[in]mediaThe handle to the media info
[out]weatherThe weather of the content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter

Increments the played count to content meta handle.

Deprecated:
Deprecated since 4.0.
This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application.

You can increase the played(opened) count of the content file.

Since :
2.4
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_insert_batch_to_db ( const char **  path_array,
unsigned int  array_length,
media_insert_completed_cb  callback,
void *  user_data 
)

Inserts content files into the media database, asynchronously.

This function can insert multiple content files into the media database.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path.
If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you must add all privilege.
Since 4.0, This function does not allow a symbolic link.
Since 4.0, this function is related to the following feature:
http://tizen.org/feature/content.scanning.others
If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
Parameters:
[in]path_arrayThe path array of the content files to add
[in]array_lengthThe length of the array
[in]callbackThe callback function to be invoked when media items inserted completely
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTENT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_insert_completed_cb()
int media_info_insert_burst_shot_to_db ( const char **  path_array,
unsigned int  array_length,
media_insert_burst_shot_completed_cb  callback,
void *  user_data 
)

Inserts the burst shot images into the media database, asynchronously.

Deprecated:
Deprecated since 4.0.

This function inserts burst images into the media database. media_insert_burst_shot_completed_cb() will be called when insertion to media database is finished.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path.
If you want to access only internal storage with this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage with this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you must add all privilege.
Since 4.0, This function does not allow a symbolic link.
Parameters:
[in]path_arrayThe path array of the burst shot images to add
[in]array_lengthThe length of the array
[in]callbackThe callback function to be invoked when the images are inserted completely
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_insert_burst_shot_completed_cb()
int media_info_insert_to_db ( const char *  path,
media_info_h info 
)

Inserts the content file into the media database.

In general, you can use this function to insert content files into the media database.
You can use media_content_scan_file()/media_content_scan_folder() function instead of this function.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
The info should be released using media_info_destroy().
You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path.
If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you must add all privilege.
Since 4.0, This function does not allow a symbolic link.
Since 4.0, this function is related to the following feature:
http://tizen.org/feature/content.scanning.others
If this feature is not supported on the device, MEDIA_CONTENT_TYPE_OTHERS type file is not scanned.
Parameters:
[in]pathThe path of the content file to add
[out]infoThe handle of the inserted content file
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_CONTENT_ERROR_NOT_SUPPORTEDNot supported
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_content_scan_file()
media_content_scan_folder()

Inserts media info to database with media info data.

Deprecated:
Deprecated since 4.0. Use media_info_insert_to_db() instead.
Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Remarks:
The media should be released using media_info_destroy().
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_DB_FAILEDDB operation failed
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
int media_info_is_360_content ( media_info_h  media,
bool *  is_360 
)

Checks whether the content file is 360 content.

Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[out]is_360true if media is 360 content, otherwise false if media is not 360 content
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_is_drm ( media_info_h  media,
bool *  is_drm 
)

Checks whether the media is protected via DRM.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[out]is_drmtrue if media is DRM media, otherwise false if media is not DRM media
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_move_to_db ( media_info_h  media,
const char *  dst_path 
)

Moves the media info to the given destination path in the media database.

After moving or renaming a file in the filesystem, call this function to update the database.
If the source path and destination path are the same, then this function does nothing. If you want to refresh media information, you should use media_content_scan_file() function.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path.
If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you should add all privilege.
Since 4.0, this function does not allow symbolic links.
This function does not support USB storage before 5.0. Since 5.0, USB storage is supported.
Since 5.0, the thumbnail is removed if it exists.
Parameters:
[in]mediaThe handle to the media info
[in]dst_pathThe path of destination
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter (Especially, if the request is duplicated, this error returns.)
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_content_scan_folder()
media_info_generate_thumbnail()
int media_info_refresh_metadata_to_db ( const char *  media_id)

Refreshes the media metadata to the media database.

Deprecated:
Deprecated since 4.0. Use media_content_scan_file() instead.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
http://tizen.org/privilege/mediastorage
http://tizen.org/privilege/externalstorage
Remarks:
You must add privilege http://tizen.org/privilege/content.write. And You add more privilege depending on your choice of contents path.
If you want to access only internal storage by using this function, you should add privilege http://tizen.org/privilege/mediastorage.
Or if you want to access only external storage by using this function, you should add privilege http://tizen.org/privilege/externalstorage.
If you can access both storage, you should add all privilege.
Parameters:
[in]media_idThe media ID
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
int media_info_set_added_time ( media_info_h  media,
time_t  added_time 
)

Sets the added time of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]added_timeThe added time of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_age_rating ( media_info_h  media,
const char *  age_rating 
)

Sets the age rating of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]age_ratingThe age rating of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_album ( media_info_h  media,
const char *  album 
)

Sets the album of media info handle.

Deprecated:
Deprecated since 4.0.
Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[in]albumThe album of the media
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_altitude ( media_info_h  media,
double  altitude 
)

Sets the altitude of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]altitudeThe altitude of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().
int media_info_set_artist ( media_info_h  media,
const char *  artist 
)

Sets the artist of media info handle.

Deprecated:
Deprecated since 4.0.
Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[in]artistThe artist of media info handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_author ( media_info_h  media,
const char *  author 
)

Sets the author of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]authorThe author of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_category ( media_info_h  media,
const char *  category 
)

Sets the category of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]categoryThe category of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_content_name ( media_info_h  media,
const char *  content_name 
)

Sets the content name of media info.

Deprecated:
Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]content_nameThe content name of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_description ( media_info_h  media,
const char *  description 
)

Sets the description of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]descriptionThe description of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().
int media_info_set_display_name ( media_info_h  media,
const char *  display_name 
)

Sets the file name including the extension of the content file.

Deprecated:
Deprecated since 4.0. Redundant, use media_info_move_to_db() instead.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]display_nameThe file name including the extension of the content file.
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().
int media_info_set_favorite ( media_info_h  media,
bool  favorite 
)

Sets the favorite of media info.

This function can mark favorite of the media. If set to true, this function record the time of the change moment.
So, If you use it in order parameter, you can sort the order of the time was a favorite.
Or, if you use it in condition parameter, you can get the result of the favorite media.

Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]favoriteSet true to set the media info as favorite, otherwise set false to not set the media info as favorite
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_genre ( media_info_h  media,
const char *  genre 
)

Sets the genre of media info handle.

Deprecated:
Deprecated since 4.0.
Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[in]genreThe genre of media info handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_keyword ( media_info_h  media,
const char *  keyword 
)

Sets the keyword of media info.

Deprecated:
Deprecated since 4.0. Use media_tag_insert_to_db() instead.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]keywordThe keyword of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_latitude ( media_info_h  media,
double  latitude 
)

Sets the latitude of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]latitudeThe latitude of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().
int media_info_set_location_tag ( media_info_h  media,
const char *  location_tag 
)

Sets the location tag of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]location_tagThe location of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_longitude ( media_info_h  media,
double  longitude 
)

Sets the longitude of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]longitudeThe longitude of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().

Sets the played time to content meta handle.

Deprecated:
Deprecated since 4.0.
This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application.

You can set the latest played(opened) time of the content file. the latest played time to be set the current time on the system.

Since :
2.4
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db()
int media_info_set_provider ( media_info_h  media,
const char *  provider 
)

Sets the provider of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]providerThe provider of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_rating ( media_info_h  media,
int  rating 
)

Sets the rating of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]ratingThe rating of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().
int media_info_set_recorded_date ( media_info_h  media,
const char *  recorded_date 
)

Sets the recorded date of media info handle.

Deprecated:
Deprecated since 4.0.
Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[in]recorded_dateThe recorded date of media info handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_title ( media_info_h  media,
const char *  title 
)

Sets the title of media info handle.

Deprecated:
Deprecated since 4.0.
Since :
3.0
Parameters:
[in]mediaThe handle to the media info
[in]titleThe title of media info handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
int media_info_set_weather ( media_info_h  media,
const char *  weather 
)

Sets the weather of media info.

Deprecated:
Deprecated since 4.0. This data cannot be saved to the file.
Since :
2.3
Parameters:
[in]mediaThe handle to the media info
[in]weatherThe weather of the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
media_info_update_to_db().

Updates the media info to the media database.

The function updates the given media info in the media database.

Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/content.write
Remarks:
The function should be called after any change in media, to be updated to the media database. For example, after using media_info_set_favorite() for setting the name of the media, the media_info_update_to_db() function should be called so as to update the given media info attributes in the media database.
Parameters:
[in]mediaThe handle to the media info
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTENT_ERROR_NONESuccessful
MEDIA_CONTENT_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTENT_ERROR_OUT_OF_MEMORYOut of memory
MEDIA_CONTENT_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_CONTENT_ERROR_DB_FAILEDDB Operation failed
MEDIA_CONTENT_ERROR_DB_BUSYDB Operation busy
MEDIA_CONTENT_ERROR_NETWORKNetwork fail
MEDIA_CONTENT_ERROR_PERMISSION_DENIEDPermission denied
Precondition:
This function requires opened connection to content service by media_content_connect().
See also:
media_content_connect()
media_info_set_favorite()