Changeset 5456:a854b4c5bf2a in roaraudio for roarclients/roarcat.c
- Timestamp:
- 03/26/12 00:10:11 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarcat.c
r5381 r5456 45 45 " --rdtcs - Use Radio Data and Transmitter Control System input\n" 46 46 " --rel-id ID - Set ID of relative stream\n" 47 " --role ROLE - Set stream role\n" 47 48 " --help - Show this help\n" 48 49 ); … … 57 58 int dir = ROAR_DIR_PLAY; 58 59 int rel_id = -1; 60 int role = ROAR_ROLE_UNKNOWN; 59 61 char * server = NULL; 60 62 char * k; … … 111 113 } else if ( !strcmp(k, "--rel-id") ) { 112 114 rel_id = atoi(argv[++i]); 115 } else if ( !strcmp(k, "--role") ) { 116 role = roar_str2role(argv[++i]); 113 117 114 118 } else if ( !strcmp(k, "--help") || !strcmp(k, "-h") ) { … … 193 197 } 194 198 199 if ( role != ROAR_ROLE_UNKNOWN ) { 200 if ( roar_stream_set_role(&con, &s, role) == -1 ) { 201 fprintf(stderr, "Warning: can not set stream role\n"); 202 } 203 } 204 195 205 if ( roar_stream_exec(&con, &s) == -1 ) { 196 206 fprintf(stderr, "Error: can not exec stream\n");
Note: See TracChangeset
for help on using the changeset viewer.