Changeset 4501:08d4027e47d5 in roaraudio for roarclients/roarctl.c


Ignore:
Timestamp:
10/13/10 02:59:26 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

basic serverstands listing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r4443 r4501  
    113113        "  serverinfo              - Gets general information about the server\n" 
    114114        "  serveroinfo             - Gets Information about server output\n" 
     115        "  serverstandards         - Gets list of server supported standards\n" 
    115116        "  listclients             - Gets Information about clients\n" 
    116117        "  liststreams             - Gets Information about streams\n" 
     
    244245  if ( g_verbose > 1 && s.pos != (uint32_t)-1 ) 
    245246   printf("Server Position       : %lu S (%.3fs)\n", (unsigned long int) s.pos, (float)s.pos/(s.info.rate*s.info.channels)); 
     247} 
     248 
     249void server_standards (struct roar_connection * con) { 
     250 struct roar_stds * stds; 
     251 size_t i; 
     252 int vendor, standard, version; 
     253 
     254 if ( roar_caps_stds(con, &stds, NULL, -1) == -1 ) { 
     255  fprintf(stderr, "Error: can not get server standards\n"); 
     256  return; 
     257 } 
     258 
     259 for (i = 0; i < stds->stds_len; i++) { 
     260  vendor   = ROAR_STD_VENDOR(stds->stds[i]); 
     261  standard = ROAR_STD_STD(stds->stds[i]); 
     262  version  = ROAR_STD_VERSION(stds->stds[i]); 
     263  printf("Server standard       : %i-%i-%i\n", vendor, standard, version); 
     264 } 
    246265} 
    247266 
     
    10951114  } else if ( !strcmp(k, "serveroinfo") ) { 
    10961115   server_oinfo(&con); 
     1116  } else if ( !strcmp(k, "serverstandards") ) { 
     1117   server_standards(&con); 
    10971118  } else if ( !strcmp(k, "listclients") ) { 
    10981119   list_clients(&con); 
Note: See TracChangeset for help on using the changeset viewer.