clGetParams(3dm) clGetParams(3dm) NAME clGetParams, clSetParams, clGetParam, clSetParam - get and set the value of the specified parameters. SYNOPSIS #include <dmedia/cl.h> int clGetParams(CLhandle handle, int *paramValueBuffer, int bufferLength) int clSetParams(CLhandle handle, int *paramValueBuffer, int bufferLength) int clGetParam(CLhandle handle, int paramID) int clSetParam(CLhandle handle, int paramID, int value) ARGUMENTS handle The handle to a compressor or decompressor. paramValueBuffer An array of ints containing parameter identifier/value pairs. The even elements of this array select the parameters to get or set. The odd elements are the current or new values of these parameters. bufferLength The number of ints in the buffer pointed to by paramValueBuffer. paramID An identifier of the parameter to get or set. value The new value of the parameter. DESCRIPTION clGetParams returns the current values for the parameters referenced in the paramValueBuffer array. The values are written into the odd locations of paramValueBuffer immediately after the corresponding parameter identifiers. clSetParams sets the values of the parameters referenced in the paramValueBuffer array. The even entries of paramValueBuffer should be filled with identifiers of parameters to be changed, and the odd entries with the revised values. Alternatively, clGetParam and clSetParam may be used to get and set single parameters. Descriptions of the general library parameters may be found in the CLintro(3dm) man page. Some parameters, such as CL_COMPRESSION_RATIO and CL_FRAME_RATE, are floating point values. To set a floating point value, use the macro CL_TypeIsInt, and to get one, use the macro CL_TypeIsFloat: float fnum; int inum; fnum = 3.0; clSetParam(handle, CL_COMPRESSION_RATIO, CL_TypeIsInt(fnum)); ... inum = clGetParam(handle, CL_COMPRESSION_RATIO); fnum = CL_TypeIsFloat(inum); RETURN VALUES clGetParams, clSetParams, and clSetParam return SUCCESS, or a negative error code on failure. clGetParam returns the current value of the parameter, or a negative error code on failure. EXAMPLE #include <dmedia/cl.h> ... /* Get the frames per chunk and preroll */ int paramValueBuffer[][2] = { CL_FRAMES_PER_CHUNK, 0, CL_PREROLL, 0 }; int framesPerChunk, preroll; clGetParams(handle, (int *)paramValueBuffer, sizeof(paramValueBuffer) / sizeof(int)); framesPerChunk = paramValueBuffer[0][1]; preroll = paramValueBuffer[1][1]; ... SEE ALSO CLintro(3dm), clQueryParams(3dm), clGetDefault(3dm), clGetMinMax(3dm), clGetName(3dm) Page 2