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)

Since:

BlackBerry 10.2.0

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 a value of 0 to determine the number of supported values.

numsupported

A pointer to an int value that is updated with the the number of supported video encoder parameters.

values

A pointer to an int array. The array is updated with the values supported for the queried parameter. Ensure that you allocate an array with the same number of elements as the numasked argument. If the maxmin flag returns true, then the first value returned in the values array is the maximum supported value for the parameter, and the second value returned is the minimum supported value for the parameter.

maxmin

A pointer to a bool value which will be set to true if the values returned should be interpreted as a maximum and a minimum value, or set to false if the values only describe the discrete encoder parameter values supported.

Library:

libcamapi (For the qcc command, use the -l camapi option to link against this library)

Description:

Use this function to determine whether a specific video encoder parameter is supported and to determine the acceptable values for each supported 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. When the function is invoked in this presizing mode, the maximum array size required is returned in the numsupported argument. You can then allocate an array of the appropriate size and invoke the function again with the numasked argument set to the value returned previously in the numsupported argument.

The values that you retrieve using this function can be written to the given parameter using the camera_set_videoencoder_parameter() function.

Returns:

CAMERA_EOK when the function successfully completes, otherwise another camera_error_t value that provides the reason that the call failed. CAMERA_EOPNOTSUPP is returned when a given parameter is not supported for one of these reasons:
  • 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 parmeter that previously was not supported may now become supported (or vice-versa).

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus