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)

Arguments:

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

Library:

libcamapi

Description:

For more infomration about the resource management procedure, see "Resource management" in the Camera Library Developer's Guide.

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.)

Note:

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.