camera_meta_iterate_metadata()

Extract all metadata from a buffer for processing.

Synopsis:

int camera_meta_iterate_metadata(const camera_buffer_t *buffer,                 
                                 bool(*metadata_consumer)(const camera_metadata_t,                 
                                 camera_metaformat_t,                 
                                 void *),                 
                                 void *arg)

Since:

BlackBerry 10.0.0

Arguments:

buffer

A pointer to the buffer from which to extract metadata.

metadata_consumer

A pointer to the user-defined consumer function that is invoked for each piece of metadata that is extracted.

arg

A user-defined argument that is passed to the metadata_consumer function each time it is invoked.

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

This function extracts all metadata associated with the provided buffer and passes it one piece at a time to a user-defined consumer function for further processing.

The user-defined metadata consumer function must have the following signature:
          bool metadata_consumer(const camera_metadata_t metadata,
                                 camera_metaformat_t format,
                                 void* arg);
  • metadata: The piece of metadata extracted.
  • format: The type of the metadata extracted.
  • arg: The user-specified argument in the arg argument of the camera_meta_iterate_metadata() function.

The metadata consumer function returns a bool value to indicate whether the iterator loop should continue. When the provided consumer function returns true, metadata processing will continue. Metadata processing stops when the consumer function returns false.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus