Changeset 5238:5117fb0e7ed4 in roaraudio


Ignore:
Timestamp:
11/12/11 17:41:13 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Removed roar_stream_connect(), roar_stream_add_data(), roar_stream_send_data() and roar_stream_set_flags().

Files:
19 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/stream.h

    r5219 r5238  
    5757}; 
    5858 
    59 int roar_stream_connect  (struct roar_connection * con, struct roar_stream * s, int dir) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    60 int roar_stream_connect2 (struct roar_connection * con, struct roar_stream * s, int dir, int mixer) _LIBROAR_STREAM_STDATTRS; 
     59int roar_stream_connect (struct roar_connection * con, struct roar_stream * s, int dir, int mixer) _LIBROAR_STREAM_STDATTRS; 
    6160 
    6261int roar_stream_new     (struct roar_stream * s, unsigned int rate, unsigned int channels, unsigned int bits, unsigned int codec) _LIBROAR_ATTR_NONNULL_ALL; 
     
    8483int roar_stream_attach_simple (struct roar_connection * con, struct roar_stream * s, int client) _LIBROAR_STREAM_STDATTRS; 
    8584 
    86 int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    87  
    88 int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    89  
    9085int roar_stream_get_info (struct roar_connection * con, struct roar_stream * s, struct roar_stream_info * info) _LIBROAR_STREAM_STDATTRS; 
    9186int roar_stream_get_name (struct roar_connection * con, struct roar_stream * s, char * name, size_t len) _LIBROAR_STREAM_STDATTRS; 
     
    9489int roar_stream_set_chanmap (struct roar_connection * con, struct roar_stream * s, char * map, size_t   len) _LIBROAR_STREAM_STDATTRS; 
    9590 
    96 int roar_stream_set_flags  (struct roar_connection * con, struct roar_stream * s, int flags, int reset) _LIBROAR_STREAM_STDATTRS _LIBROAR_ATTR_DEPRECATED; 
    97 int roar_stream_set_flags2 (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action) _LIBROAR_STREAM_STDATTRS; 
     91int roar_stream_set_flags  (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action) _LIBROAR_STREAM_STDATTRS; 
    9892 
    9993int roar_stream_set_role  (struct roar_connection * con, struct roar_stream * s, int role) _LIBROAR_STREAM_STDATTRS; 
  • libroar/enumdev.c

    r5145 r5238  
    5252 
    5353 roar_libroar_nowarn(); 
    54  if ( roar_connect2(&con, c->server, 0, 0) == -1 ) { 
     54 if ( roar_connect(&con, c->server, 0, 0) == -1 ) { 
    5555  roar_libroar_warn(); 
    5656  return -1; 
  • libroar/simple.c

    r5237 r5238  
    8282 } 
    8383 
    84  if ( roar_stream_connect2(&con, s, dir, -1) == -1 ) { 
     84 if ( roar_stream_connect(&con, s, dir, -1) == -1 ) { 
    8585  safe_error = roar_error; 
    8686  roar_disconnect(&con); 
     
    254254 } 
    255255 
    256  if ( roar_stream_connect2(con, s, dir, -1) == -1 ) { 
     256 if ( roar_stream_connect(con, s, dir, -1) == -1 ) { 
    257257  return -1; 
    258258 } 
     
    417417  return -1; 
    418418 
    419  if ( roar_stream_connect2(con, s, dir, -1) == -1 ) 
    420   return -1; 
    421  
    422  if ( roar_stream_set_flags2(con, s, ROAR_FLAG_VIRTUAL, ROAR_SET_FLAG) == -1 ) { 
     419 if ( roar_stream_connect(con, s, dir, -1) == -1 ) 
     420  return -1; 
     421 
     422 if ( roar_stream_set_flags(con, s, ROAR_FLAG_VIRTUAL, ROAR_SET_FLAG) == -1 ) { 
    423423  roar_kick(con, ROAR_OT_STREAM, roar_stream_get_id(s)); 
    424424  return -1; 
  • libroar/stream.c

    r5229 r5238  
    3636#include "libroar.h" 
    3737 
    38 int roar_stream_connect  (struct roar_connection * con, struct roar_stream * s, int dir) { 
    39  return roar_stream_connect2(con, s, dir, -1); 
    40 } 
    41  
    42 int roar_stream_connect2 (struct roar_connection * con, struct roar_stream * s, int dir, int mixer) { 
     38int roar_stream_connect(struct roar_connection * con, struct roar_stream * s, int dir, int mixer) { 
    4339 struct roar_libroar_config * config = roar_libroar_get_config(); 
    4440 struct roar_stream  ms; 
     
    380376} 
    381377 
    382 int roar_stream_add_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) { 
    383  struct roar_message m; 
    384  
    385  if ( con == NULL || s == NULL || data == NULL ) { 
    386   roar_err_set(ROAR_ERROR_FAULT); 
    387   return -1; 
    388  } 
    389  
    390  memset(&m,  0, sizeof(m)); 
    391  
    392  m.cmd     = ROAR_CMD_ADD_DATA; 
    393  m.stream  = s->id; 
    394  m.pos     = 0; 
    395  m.datalen = len; 
    396  
    397 // if ( roar_req(con, &m, (void**)&data) == -1 ) 
    398 //  return -1; 
    399  if ( roar_send_message(con, &m, data) != 0 ) 
    400   return -1; 
    401  
    402  if ( roar_recv_message(con, &m, NULL) == -1 ) 
    403   return -1; 
    404  
    405  if ( m.cmd == ROAR_CMD_OK ) 
    406   return 0; 
    407  return -1; 
    408 } 
    409  
    410 int roar_stream_send_data (struct roar_connection * con, struct roar_stream * s, char * data, size_t len) { 
    411  
    412  roar_debug_warn_obsolete("roar_stream_send_data", "roar_vio_write", NULL); 
    413  
    414  if ( s == NULL ) { 
    415   roar_err_set(ROAR_ERROR_FAULT); 
    416   return -1; 
    417  } 
    418  
    419  if ( s->fh == -1 ) { 
    420   if ( con == NULL ) { 
    421    roar_err_set(ROAR_ERROR_NOTSUP); 
    422    return -1; 
    423   } 
    424  
    425   if ( roar_stream_add_data(con, s, data, len) == -1 ) 
    426    return -1; 
    427  
    428   return len; 
    429  } 
    430  
    431 #ifdef ROAR_HAVE_IO_POSIX 
    432  return ROAR_NETWORK_WRITE(s->fh, data, len); 
    433 #endif 
    434  
    435  roar_err_set(ROAR_ERROR_NOTSUP); 
    436  return -1; 
    437 } 
    438  
    439378int roar_stream_get_info (struct roar_connection * con, struct roar_stream * s, struct roar_stream_info * info) { 
    440379 struct roar_message m; 
     
    709648 
    710649 
    711 int roar_stream_set_flags (struct roar_connection * con, struct roar_stream * s, int flags, int reset) { 
    712  return roar_stream_set_flags2(con, s, flags, reset == ROAR_RESET_FLAG ? ROAR_RESET_FLAG : ROAR_SET_FLAG); 
    713 } 
    714  
    715 int roar_stream_set_flags2 (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action) { 
     650int roar_stream_set_flags (struct roar_connection * con, struct roar_stream * s, uint32_t flags, int action) { 
    716651 struct roar_message m; 
    717652 uint16_t * data = (uint16_t *) m.data; 
  • libroar/vio_stream.c

    r5118 r5238  
    121121 } 
    122122 
    123  if ( roar_stream_connect2(con, &stream, dir, -1) == -1 ) { 
     123 if ( roar_stream_connect(con, &stream, dir, -1) == -1 ) { 
    124124  err = roar_error; 
    125125  roar_disconnect(con); 
  • libroar/vs.c

    r5236 r5238  
    10501050  case ROAR_VS_TRUE: 
    10511051  case ROAR_VS_FALSE: 
    1052     if ( roar_stream_set_flags2(vss->con, &(vss->stream), flag, 
     1052    if ( roar_stream_set_flags(vss->con, &(vss->stream), flag, 
    10531053                                val == ROAR_VS_TRUE ? ROAR_SET_FLAG : ROAR_RESET_FLAG) == -1 ) { 
    10541054     _seterrre(); 
  • libroarrsound/libroarrsound.c

    r4893 r5238  
    500500  return -1; 
    501501 
    502  return roar_stream_set_flags2(&(self->con), &(self->stream), ROAR_FLAG_PAUSE, enable ? ROAR_SET_FLAG : ROAR_RESET_FLAG); 
     502 return roar_stream_set_flags(&(self->con), &(self->stream), ROAR_FLAG_PAUSE, enable ? ROAR_SET_FLAG : ROAR_RESET_FLAG); 
    503503} 
    504504 
  • libroaryiff/playback.c

    r5221 r5238  
    100100 } 
    101101 
    102  if ( roar_stream_connect2(con, s, ROAR_DIR_PLAY, -1) == -1 ) { 
     102 if ( roar_stream_connect(con, s, ROAR_DIR_PLAY, -1) == -1 ) { 
    103103  close(in); 
    104104  return -1; 
  • plugins/gstreamer0.10/roarmixer.c

    r5236 r5238  
    363363 
    364364  if (mute) { 
    365     _LIBROAR_IGNORE_RET(roar_stream_set_flags2(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_SET_FLAG)); 
     365    _LIBROAR_IGNORE_RET(roar_stream_set_flags(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_SET_FLAG)); 
    366366  } else { 
    367     _LIBROAR_IGNORE_RET(roar_stream_set_flags2(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_RESET_FLAG)); 
     367    _LIBROAR_IGNORE_RET(roar_stream_set_flags(&(mixer->con), &s, ROAR_FLAG_MUTE, ROAR_RESET_FLAG)); 
    368368  } 
    369369} 
  • roarclients/.release-helper

    r5226 r5238  
    22@RM roarcatsendfile.c 
    33@RM roarcat2sock.c 
     4@RM roarcatad.c 
    45#!END 
  • roarclients/Makefile

    r5226 r5238  
    99 
    1010#TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest 
    11 #TARGETS_OLD=roarcatad roarcatpassfh roarsocktypes 
     11#TARGETS_OLD=roarcatpassfh roarsocktypes 
    1212 
    1313TARGETS=$(TARGETS_IO) $(TARGETS_CTL) $(TARGETS_DSP) $(TARGETS_MISC) $(TARGETS_DEVEL) $(TARGETS_EXAMPLE) $(TARGETS_M) $(TARGETS_VIO) 
  • roarclients/roarcat.c

    r5202 r5238  
    187187 } 
    188188 
    189  if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
     189 if ( roar_stream_connect(&con, &s, dir, -1) == -1 ) { 
    190190  fprintf(stderr, "Error: can not connect stream to server\n"); 
    191191  roar_disconnect(&con); 
  • roarclients/roarcatad.c

    r5109 r5238  
    8989 } 
    9090 
    91  if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
     91 if ( roar_stream_connect(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
    9292  roar_disconnect(&con); 
    9393  return 1; 
  • roarclients/roarcatpassfh.c

    r5109 r5238  
    9191 } 
    9292 
    93  if ( roar_stream_connect2(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
     93 if ( roar_stream_connect(&con, &s, ROAR_DIR_PLAY, -1) == -1 ) { 
    9494  roar_disconnect(&con); 
    9595  return 1; 
  • roarclients/roarctl.c

    r5236 r5238  
    10591059 } 
    10601060 
    1061  return roar_stream_set_flags2(con, s, f, action); 
     1061 return roar_stream_set_flags(con, s, f, action); 
    10621062} 
    10631063 
  • roarclients/roarinterconnect.c

    r5185 r5238  
    505505 } 
    506506 
    507  if ( roar_stream_connect2(con, stream, localdir, -1) == -1 ) { 
     507 if ( roar_stream_connect(con, stream, localdir, -1) == -1 ) { 
    508508  roar_disconnect(con); 
    509509  return 22; 
  • roarclients/roarmon.c

    r5109 r5238  
    198198 } 
    199199 
    200  if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
     200 if ( roar_stream_connect(&con, &s, dir, -1) == -1 ) { 
    201201  fprintf(stderr, "Error: can not connect stream to server\n"); 
    202202  roar_disconnect(&con); 
     
    205205 
    206206 if ( prethru ) { 
    207   if ( roar_stream_set_flags2(&con, &s, ROAR_FLAG_PRETHRU, ROAR_SET_FLAG) == -1 ) { 
     207  if ( roar_stream_set_flags(&con, &s, ROAR_FLAG_PRETHRU, ROAR_SET_FLAG) == -1 ) { 
    208208   fprintf(stderr, "Error: can not set prethru flag on stream\n"); 
    209209   roar_disconnect(&con); 
  • roarclients/roarmonhttp.c

    r5109 r5238  
    331331 } 
    332332 
    333  if ( roar_stream_connect2(&con, &s, dir, -1) == -1 ) { 
     333 if ( roar_stream_connect(&con, &s, dir, -1) == -1 ) { 
    334334  roar_disconnect(&con); 
    335335  return 11; 
     
    337337 
    338338 if ( sflags != ROAR_FLAG_NONE ) { 
    339   if ( roar_stream_set_flags2(&con, &s, sflags, ROAR_SET_FLAG) == -1 ) { 
     339  if ( roar_stream_set_flags(&con, &s, sflags, ROAR_SET_FLAG) == -1 ) { 
    340340   roar_disconnect(&con); 
    341341   return 14; 
  • roarclients/roarradio.c

    r5179 r5238  
    211211 } 
    212212 
    213  if ( roar_stream_connect2(con, stream, ROAR_DIR_PLAY, -1) == -1 ) { 
     213 if ( roar_stream_connect(con, stream, ROAR_DIR_PLAY, -1) == -1 ) { 
    214214  roar_disconnect(con); 
    215215  return 1; 
Note: See TracChangeset for help on using the changeset viewer.