camera_set_device_orientation()

Notify the camera of the current device orientation.

Synopsis:

#include <camera/camera_api.h>
 
camera_error_t camera_set_device_orientation(camera_handle_t handle,                 
                                             uint32_t val)

Since:

BlackBerry 10.0.0

Arguments:

handle

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

val

The orientation angle value, such as 0, 90, 180, or 270. 0 represents the default orientation, 90 represents rotated to the right, and 180 degrees represents upside down based on the marking on the device.

Library:

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

Description:

Use this function to let the camera on the system know how the user is holding the device. This allows the camera to adjust internal settings, such as exposure weighting, face detection, or other orientation-dependent features to match the orientation of the device. If the CAMERA_IMGPROP_METAORIENTATIONHINT property is enabled for photo output, then the EXIF orientation hint will be computed using a combination of the orientation set using this function as well as the rotation angle indicated by CAMERA_IMGPROP_ROTATION.

You can specify values such as 0, 90, 180 or 270 degrees, where 0 degrees is the default orientation of the device (i.e., the BlackBerry logo is upright). It is the responsibility of an application to notify the camera when the device orientation changes.

This function has no effect on the output image rotations. It is simply used to inform the camera hardware that the orientation of the scene has changed in order to optimize internal algorithms, such as metering and face detection.

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