Changeset 124:70992549a17a in roaraudio
- Timestamp:
- 07/13/08 17:03:40 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarvorbis.c
r122 r124 25 25 ); 26 26 27 } 28 29 30 FILE * open_http (char * file) { 31 char cmd[1024]; 32 33 snprintf(cmd, 1023, "wget -qO - '%s'", file); 34 35 return popen(cmd, "r"); 27 36 } 28 37 … … 66 75 roar_stream_meta_set(con, s, ROAR_META_MODE_CLEAR, &meta); 67 76 68 meta.type = ROAR_META_TYPE_FILENAME; 77 if ( strncmp(file, "http:", 5) == 0 ) 78 meta.type = ROAR_META_TYPE_FILEURL; 79 else 80 meta.type = ROAR_META_TYPE_FILENAME; 81 69 82 strncpy(value, file, 79); 70 83 roar_stream_meta_set(con, s, ROAR_META_MODE_SET, &meta); … … 129 142 } 130 143 131 if ( (in = fopen(file, "rb")) == NULL ) { 144 if ( strncmp(file, "http:", 5) == 0 ) { 145 in = open_http(file); 146 } else { 147 in = fopen(file, "rb"); 148 } 149 150 if ( in == NULL ) { 132 151 roar_disconnect(&con); 133 152 return -1;
Note: See TracChangeset
for help on using the changeset viewer.