Changeset 3287:501ae8e87527 in roaraudio


Ignore:
Timestamp:
02/01/10 14:48:00 (10 years ago)
Author:
phi
Branch:
default
Message:

rename tx buffer to io as we will use it in read(), too

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio_rtp.h

    r3285 r3287  
    107107 struct roar_vio_calls * vio; 
    108108 struct roar_rtp_header header; 
    109  struct roar_buffer    * tx; 
     109 struct roar_buffer    * io; 
    110110 struct roar_audio_info  info; 
    111111 size_t                  mtu; 
  • libroar/vio_rtp.c

    r3286 r3287  
    164164 } 
    165165 
    166  if ( self->tx == NULL ) { 
    167   if ( roar_buffer_new(&(self->tx), len_need) == -1 ) 
     166 if ( self->io == NULL ) { 
     167  if ( roar_buffer_new(&(self->io), len_need) == -1 ) 
    168168   return -1; 
    169169 
    170170  len_have = len_need; 
    171171 } else { 
    172   if ( roar_buffer_get_len(self->tx, &len_have) == -1 ) 
     172  if ( roar_buffer_get_len(self->io, &len_have) == -1 ) 
    173173   return -1; 
    174174 
    175175  if ( len_have < len_need ) { 
    176    if ( roar_buffer_set_len(self->tx, len_need) == -1 ) { 
    177     if ( roar_buffer_free(self->tx) == -1 ) 
     176   if ( roar_buffer_set_len(self->io, len_need) == -1 ) { 
     177    if ( roar_buffer_free(self->io) == -1 ) 
    178178     return -1; 
    179179 
    180     self->tx = NULL; 
     180    self->io = NULL; 
    181181    return roar_vio_rtp_write(vio, buf, count); // restart ower self from the beginning with no buffer 
    182182   } 
     
    186186 ROAR_DBG("roar_vio_rtp_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count); 
    187187 
    188  if ( roar_buffer_get_data(self->tx, &(data.vp)) == -1 ) 
     188 if ( roar_buffer_get_data(self->io, &(data.vp)) == -1 ) 
    189189  return -1; 
    190190 
     
    304304 ret = roar_vio_close(self->vio); 
    305305 
    306  if ( self->tx != NULL ) 
    307   if ( roar_buffer_free(self->tx) == -1 ) 
     306 if ( self->io != NULL ) 
     307  if ( roar_buffer_free(self->io) == -1 ) 
    308308   ret = -1; 
    309309 
Note: See TracChangeset for help on using the changeset viewer.