camera_register_resource()

Register with the camera resource management component to let the operating system know that your application may be processing buffers.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_register_resource(camera_handle_t handle)

Since:

BlackBerry 10.0.0

Arguments:

handle

The handle returned by a call to the camera_open() function.

Library:

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

Description:

Please see Camera resource management for important details about the resource management procedure.

You should use this function if any of your application code directly accesses camera buffers, otherwise you risk encountering memory access errors if buffers are unmapped while you are referencing them (e.g., saving to disk, image processing, etc.)

You can call the camera_register_resource() function more than once if you wish to perform cleanup on multiple threads, but you must call the camera_deregister_resource() function the same number of times when cleaning up.

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