mm_player_get_extended_metadata()

Get extended metadata associated with a media node.

Synopsis:

#include <mmplayer/mmplayerclient.h>
 
int mm_player_get_extended_metadata( 
                             mmplayer_hdl_t *hdl,
                             const int media_source_id,
                             const char *media_node_id,
                             char *const keyv[],
                             char *valuev[] )

Arguments:

hdl
The mm-player connection handle
media_source_id
The media source ID
media_node_id
The media node ID
keyv
Array listing the metadata fields to retrieve
valuev
Array storing the values read from the requested metadata fields

Library:

mmplayerclient

Description:

Get extended metadata associated with the media node identified by media_node_id and located on the media source identified by media_source_id. Here, extended metadata refers to nonstandard metadata values that aren't returned by mm_player_get_metadata(), such as the URL of a media node.

The mm_player_get_extended_metadata() function retrieves values for the fields listed in keyv and populates valuev with references to the strings that store those values. The library allocates the memory for the strings, but the caller must provide sufficient memory in valuev for storing the references. The last member of keyv must be a NULL pointer. The size of keyv and valuev must be the same.

The default mm-player configuration defines two different views for reading extended metadata from a media source. You can see which view is configured for a given media source by:

If the view_name value is "synced", you can retrieve the folder_type and url extended metadata fields (by listing them in keyv). If view_name is "live", you can retrieve only the url field.

The media node can be either a folder or a leaf node. However, folder_type applies only to folder nodes and url applies only to leaf nodes.

Returns:

0 on success, -1 on failure