camera_set_videoencoder_parameter()
Configure video encoder parameters
Synopsis:
#include <camera/camera_encoder.h>#define camera_set_videoencoder_parameter(handle,
args...)Arguments:
- handle
- The handle returned by a call to the camera_open() function.
- args
- A series of comma-delimited parameter-value pairs.
Library:
libcamapiDescription:
Use this function to configure the video encoder before you start to encode or record video. The parameters that you can configure depend on the codec you selected using camera_set_video_property().
For the args argument, you can provide one or more parameter-value pairs using the parameter constants defined by the following enumerated types:
Parameters and values are delimited using commas, and so are multiple parameter-value pairs.
The parameter names that you choose depend on the video codec you want to use. For example, for H.264/AVC, use constants from the camera_h264avc_parameters_t enumerated type for the parameters along with the expected types for the values (e.g.,
int, double), as shown here: camera_set_videoencoder_parameter( camera_handle, CAMERA_H264AVC_BITRATE, 1000000, CAMERA_H264AVC_KEYFRAMEINTERVAL, 60, CAMERA_H264AVC_RATECONTROL, CAMERA_H264AVC_RATECONTROL_CBR, CAMERA_H264AVC_PROFILE, CAMERA_H264AVC_PROFILE_HIGH, CAMERA_H264AVC_LEVEL, CAMERA_H264AVC_LEVEL_4 );Then, to encode or record video, call the camera_start_video() or the camera_start_encode() function.
Returns:
CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed.
Page updated:
