Changeset 106:bbd14eeee9db in roaraudio for roarclients/roarctl.c
- Timestamp:
- 07/13/08 02:34:21 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r99 r106 226 226 s.id = id; 227 227 228 printf("set_meta(*): mode='%s', type='%s', val='%s'\n", mode, type, val);228 // printf("set_meta(*): mode='%s', type='%s', val='%s'\n", mode, type, val); 229 229 230 230 if ( strcmp(mode, "add") == 0 ) { … … 232 232 } 233 233 234 meta.type = atoi(type); 235 meta.value = val; 236 meta.key[0] = 0; 237 238 // printf("D: type=%i, mode=%i\n", meta.type, mode_i); 239 240 return roar_stream_meta_set(con, &s, mode_i, &meta); 241 } 242 243 int show_meta_type (struct roar_connection * con, int id, char * type) { 244 struct roar_meta meta; 245 struct roar_stream s; 246 247 s.id = id; 248 234 249 meta.type = atoi(type); 235 meta.value = val; 236 237 printf("D: type=%i, mode=%i\n", meta.type, mode_i); 238 239 return roar_stream_meta_set(con, &s, mode_i, &meta); 250 251 if ( roar_stream_meta_get(con, &s, &meta) == -1 ) 252 return -1; 253 254 printf("Meta %s: %s\n", type, meta.value); 255 256 roar_meta_free(&meta); 257 258 return 0; 240 259 } 241 260 … … 365 384 } 366 385 367 } else if ( !strcmp(k, "meta ") ) {386 } else if ( !strcmp(k, "metaset") ) { 368 387 i++; 369 388 if ( set_meta(&con, atoi(argv[i]), argv[i+1], argv[i+2], argv[i+3]) == -1 ) { … … 373 392 } 374 393 i += 3; 394 } else if ( !strcmp(k, "metaget") ) { 395 i++; 396 if ( show_meta_type(&con, atoi(argv[i]), argv[i+1]) == -1 ) { 397 fprintf(stderr, "Error: can not get meta data\n"); 398 } 399 i++; 375 400 376 401 } else {
Note: See TracChangeset
for help on using the changeset viewer.