home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / old-compression / clGetParams.z / clGetParams
Encoding:
Text File  |  2002-10-03  |  6.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      clGetParams, clSetParams, clGetParam, clSetParam - get and set the value
  10.      of the specified parameters.
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>>
  14.  
  15.      iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  16.          iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  17.      iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,,
  18.          iiiinnnntttt ****ppppaaaarrrraaaammmmVVVVaaaalllluuuueeeeBBBBuuuuffffffffeeeerrrr,,,, iiiinnnntttt bbbbuuuuffffffffeeeerrrrLLLLeeeennnnggggtttthhhh))))
  19.  
  20.      iiiinnnntttt ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD))))
  21.      iiiinnnntttt ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm((((CCCCLLLLhhhhaaaannnnddddlllleeee hhhhaaaannnnddddlllleeee,,,, iiiinnnntttt ppppaaaarrrraaaammmmIIIIDDDD,,,, iiiinnnntttt vvvvaaaalllluuuueeee))))
  22.  
  23. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  24.      _h_a_n_d_l_e         The handle to a compressor or decompressor.
  25.  
  26.      _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r
  27.                     An array of ints containing parameter identifier/value
  28.                     pairs.  The even elements of this array select the
  29.                     parameters to get or set.  The odd elements are the
  30.                     current or new values of these parameters.
  31.  
  32.      _b_u_f_f_e_r_L_e_n_g_t_h   The number of ints in the buffer pointed to by
  33.                     _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r.
  34.  
  35.      _p_a_r_a_m_I_D        An identifier of the parameter to get or set.
  36.  
  37.      _v_a_l_u_e          The new value of the parameter.
  38.  
  39. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  40.      ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss returns the current values for the parameters referenced in
  41.      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
  42.      locations of _p_a_r_a_m_V_a_l_u_e_B_u_f_f_e_r immediately after the corresponding
  43.      parameter identifiers.
  44.  
  45.      ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss sets the values of the parameters referenced in the
  46.      _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
  47.      filled with identifiers of parameters to be changed, and the odd entries
  48.      with the revised values.
  49.  
  50.      Alternatively, ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm may be used to get and set
  51.      single parameters.
  52.  
  53.      Descriptions of the general library parameters may be found in the
  54.      CLintro(3dm) man page.
  55.  
  56.      Some parameters, such as CL_COMPRESSION_RATIO and CL_FRAME_RATE, are
  57.      floating point values.  To set a floating point value, use the macro
  58.      CCCCLLLL____TTTTyyyyppppeeeeIIIIssssIIIInnnntttt, and to get one, use the macro CCCCLLLL____TTTTyyyyppppeeeeIIIIssssFFFFllllooooaaaatttt:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.           float     fnum;
  75.           int     inum;
  76.  
  77.           fnum = 3.0;
  78.           clSetParam(handle, CL_COMPRESSION_RATIO, CL_TypeIsInt(fnum));
  79.            ...
  80.           inum = clGetParam(handle, CL_COMPRESSION_RATIO);
  81.           fnum = CL_TypeIsFloat(inum);
  82.  
  83.  
  84.  
  85. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
  86.      ccccllllGGGGeeeettttPPPPaaaarrrraaaammmmssss, ccccllllSSSSeeeettttPPPPaaaarrrraaaammmmssss, and ccccllllSSSSeeeettttPPPPaaaarrrraaaammmm return SUCCESS, or a negative
  87.      error code on failure.  ccccllllGGGGeeeettttPPPPaaaarrrraaaammmm returns the current value of the
  88.      parameter, or a negative error code on failure.
  89.  
  90.  
  91. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  92.           #include <dmedia/cl.h>
  93.            ...
  94.           /* Get the frames per chunk and preroll */
  95.           int paramValueBuffer[][2] = {
  96.                CL_FRAMES_PER_CHUNK, 0,
  97.                CL_PREROLL, 0
  98.           };
  99.           int framesPerChunk, preroll;
  100.  
  101.           clGetParams(handle, (int *)paramValueBuffer,
  102.                sizeof(paramValueBuffer) / sizeof(int));
  103.           framesPerChunk = paramValueBuffer[0][1];
  104.           preroll = paramValueBuffer[1][1];
  105.            ...
  106.  
  107.  
  108. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  109.      CLintro(3dm), clQueryParams(3dm), clGetDefault(3dm), clGetMinMax(3dm),
  110.      clGetName(3dm)
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.