clQueryAlgorithms(3dm) clQueryAlgorithms(3dm) NAME clQueryAlgorithms, clQuerySchemeFromHandle, clQuerySchemeFromName, clGetAlgorithmName, clQueryLicense - Get a list of algorithms, find the identifier or name, or check for a license SYNOPSIS #include <dmedia/cl.h> int clQueryAlgorithms(int algType, int *buffer, int bufferLength) int clQuerySchemeFromHandle(CLhandle handle) int clQuerySchemeFromName(int algType, const char *name) char *clGetAlgorithmName(int scheme) int clQueryLicense(int scheme, int functionality, char **message) ARGUMENTS algType The algorithm type. Possible values are CL_ALG_VIDEO or CL_ALG_AUDIO. buffer An array of ints into which clQueryAlgorithms writes name/functionality pairs. bufferLength The number of ints in buffer. handle A handle to a compressor or decompressor. name The algorithm name. scheme The scheme identifier. functionality The functionality provided by the scheme. Possible values are CL_COMPRESSOR compression only CL_DECOMPRESSOR decompression only CL_CODEC compression and decompression message A pointer to a comment string returned by clQueryLicense. DESCRIPTION clQueryAlgorithms is used to determine the list of recognized algorithms. Name/functionality pairs are written into buffer up to the capacity bufferLength. The even entries receive the algorithm names, and the odd entries receive the functionalities. clQuerySchemeFromHandle and clQuerySchemeFromName are used to obtain the scheme identifier (e.g. CL_MVC1_SOFTWARE) from a handle or name. clGetAlgorithmName gives the name from the scheme identifier. clQueryLicense is called to check for the installation of a NetLS license for the specified scheme and functionality. RETURN VALUES clQueryAlgorithms returns the size of the buffer, in number of ints, needed to hold all of the algorithms of the requested type. (If bufferLength is smaller than this value, a partial list of algorithms is filled in.) On failure, a negative error code is returned. clQuerySchemeFromHandle and clQuerySchemeFromName return the compression scheme identifier, or a negative error code on failure. clGetAlgorithmName returns the string name, or NULL on failure. clQueryLicense returns SUCCESS if the license is installed or not needed, and returns a negative error code otherwise. EXAMPLE #include <dmedia/cl.h> int *buffer, bufferLength; CLhandle handle; char *name, *message; ... /* Find all the video algorithms */ bufferLength = clQueryAlgorithms(CL_ALG_VIDEO, NULL, 0); buffer = (int *) malloc(bufferLength * sizeof(int)); clQueryAlgorithms(CL_ALG_VIDEO, buffer, bufferLength); ... /* Other calls */ scheme = clQuerySchemeFromHandle(handle); scheme = clQuerySchemeFromName(CL_ALG_VIDEO, name); name = clGetAlgorithmName(scheme); clQueryLicense(CL_MULTIRATE_AWARE, CL_CODEC, &message); SEE ALSO CLintro(3dm), clAddAlgorithm(3dm), clQueryParameters(3dm) Page 2