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


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


BlackBerry 10.0.0



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


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


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.


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

Last modified: 2014-09-30

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

comments powered by Disqus