clAddParam(3dm) clAddParam(3dm)
clAddParam, clSetDefault, clSetMin, clSetMax, clSetMinMax, clSetRange -
Add a video or audio compression parameter to the Compression Library
#include <dmedia/cl.h>
int clAddParam(int scheme, char *name, int paramType,
int min, int max, int initial, int *paramIDPtr)
int clSetDefault(int scheme, int paramID, int initial)
int clSetMin(int scheme, int paramID, int min)
int clSetMax(int scheme, int paramID, int max)
int clSetMinMax(int scheme, int paramID, int min, int max)
int clSetRange(int scheme, int paramID, int min, int max, int initial)
scheme The compression scheme that gets the added parameter.
name A pointer to a string that contains the name of the parameter.
paramType The type of the parameter (CL_ENUM_VALUE, CL_RANGE_VALUE,
CL_FLOATING_ENUM_VALUE, or CL_FLOATING_RANGE_VALUE).
min The minimum value the parameter can have.
max The maximum value the parameter can have.
initial The default value of the parameter.
paramIDPtr
A pointer to an int value that is to receive the new parameter
identifier.
paramID The parameter identifier.
New codecs introduced with clAddAlgorithm may also have custom parameters
added with clAddParam. Once added, these parameters are accessible by
applications using standard API calls such as clGetParams and
clSetParams.
clSetDefault, clSetMin, clSetMax, clSetMinMax, and clSetRange may be used
to configure a new parameter after it is added.
clAddParam, clSetMinMax, and clSetRange return SUCCESS, or a negative
error code on failure. clSetDefault, clSetMin, and clSetMax return the
previous default, min, and max values, respectively, or negative error
codes on failure.
Page 1
clAddParam(3dm) clAddParam(3dm)
#include <dmedia/cl.h>
int newScheme;
int newParamID;
...
/* Add a new algorithm */
clAddAlgorithm("New Algorithm", CL_ALG_VIDEO,
NEW_ALGORITHM_MAX_HEADER_SIZE,
OpenNewCompressor, CompressNew, CloseNewCompressor,
OpenNewDecompressor, DecompressNew, CloseNewDecompressor,
ReadNewHeader, QueryNewScheme, QueryNewLicense,
GetNewParams, SetNewParams,
&newScheme);
/* Add a new parameter */
clAddParam(newScheme, "New Parameter", CL_RANGE_VALUE, 0, 100, 75,
&newParamID);
...
/* Compress a series of frames */
clOpenCompressor(newScheme, &handle);
clSetParam(handle, newParamID, 55);
...
CLintro(3dm), clAddAlgorithm(3dm), clSetUnique(3dm), clGetUnique(3dm),
clFetchParam(3dm), clStoreParam(3dm), clError(3dm), clGetDefault(3dm),
clGetMinMax(3dm)
PPPPaaaaggggeeee 2222 [ Back ]
|