home *** CD-ROM | disk | FTP | other *** search
Wrap
ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE clGetParams, clSetParams, clGetParam, clSetParam - get and set the value of the specified parameters. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>> iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh)))) iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh)))) iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD)))) iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt vvvvaaaalllluuuueeee)))) AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS _h_a_n_d_l_e The handle to a compressor or decompressor. _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r 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. _b_u_f_f_e_r_L_e_n_g_t_h The number of ints in the buffer pointed to by _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r. _p_a_r_a_m_I_D An identifier of the parameter to get or set. _v_a_l_u_e The new value of the parameter. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss returns the current values for the parameters referenced in the _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r array. The values are written into the odd locations of _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r immediately after the corresponding parameter identifiers. ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss sets the values of the parameters referenced in the _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r array. The even entries of _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r should be filled with identifiers of parameters to be changed, and the odd entries with the revised values. Alternatively, ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm 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 CCCCLLLL____TTTTyyyyppppeeeeIIIIssssIIIInnnntttt, and to get one, use the macro CCCCLLLL____TTTTyyyyppppeeeeIIIIssssFFFFllllooooaaaatttt: PPPPaaaaggggeeee 1111 ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) 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); RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss, ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss, and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm return SUCCESS, or a negative error code on failure. ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm returns the current value of the parameter, or a negative error code on failure. EEEEXXXXAAAAMMMMPPPPLLLLEEEE #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]; ... SSSSEEEEEEEE AAAALLLLSSSSOOOO CLintro(3dm), clQueryParams(3dm), clGetDefault(3dm), clGetMinMax(3dm), clGetName(3dm) PPPPaaaaggggeeee 2222