Tizen Native API  4.0
Media Controller Metadata

The Media Controller Metadata API provides functions for media metadata.

Required Header

#include <media_controller_metadata.h>

Overview

The Media Controller Metadata API allows you to get metadata (mc_metadata_get()).
You can copy the metadata by using mc_metadata_clone(). And if you don't use handle anymore, you have to destroy it(mc_metadata_destroy()).

Functions

int mc_metadata_clone (mc_metadata_h src, mc_metadata_h *dst)
 Clones a media controller metadata handle.
int mc_metadata_destroy (mc_metadata_h metadata)
 Destroys a media controller metadata handle.
int mc_metadata_get (mc_metadata_h metadata, mc_meta_e attribute, char **value)
 Gets the metadata.

Function Documentation

int mc_metadata_clone ( mc_metadata_h  src,
mc_metadata_h dst 
)

Clones a media controller metadata handle.

This function copies the media controller metadata handle from a source to destination. The mc_metadata_h is created internally and available through media controller metadata functions.

Since :
4.0
Remarks:
The dst should be released using mc_metadata_destroy().
Parameters:
[in]srcThe source handle to the media controller metadata
[out]dstThe destination handle to the media controller metadata
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
See also:
mc_metadata_destroy()

Destroys a media controller metadata handle.

This function frees all resources related to the media controller metadata handle. This handle no longer can be used to perform any operations. A new handle has to be created before next usage.

Since :
4.0
Parameters:
[in]metadataThe handle to the media controller metadata
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
mc_metadata_clone()
int mc_metadata_get ( mc_metadata_h  metadata,
mc_meta_e  attribute,
char **  value 
)

Gets the metadata.

Since :
4.0
Remarks:
The value should be released using free().
If the attribute value of the metadata is empty, return value is NULL.
Parameters:
[in]metadataThe handle to metadata
[in]attributeThe key attribute name to get
[out]valueThe value of the attribute
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_CONTROLLER_ERROR_NONESuccessful
MEDIA_CONTROLLER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORYOut of memory
Precondition:
Sets mc_client_set_metadata_update_cb() function to get the metadata if you are media controller client.
and also you can use this function when get the metadata when callback function invoked in mc_playlist_foreach_item().
See also:
mc_client_set_metadata_update_cb()
mc_playlist_foreach_item()