Changeset 1163:ce49355d789e in roaraudio for libroar/simple.c


Ignore:
Timestamp:
01/24/09 02:13:31 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added internal roar_simple_new_stream_attachexeced_obj() function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r1161 r1163  
    9494 
    9595 return con.fh; 
     96} 
     97 
     98int roar_simple_new_stream_attachexeced_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) { 
     99 int fh; 
     100 
     101 if ( (fh = roar_simple_stream_obj(s, rate, channels, bits, codec, NULL /* server, we hope this goes ok here... */, 
     102                                   dir, "libroar temp stream")) == -1 ) 
     103  return -1; 
     104 
     105 if ( roar_stream_attach_simple(con, s, roar_get_clientid(con)) == -1 ) { 
     106  close(fh); 
     107  return -1; 
     108 } 
     109 
     110 return fh; 
    96111} 
    97112 
     
    185200  if ( select(listen + 1, &fds, &fds, &fds, &timeout) < 1 ) { 
    186201   close(listen); 
     202 
     203   // we don't need to check the content as we know it failed... 
     204   if ( roar_recv_message(con, &mes, NULL) == -1 ) 
     205    return -1; 
     206 
    187207   if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 ) 
    188208    return -1; 
    189209 
    190    return -1; 
     210   return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir); 
    191211  } 
    192212 
Note: See TracChangeset for help on using the changeset viewer.