camera_set_vf_property()

Configure one or more settings of the viewfinder

Synopsis:

#include <camera/camera_api.h>
#define camera_set_vf_property(handle,
                               args...)

Arguments:

handle
The handle returned by a call to the camera_open() function.
args
A series of comma-delimited property-value pairs where each value must be a pointer to a variable of the expected type.

Library:

libcamapi

Description:

This function configures the viewfinder settings. Ensure that you call this function before you start using the viewfinder.

Note:

Other than the following three exceptions, all properties listed above require write permissions; if you try to change them while in read-only mode, the call fails.

You can change the following three properties in read-only mode because they are tracked per user and not per camera:

To set write permissions for the viewfinder properties when you call the camera_open() function, use a pertinent camera access mode flag: CAMERA_MODE_RW (read-and-write) or CAMERA_MODE_RO (read-only), depending on the property.

Note:

The compiler performs no type-checking. Therefore, the value you provide for each property must match the expected data type. Mismatches can cause undefined behavior and application crashes.

You can specify multiple property-value pairs by delimiting them with a comma as follows:
camera_set_vf_property( camera_handle,
                        CAMERA_IMGPROP_WIN_GROUPID, "mygroup",
                        CAMERA_IMGPROP_WIN_ID, "vfwindow",
                        CAMERA_IMGPROP_WIDTH, 720,
                        CAMERA_IMGPROP_HEIGHT, 1280,
                        CAMERA_IMGPROP_ROTATION, 270,
                        CAMERA_IMGPROP_FRAMERATE, (double)15.0 );
Note:
The following properties can't be changed while the viewfinder is running:
When the viewfinder is running, CAMERA_IMGPROP_WIN_GROUPID can only be changed if the current value is an empty string.

Returns:

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

Page updated: