camera_get_videoencoder_parameter()

Updated: April 19, 2023

Retrieve the current values of video encoder parameters

Synopsis:

#include <camera/camera_encoder.h>
#define camera_get_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 where each value must be a pointer to a variable of the expected type.

Library:

libcamapi

Description:

Use this function to retrieve the current values of video encoder parameters. The parameters that you can query 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 that is configured. For example, for H.264/AVC, use constants from the camera_h264avc_parameters_t enumerated type for the parameters along with pointers to the expected types for the values (e.g., int, double), as shown here:
 camera_get_videoencoder_parameter( camera_handle,
     CAMERA_H264AVC_BITRATE, &bitrate,
     CAMERA_H264AVC_ENTROPYCODING, &entropy_coding,
     CAMERA_H264AVC_SLICETYPE, &slice_type,
     CAMERA_H264AVC_SLICESIZE, &slice_size );

Returns:

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