mme_metadata_getinfo_current()

Get metadata for the currently playing track

Synopsis:

#include <mme/mme.h>

int mme_metadata_getinfo_current( mme_metadata_session_t *session,
                                  const char *metadata_groups,
                                  uint64_t *mdinfo_rid,
                                  mme_metadata_info_t **metadata );

Arguments:

session
A pointer to a metadata session structure.
metadata_groups
A pointer to a string representing the metadata information groups for which metadata is requested.
mdinfo_rid
A pointer to a generated metadata information request ID.
metadata
A pointer to the location with the requested metadata. See metadata pointer below.

Library:

mme

Description:

The function mme_metadata_getinfo_current() retrieves metadata for the currently playing track and places it at the location specified by metadata. You must call mme_metadata_create_session() to create a metadata session before using mme_metadata_getinfo_current().

There is no guarantee that the current track will not change between the time mme_metadata_getcurrent() is called and the return of the requested data. The client application must therefore monitor track change events, and make a new request for metadata if the track changes.


Note:
  • Metadata and images retrieved with this function are only valid for the current metadata session.
  • A call to an mme_metadata_getinfo_*() function switches the metadata session context to the newly requested file, thus causing any requests for image IDs from previous image data to fail.
  • After an mme_metadata_getinfo_*() function has been called, any further calls to an mme_metadata_getinfo_*() function before receipt of a MME_EVENT_METADATA_INFO event will return an EBUSY error.

metadata pointer

The metadata argument points to a pointer to a mme_metadata_info_t metadata structure with the retrieved metadata. Depending on the value of metadata, mme_metadata_getinfo_*() operates either synchonously or asynchronously.

NULL pointer

If metadata is NULL, mme_metadata_getinfo_*() operates asynchronously, and the mme_metadata_info_t structure is delivered with the MME_EVENT_METADATA_INFO event.

non-NULL pointer

If metadata is non-NULL function mme_metadata_getinfo_*() operates synchronously and the following applies:

For an example of the XML delivered in the mme_metadata_info_t structure, see XML content with the description of the structure.

Events

MME_EVENT_METADATA_INFO.

Blocking and validation

See metadata pointer above.

Returns:

0
Success: mdinfo_rid is set.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_metadata_create_session(), mme_metadata_free_session(), mme_metadata_getinfo_file(), mme_metadata_getinfo_library(), mme_metadata_image_cache_clear(), mme_metadata_image_load(), mme_metadata_image_unload(), mme_metadata_image_url_t, mme_metadata_info_t, mme_metadata_session_t