Changeset 4293:b3c0ac64bc7d in roaraudio


Ignore:
Timestamp:
08/29/10 03:08:49 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cleanup

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/ltm.h

    r4275 r4293  
    4444int roar_ltm_unregister(struct roar_connection * con, int mt, int window, int * streams, size_t slen); 
    4545 
    46 /* 
    47 ssize_t roar_ltm_get_raw(struct roar_connection * con, int mt, int window, int * streams, size_t slen, void * buf, size_t * buflen, int64_t ** array); 
    48  
    49 int64_t roar_ltm_extract(int64_t * buf, size_t len, int mt, int req); 
    50 int64_t roar_ltm_extract1(int64_t * buf, size_t len, int mt, int req); 
    51 */ 
    52  
    5346struct roar_ltm_result * roar_ltm_get(struct roar_connection * con, int mt, int window, int * streams, size_t slen, struct roar_ltm_result * oldresult); 
    5447 
  • libroar/ltm.c

    r4291 r4293  
    149149} 
    150150 
    151 /* 
    152 ssize_t roar_ltm_get_raw(struct roar_connection * con, 
    153                          int mt, int window, 
    154                          int * streams, size_t slen, 
    155                          void * buf, size_t * buflen, int64_t ** array) { 
    156  int bits = roar_ltm_numbits(mt); 
    157  int64_t * buffer = buf; 
    158  size_t i; 
    159  
    160  if ( buflen == NULL ) { 
    161   roar_errno = ROAR_ERROR_INVAL; 
    162   return -1; 
    163  } 
    164  
    165  if ( slen == 0 ) { 
    166   *buflen = 0; 
    167   return bits; 
    168  } 
    169  
    170  if ( con == NULL || streams == NULL || buf == NULL || array == NULL ) { 
    171   roar_errno = ROAR_ERROR_INVAL; 
    172   return -1; 
    173  } 
    174  
    175  if ( *buflen < (bits * slen) ) { 
    176   roar_errno = ROAR_ERROR_INVAL; 
    177   return -1; 
    178  } 
    179  
    180  for (i = 0; i < slen; i++) { 
    181   array[i] = &(buffer[bits*i]); 
    182  } 
    183  
    184  roar_errno = ROAR_ERROR_NOSYS; 
    185  return -1; 
    186 } 
    187  
    188 int64_t roar_ltm_extract(int64_t * buf, size_t len, int mt, int req) { 
    189  int have, need; 
    190  
    191  roar_err_clear(); 
    192  
    193  have = roar_ltm_numbits(req); 
    194  
    195  need = roar_ltm_numbits(mt); 
    196  
    197  if ( have != 1 || (mt & req) != req || len != (size_t)need || buf == NULL ) { 
    198   roar_errno = ROAR_ERROR_INVAL; 
    199   return 0; 
    200  } 
    201  
    202  while (req && (req & 0x1) == 0) { 
    203   if ( mt & 0x1 ) 
    204    buf++; 
    205  
    206   mt  <<= 1; 
    207   req <<= 1; 
    208  } 
    209  
    210  return *buf; 
    211 } 
    212  
    213 int64_t roar_ltm_extract1(int64_t * buf, size_t len, int mt, int req) { 
    214  roar_err_clear(); 
    215  
    216  if ( buf == NULL || len != 1 || mt != req ) { 
    217   roar_errno = ROAR_ERROR_INVAL; 
    218   return 0; 
    219  } 
    220  
    221  return *buf; 
    222 } 
    223 */ 
    224151 
    225152#ifdef DEBUG 
Note: See TracChangeset for help on using the changeset viewer.