Changeset 3278:43af023d41ac in roaraudio


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

added a lot debug lions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_rtp.c

    r3275 r3278  
    3939 struct roar_rtp_inst * self = NULL; 
    4040 
     41 ROAR_DBG("roar_vio_open_rtp(calls=%p, dst=%p, dstr='%s', odef=%p) = ?", calls, dst, dstr, odef); 
     42 
    4143 if ( calls == NULL || dst == NULL ) 
    4244  return -1; 
     
    4446 if ( (self = roar_mm_malloc(sizeof(struct roar_rtp_inst))) == NULL ) 
    4547  return -1; 
     48 
     49 ROAR_DBG("roar_vio_open_rtp(calls=%p, dst=%p, dstr='%s', odef=%p) = ?", calls, dst, dstr, odef); 
    4650 
    4751 memset(self, 0, sizeof(struct roar_rtp_inst)); 
     
    6266 calls->ctl                = roar_vio_rtp_ctl; 
    6367 calls->close              = roar_vio_rtp_close; 
     68 
     69 ROAR_DBG("roar_vio_open_rtp(calls=%p, dst=%p, dstr='%s', odef=%p) = 0", calls, dst, dstr, odef); 
    6470 
    6571 return 0; 
     
    8288 int     i; 
    8389 
     90 ROAR_DBG("roar_vio_rtp_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count); 
     91 
    8492 if ( self->tx == NULL ) { 
    8593  if ( roar_buffer_new(&(self->tx), len_need) == -1 ) 
     
    102110 } 
    103111 
     112 ROAR_DBG("roar_vio_rtp_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count); 
     113 
    104114 if ( roar_buffer_get_data(self->tx, &(data.vp)) == -1 ) 
    105115  return -1; 
     
    124134 memcpy(data.vp + dataoffset, buf, count); 
    125135 
     136 ROAR_DBG("roar_vio_rtp_write(vio=%p, buf=%p, count=%llu) = ?", vio, buf, (long long unsigned)count); 
     137 
    126138 if ( (ret = roar_vio_write(self->vio, data.vp, count+dataoffset)) == -1 ) 
    127139  return -1; 
     
    135147 struct roar_rtp_inst * self = vio->inst; 
    136148 
     149 ROAR_DBG("roar_vio_rtp_nonblock(vio=%p, state=%i) = ?", vio, state); 
     150 
    137151 return roar_vio_nonblock(self->vio, state); 
    138152} 
     
    141155 struct roar_rtp_inst * self = vio->inst; 
    142156 
     157 ROAR_DBG("roar_vio_rtp_sync(vio=%p) = ?", vio); 
     158 
    143159 return roar_vio_sync(self->vio); 
    144160} 
     
    147163 struct roar_rtp_inst * self = vio->inst; 
    148164 
     165 ROAR_DBG("roar_vio_rtp_ctl(vio=%p, cmd=%i, data=%p) = ?", vio, cmd, data); 
     166 
    149167 if (vio == NULL || cmd == -1) 
    150168  return -1; 
     169 
     170 ROAR_DBG("roar_vio_rtp_ctl(vio=%p, cmd=%i, data=%p) = ?", vio, cmd, data); 
    151171 
    152172 switch (cmd) { 
     
    161181 } 
    162182 
     183 ROAR_DBG("roar_vio_rtp_ctl(vio=%p, cmd=%i, data=%p) = ?", vio, cmd, data); 
     184 
    163185 return roar_vio_ctl(self->vio, cmd, data); 
    164186} 
     
    167189 struct roar_rtp_inst * self = vio->inst; 
    168190 int ret; 
     191 
     192 ROAR_DBG("roar_vio_rtp_close(vio=%p) = ?", vio); 
    169193 
    170194 ret = roar_vio_close(self->vio); 
     
    176200 roar_mm_free(self); 
    177201 
     202 ROAR_DBG("roar_vio_rtp_close(vio=%p) = %i", vio, ret); 
     203 
    178204 return ret; 
    179205} 
Note: See TracChangeset for help on using the changeset viewer.