| 
    Tizen Native API
    5.0
    
   
   | 
  
  
  
 
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 :
 - 5.0
 
- Remarks:
 - The dst should be released using 
mc_metadata_destroy(). 
- Parameters:
 - 
  
[in] src The source handle to the media controller metadata [out] dst The destination handle to the media controller metadata  
- Returns:
 0on success, otherwise a negative error value
- Return values:
 - 
  
MEDIA_CONTROLLER_ERROR_NONE Successful MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory  
- See also:
 - mc_metadata_destroy()
 
| int mc_metadata_destroy | ( | mc_metadata_h | metadata | ) | 
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 :
 - 5.0
 
- Parameters:
 - 
  
[in] metadata The handle to the media controller metadata  
- Returns:
 0on success, otherwise a negative error value
- Return values:
 - 
  
MEDIA_CONTROLLER_ERROR_NONE Successful MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter  
- See also:
 - mc_metadata_clone()
 
| int mc_metadata_get | ( | mc_metadata_h | metadata, | 
| mc_meta_e | attribute, | ||
| char ** | value | ||
| ) | 
Gets the metadata.
- Since :
 - 5.0
 
- Remarks:
 - The value should be released using free(). 
If the attribute value of the metadata is empty, return value is NULL. 
- Parameters:
 - 
  
[in] metadata The handle to metadata [in] attribute The key attribute name to get [out] value The value of the attribute  
- Returns:
 0on success, otherwise a negative error value
- Return values:
 - 
  
MEDIA_CONTROLLER_ERROR_NONE Successful MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER Invalid parameter MEDIA_CONTROLLER_ERROR_OUT_OF_MEMORY Out of memory  
- Precondition:
 - Sets mc_client_set_metadata_updated_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 inmc_playlist_foreach_item().