Changeset 908:fdfe33d17972 in roaraudio
- Timestamp:
- 12/06/08 17:46:23 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarshout.c
r907 r908 31 31 32 32 void usage (void) { 33 printf("roarmon [OPTIONS]...\n"); 34 35 printf("\nOptions:\n\n"); 36 37 printf(" --server SERVER - Set server hostname\n" 38 " --rate RATE - Set sample rate\n" 39 " --bits BITS - Set bits per sample\n" 40 " --chans CHANNELS - Set number of channels\n" 41 " --codec CODEC - Set the codec\n" 42 " --help - Show this help\n" 33 printf("roarmon [OPTIONS]... [address [port [password [mountpoint]]]\n"); 34 35 printf("\nRoarAudio Options:\n\n"); 36 37 printf(" --server SERVER - Set server hostname\n" 38 " --rate RATE - Set sample rate\n" 39 " --bits BITS - Set bits per sample\n" 40 " --chans CHANNELS - Set number of channels\n" 41 " --codec CODEC - Set the codec\n" 42 " -h --help - Show this help\n" 43 ); 44 45 printf("\nlibshout Options:\n\n"); 46 47 printf(" -p --public - Allow listing in stream directory\n" 48 " -d DESC - Set stream description\n" 49 " -g GENRE - Set stream genre\n" 50 " -n NAME - Set stream name\n" 51 " -u URL - Set stream URL/homepage\n" 43 52 ); 44 53 … … 56 65 char * s_pw = NULL; 57 66 int s_port = -1; 67 char * s_desc = NULL; 68 char * s_genre = NULL; 69 char * s_name = NULL; 70 char * s_url = NULL; 71 int s_public = 0; 58 72 int fh; 59 73 int i; … … 74 88 } else if ( strcmp(k, "--codec") == 0 ) { 75 89 codec = roar_str2codec(argv[++i]); 76 } else if ( strcmp(k, "--help") == 0 ) { 90 } else if ( strcmp(k, "-p") == 0 || strcmp(k, "--public") == 0 ) { 91 s_public = 1; 92 } else if ( strcmp(k, "-d") == 0 ) { 93 s_desc = argv[++i]; 94 } else if ( strcmp(k, "-g") == 0 ) { 95 s_genre = argv[++i]; 96 } else if ( strcmp(k, "-n") == 0 ) { 97 s_name = argv[++i]; 98 } else if ( strcmp(k, "-u") == 0 ) { 99 s_url = argv[++i]; 100 } else if ( strcmp(k, "-h") == 0 || strcmp(k, "--help") == 0 ) { 77 101 usage(); 78 102 return 0; … … 146 170 } 147 171 172 shout_set_public(shout, s_public); 173 174 if (s_desc != NULL) 175 shout_set_description(shout, s_desc); 176 177 if (s_genre != NULL) 178 shout_set_genre(shout, s_genre); 179 180 if (s_name != NULL) 181 shout_set_name(shout, s_name); 182 183 if (s_url != NULL) 184 shout_set_url(shout, s_url); 185 148 186 if ( (fh = roar_simple_monitor(rate, channels, bits, codec, server, "roarshout")) == -1 ) { 149 187 fprintf(stderr, "Error: can not start monetoring\n"); … … 157 195 158 196 while((i = read(fh, buf, BUFSIZE))) 159 if (shout_send(shout, buf, i) != SHOUTERR_SUCCESS)197 if (shout_send(shout, (unsigned char*)buf, i) != SHOUTERR_SUCCESS) 160 198 break; 161 199
Note: See TracChangeset
for help on using the changeset viewer.