Changeset 113:a032ff209b90 in roaraudio for roard/meta.c
- Timestamp:
- 07/13/08 04:23:57 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/meta.c
r107 r113 70 70 continue; 71 71 72 if ( s->meta[i].value == NULL ) 73 return -1; 74 72 75 if ( (vallen = strlen(s->meta[i].value)) > (len - 1) ) { 73 76 ROAR_DBG("stream_meta_get(*): val too small: need %i have %i", vallen, len); … … 83 86 84 87 return -1; 88 } 89 90 int stream_meta_list (int id, int * types, size_t len) { 91 int i, j; 92 int have = 0; 93 int found; 94 struct roar_stream_server * s = g_streams[id]; 95 96 if ( s == NULL ) 97 return -1; 98 99 if ( len < ROAR_META_MAX_PER_STREAM ) // TODO: find a way we do not need this 100 return -1; 101 102 types[0] = -1; 103 104 for (i = 0; i < ROAR_META_MAX_PER_STREAM; i++) { 105 found = 0; 106 for (j = 0; j < have; j++) 107 if ( types[j] == s->meta[i].type ) { 108 found = 1; 109 break; 110 } 111 112 if ( !found ) 113 types[have++] = s->meta[i].type; 114 } 115 116 return have; 85 117 } 86 118
Note: See TracChangeset
for help on using the changeset viewer.