mme_metadata_image_load()

Load an image for a file

Synopsis:

#include <mme/mme.h>


int mme_metadata_image_load( mme_metadata_session_t *session,
                             uint64_t mdinfo_rid,
                             unsigned image_id,
                             int image_format_profile,
                             uint64_t *mdimage_rid,
                             mme_metadata_image_url_t **image_url );

Arguments:

session
A pointer to a metadata session structure.
mdinfo_rid
A metadata information request ID, obtained by a call to a mme_metadata_getinfo_*() function.
image_id
The ID of the image, obtained from the track metadata .
image_format_profile
Predefined profile format index. Set to -1 for no conversion.
mdimage_rid
A pointer to a generated metadata image request ID, populated on success.
image_url
A pointer to the location with the requested image. See image_url pointer below.

Library:

mme

Description:

The function mme_metadata_image_load() uses information retrieved by a call to any of the mme_metadata_getinfo_*() functions to load an image to the location specified by the URL referenced by image_url. You must call mme_metadata_create_session() to create a metadata session before using mme_metadata_getinfo_current().


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.

image_url pointer

The image_url argument points to a pointer to a mme_metadata_image_url_t metadata structure with the retrieved URL for the requested image. Depending on the value of image_url, mme_metadata_image_load() operates either synchonously or asynchronously.

NULL pointer

If image_url is NULL, mme_metadata_getinfo_current() operates asynchronously, and the mme_metadata_info_t structure is delivered with the MME_EVENT_METADATA_INFO event.

non-NULL pointer

If image_url is non-NULL function mme_metadata_image_load() operates synchronously and the following applies:

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

Events

MME_EVENT_METADATA_IMAGE.

Blocking and validation

See image_url pointer above.

Returns:

0
Success: mdimage_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_current(), mme_metadata_getinfo_file(), mme_metadata_getinfo_library(), mme_metadata_image_cache_clear(), mme_metadata_image_unload(), mme_metadata_image_url_t, mme_metadata_info_t, mme_metadata_session_t