camera_get_supported_videoencoder_parameter_values()
Retrieve the supported values of a video encoder parameter
Synopsis:
#include <camera/camera_encoder.h>camera_error_t camera_get_supported_videoencoder_parameter_values(camera_handle_t handle,
int parameter,
int numasked,
int *numsupported,
int *values,
bool *maxmin)Arguments:
- handle
- The handle returned by a call to the camera_open() function.
- parameter
- The parameter that you want to query supported values for. The enumerated type that you select your parameter from must correspond with the currently configured video codec. For example, if you are using the H.264/AVC video codec, you can query parameters from the camera_h264avc_parameters_t enumerated type.
- numasked
- The requested number of values to return in the values array. You can specify 0 for this argument to determine the number of supported values.
- numsupported
- A pointer to an
intvalue that is updated with the number of supported video encoder parameters. - values
- A pointer to an
intarray that is updated with the values supported for the queried parameter. Ensure that you allocate an array with numasked elements. If the maxmin flag returnstrue, then the first and second values returned in this array are the maximum and minimum supported values for the parameter. - maxmin
- A pointer to a
boolvalue that will be set totrueif the values returned describe a maximum and a minimum value, or tofalseif the values describe the discrete parameter values supported.
Library:
libcamapiDescription:
Use this function to determine whether a specific video encoder parameter is supported and if so, the acceptable values for that parameter.
Ensure that the values argument points to an array which has at least numasked elements allocated. To determine an appropriate size for this array, you can invoke this function in presizing mode by setting the numasked argument to 0 or the values argument to NULL. The function then returns, in the numsupported argument, the maximum array size required. You can then allocate an array of this size and invoke the function again with numasked set to that previous numsupported value.
The values that you retrieve using this function can be written to the given parameter using the camera_set_videoencoder_parameter() function.
Returns:
- The current value of another parameter has made parameter invalid.
- The queried parameter is not supported by the platform. It is important to recognize that if you change the value of one parameter, a parameter that previously was not supported may now become supported, or vice-versa.
