camera_set_video_property()
Configure the output properties for video.
Synopsis:
#include <camera/camera_api.h>
camera_error_t camera_set_video_property(camera_handle_t handle, args...)
Arguments:
- handle
-
The handle returned by a call to the camera_open() function.
- args...
-
Property-value pairs delimited by a comma. The property name and property value must also be delimited by a comma.
Library:
libcamapiDescription:
Ensure that you call this function before you start the viewfinder in video mode is necessary to configure the hardware correctly.
As part of the args argument, you can provide one or more property-value pairs using camera_imgprop_t values as the name of the property and the correct type for the value such as an int or double value. The following camera_imgprop_t can be used with this function:
- CAMERA_IMGPROP_WIDTH
- CAMERA_IMGPROP_HEIGHT
- CAMERA_IMGPROP_FRAMERATE
- CAMERA_IMGPROP_ROTATION
- CAMERA_IMGPROP_KEYFRAMEINTERVAL
- CAMERA_IMGPROP_BITRATE
- CAMERA_IMGPROP_SLICESIZE
- CAMERA_IMGPROP_STABILIZATION
- CAMERA_IMGPROP_VIDEOCODEC
- CAMERA_IMGPROP_AUDIOCODEC
You can specify multiple property-value pairs by delimiting them with a comma as follows:
name1, &value1, name2, &value2,...
For example, you can set the values in the following manner:
camera_set_video_property( camera_handle, CAMERA_IMGPROP_WIDTH, 1024, CAMERA_IMGPROP_HEIGHT, 576, CAMERA_IMGPROP_ROTATION, 90 CAMERA_IMGPROP_FRAMERATE, (double)30.0);On platforms that do not provide independent video and viewfinder image streams, the CAMERA_IMGPROP_WIDTH , CAMERA_IMGPROP_HEIGHT and CAMERA_IMGPROP_ROTATION properties should match values supplied to the camera_set_videovf_property() function. The viewfinder frame rate (the value used for the CAMERA_IMGPROP_FRAMERATE property in the camera_set_videovf_property() function) must be a multiple of the video frame rate used in this function.
You should determine whether the CAMERA_FEATURE_PREVIEWISVIDEO property is declared using the camera_has_feature() function before configuring the video output properties.
Returns:
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.