camera_open()

Request a handle to access a logical camera unit.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_open(camera_unit_t unit,                 
                           uint32_t mode,                 
                           camera_handle_t *handle)

Since:

BlackBerry 10.0.0

Arguments:

unit

The logical camera unit to open.

mode

The access mode of the camera, which is comprised of the camapi_camera_modeflags flags ORed together.

handle

A pointer to the returned camera handle if access is granted.

Library:

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

Description:

If the camera is available, a handle for exclusive access to the camera unit is returned. You must pass in a camera_handle_t value to store the handle. You must also have access permissions to use the camera.

This function call may block for several seconds if another application already has the camera open.

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