Configure the output properties for video recording and encoding.
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...
-
A series of comma-delimited property-value pairs.
Library:
libcamapi (For the qcc command, use the -l
camapi option to link against this library)
Description:
Ensure that you call this function before you start a
video encoding or recording.
For 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_STABILIZATION
- CAMERA_IMGPROP_VIDEOCODEC
- CAMERA_IMGPROP_AUDIOCODEC
- CAMERA_IMGPROP_FORMAT
CAMERA_IMGPROP_STABILIZATION may impact the
field-of-view of the viewfinder. You may want to apply this setting prior to starting
the viewfinder.
Note: There is no type-checking performed by the compiler,
therefore, you must ensure that the value you provide for each property matches the
expected data type. Data type mismatches can result in undefined behavior and may cause
your application to crash.
You can specify multiple property-value pairs by delimiting
them with a comma as follows: camera_set_video_property( camera_handle,
CAMERA_IMGPROP_WIDTH, 720,
CAMERA_IMGPROP_HEIGHT, 1280,
CAMERA_IMGPROP_ROTATION, 270,
CAMERA_IMGPROP_FRAMERATE, (double)30.0 );
Returns:
CAMERA_EOK when the function successfully completes,
otherwise another camera_error_t value
that provides the reason that the call failed.