[0] | 1 | //sources.c: |
---|
| 2 | |
---|
[668] | 3 | /* |
---|
| 4 | * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 |
---|
| 5 | * |
---|
| 6 | * This file is part of roard a part of RoarAudio, |
---|
| 7 | * a cross-platform sound system for both, home and professional use. |
---|
| 8 | * See README for details. |
---|
| 9 | * |
---|
| 10 | * This file is free software; you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License version 3 |
---|
| 12 | * as published by the Free Software Foundation. |
---|
| 13 | * |
---|
| 14 | * RoarAudio is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this software; see the file COPYING. If not, write to |
---|
[3517] | 21 | * the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
---|
| 22 | * Boston, MA 02110-1301, USA. |
---|
[668] | 23 | * |
---|
| 24 | */ |
---|
| 25 | |
---|
[0] | 26 | #include "roard.h" |
---|
| 27 | |
---|
[2485] | 28 | #ifndef ROAR_WITHOUT_DCOMP_SOURCES |
---|
| 29 | |
---|
[3061] | 30 | #define ROAR_SOURCE_DEFAULT "cf" |
---|
| 31 | |
---|
[2270] | 32 | struct roar_source g_source[] = { |
---|
[2275] | 33 | {"raw", "Raw source", "/some/file", SRC_FLAG_FHSEC, ROAR_SUBSYS_WAVEFORM, NULL, sources_add_raw}, |
---|
[2271] | 34 | #ifdef ROAR_HAVE_IO_POSIX |
---|
[2275] | 35 | {"wav", "Old RIFF/WAVE source", "/some/file.wav", SRC_FLAG_NONE, ROAR_SUBSYS_WAVEFORM, sources_add_wav, NULL}, |
---|
[2271] | 36 | #endif |
---|
[2275] | 37 | {"cf", "Old CF source", "/some/file.ext", SRC_FLAG_NONE, ROAR_SUBSYS_WAVEFORM, sources_add_cf, NULL}, |
---|
| 38 | {"roar", "Old simple RoarAudio source", "some.host", SRC_FLAG_NONE, ROAR_SUBSYS_WAVEFORM, sources_add_roar, NULL}, |
---|
[2507] | 39 | #ifndef ROAR_WITHOUT_DCOMP_CDRIVER |
---|
[2286] | 40 | {"oss", "OSS CDriver", "/dev/audio", SRC_FLAG_NONE, ROAR_SUBSYS_WAVEFORM, NULL, sources_add_cdriver}, |
---|
[2507] | 41 | #endif |
---|
[2269] | 42 | {NULL, NULL, NULL, SRC_FLAG_NONE, 0, NULL, NULL} // EOL |
---|
| 43 | }; |
---|
| 44 | |
---|
[0] | 45 | int sources_init (void) { |
---|
| 46 | g_source_client = -1; |
---|
| 47 | return 0; |
---|
| 48 | } |
---|
| 49 | |
---|
[2270] | 50 | void print_sourcelist (void) { |
---|
| 51 | int i; |
---|
| 52 | char subsys[7] = " "; |
---|
| 53 | |
---|
| 54 | printf(" Source Flag Subsys - Description (devices)\n"); |
---|
| 55 | printf("------------------------------------------------------\n"); |
---|
| 56 | |
---|
| 57 | for (i = 0; g_source[i].name != NULL; i++) { |
---|
| 58 | strncpy(subsys, " ", 6); |
---|
| 59 | |
---|
| 60 | if ( g_source[i].subsystems & ROAR_SUBSYS_WAVEFORM ) |
---|
| 61 | subsys[0] = 'W'; |
---|
| 62 | if ( g_source[i].subsystems & ROAR_SUBSYS_MIDI ) |
---|
| 63 | subsys[1] = 'M'; |
---|
| 64 | if ( g_source[i].subsystems & ROAR_SUBSYS_CB ) |
---|
| 65 | subsys[2] = 'C'; |
---|
| 66 | if ( g_source[i].subsystems & ROAR_SUBSYS_LIGHT ) |
---|
| 67 | subsys[3] = 'L'; |
---|
| 68 | if ( g_source[i].subsystems & ROAR_SUBSYS_RAW ) |
---|
| 69 | subsys[4] = 'R'; |
---|
[2681] | 70 | if ( g_source[i].subsystems & ROAR_SUBSYS_COMPLEX ) |
---|
| 71 | subsys[5] = 'X'; |
---|
[2270] | 72 | |
---|
| 73 | printf(" %-9s %c%c%c %6s - %s (devices: %s)\n", g_source[i].name, |
---|
[2285] | 74 | g_source[i].flags & SRC_FLAG_FHSEC ? 's' : ' ', |
---|
[2270] | 75 | g_source[i].old_open != NULL ? 'S' : ' ', |
---|
| 76 | g_source[i].new_open != NULL ? 'N' : ' ', |
---|
| 77 | subsys, |
---|
| 78 | g_source[i].desc, g_source[i].devices); |
---|
| 79 | } |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | |
---|
[64] | 83 | int sources_set_client (int client) { |
---|
| 84 | if ( client >= 0 ) { |
---|
| 85 | g_source_client = client; |
---|
| 86 | return 0; |
---|
| 87 | } else { |
---|
| 88 | return -1; |
---|
| 89 | } |
---|
| 90 | } |
---|
[0] | 91 | |
---|
| 92 | int sources_free (void) { |
---|
| 93 | return 0; |
---|
| 94 | } |
---|
| 95 | |
---|
[65] | 96 | int sources_add (char * driver, char * device, char * container, char * options, int primary) { |
---|
[2272] | 97 | int i; |
---|
| 98 | |
---|
[3061] | 99 | if ( driver == NULL ) |
---|
| 100 | driver = ROAR_SOURCE_DEFAULT; |
---|
| 101 | |
---|
[2272] | 102 | for (i = 0; g_source[i].name != NULL; i++) { |
---|
| 103 | if ( !strcmp(g_source[i].name, driver) ) { |
---|
| 104 | if ( g_source[i].new_open != NULL ) { |
---|
[2273] | 105 | return sources_add_new(&(g_source[i]), driver, device, container, options, primary); |
---|
[2272] | 106 | } else if ( g_source[i].old_open != NULL ) { |
---|
| 107 | return g_source[i].old_open(driver, device, container, options, primary); |
---|
| 108 | } else { |
---|
| 109 | ROAR_ERR("sources_add(driver='%s', ...): Found source but did not find any open rutine", driver); |
---|
| 110 | return -1; |
---|
| 111 | } |
---|
| 112 | } |
---|
[67] | 113 | } |
---|
[65] | 114 | |
---|
[2272] | 115 | ROAR_ERR("sources_add(driver='%s', ...): Source not found", driver); |
---|
[0] | 116 | return -1; |
---|
| 117 | } |
---|
| 118 | |
---|
[2273] | 119 | int sources_add_new (struct roar_source * source, |
---|
| 120 | char * driver, char * device, |
---|
| 121 | char * container, |
---|
| 122 | char * options, int primary) { |
---|
[2274] | 123 | int stream; |
---|
| 124 | int fh = -1; |
---|
| 125 | struct roar_stream * s; |
---|
| 126 | struct roar_stream_server * ss; |
---|
| 127 | char * k, * v; |
---|
| 128 | int error = 0; |
---|
| 129 | int f_sync = 0, f_mmap = 0; |
---|
| 130 | int codec; |
---|
| 131 | |
---|
| 132 | if ( source == NULL ) |
---|
| 133 | return -1; |
---|
| 134 | |
---|
| 135 | if ( (stream = streams_new()) == -1 ) { |
---|
| 136 | return -1; |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | streams_get(stream, &ss); |
---|
| 140 | s = ROAR_STREAM(ss); |
---|
| 141 | |
---|
| 142 | memcpy(&(s->info), g_sa, sizeof(struct roar_audio_info)); |
---|
| 143 | |
---|
[2275] | 144 | codec = s->info.codec; |
---|
| 145 | |
---|
[2274] | 146 | if ( streams_set_dir(stream, ROAR_DIR_PLAY, 1) == -1 ) { |
---|
| 147 | streams_delete(stream); |
---|
| 148 | return -1; |
---|
| 149 | } |
---|
| 150 | |
---|
| 151 | s->pos_rel_id = -1; |
---|
| 152 | |
---|
| 153 | k = strtok(options, ","); |
---|
| 154 | while (k != NULL) { |
---|
| 155 | if ( (v = strstr(k, "=")) != NULL ) { |
---|
| 156 | *v++ = 0; |
---|
| 157 | } |
---|
| 158 | |
---|
| 159 | if ( strcmp(k, "rate") == 0 ) { |
---|
| 160 | s->info.rate = atoi(v); |
---|
| 161 | } else if ( strcmp(k, "channels") == 0 ) { |
---|
| 162 | s->info.channels = atoi(v); |
---|
| 163 | } else if ( strcmp(k, "bits") == 0 ) { |
---|
| 164 | s->info.bits = atoi(v); |
---|
| 165 | } else if ( strcmp(k, "codec") == 0 ) { |
---|
| 166 | if ( (codec = roar_str2codec(v)) == -1 ) { |
---|
| 167 | ROAR_ERR("sources_add_new(*): unknown codec '%s'", v); |
---|
| 168 | error++; |
---|
| 169 | } |
---|
| 170 | |
---|
| 171 | } else if ( strcmp(k, "name") == 0 ) { |
---|
| 172 | if ( streams_set_name(stream, v) == -1 ) { |
---|
| 173 | ROAR_ERR("add_output(*): Can not set Stream name"); |
---|
| 174 | error++; |
---|
| 175 | } |
---|
| 176 | |
---|
| 177 | } else if ( strcmp(k, "mmap") == 0 ) { |
---|
| 178 | f_mmap = 1; |
---|
| 179 | } else if ( strcmp(k, "sync") == 0 ) { |
---|
| 180 | f_sync = 1; |
---|
| 181 | } else if ( strcmp(k, "primary") == 0 ) { |
---|
| 182 | primary = 1; |
---|
| 183 | } else if ( strcmp(k, "meta") == 0 ) { |
---|
| 184 | streams_set_flag(stream, ROAR_FLAG_META); |
---|
| 185 | } else if ( strcmp(k, "cleanmeta") == 0 ) { |
---|
| 186 | streams_set_flag(stream, ROAR_FLAG_CLEANMETA); |
---|
| 187 | } else if ( strcmp(k, "autoconf") == 0 ) { |
---|
| 188 | streams_set_flag(stream, ROAR_FLAG_AUTOCONF); |
---|
| 189 | |
---|
| 190 | } else { |
---|
| 191 | ROAR_ERR("sources_add_new(*): unknown option '%s'", k); |
---|
| 192 | error++; |
---|
| 193 | } |
---|
| 194 | |
---|
| 195 | if ( error ) { |
---|
| 196 | streams_delete(stream); |
---|
| 197 | if ( primary ) alive = 0; |
---|
| 198 | return -1; |
---|
| 199 | } |
---|
| 200 | |
---|
| 201 | k = strtok(NULL, ","); |
---|
| 202 | } |
---|
| 203 | |
---|
| 204 | if ( primary ) |
---|
| 205 | streams_mark_primary(stream); |
---|
| 206 | |
---|
| 207 | streams_set_flag(stream, ROAR_FLAG_SOURCE); |
---|
| 208 | client_stream_add(g_source_client, stream); |
---|
| 209 | |
---|
[2275] | 210 | if ( codec == ROAR_CODEC_ALAW || codec == ROAR_CODEC_MULAW ) |
---|
| 211 | s->info.bits = 8; // needed to open OSS driver, will be overriden by codecfilter |
---|
| 212 | |
---|
| 213 | s->info.codec = codec; |
---|
| 214 | ROAR_STREAM_SERVER(s)->codec_orgi = codec; |
---|
| 215 | |
---|
[2285] | 216 | if ( source->new_open(stream, device, fh, driver) == -1 ) { |
---|
[2274] | 217 | streams_delete(stream); |
---|
| 218 | return -1; |
---|
| 219 | } |
---|
| 220 | |
---|
| 221 | roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAMID, &stream); // ignore errors here |
---|
| 222 | roar_vio_ctl(&(ss->vio), ROAR_VIO_CTL_SET_SSTREAM, s); // ignore errors here |
---|
| 223 | |
---|
| 224 | if ( f_sync ) { |
---|
| 225 | streams_set_flag(stream, ROAR_FLAG_SYNC); |
---|
| 226 | } else { |
---|
| 227 | streams_reset_flag(stream, ROAR_FLAG_SYNC); |
---|
| 228 | } |
---|
| 229 | |
---|
| 230 | if ( f_mmap ) |
---|
| 231 | streams_set_flag(stream, ROAR_FLAG_MMAP); |
---|
| 232 | |
---|
| 233 | return 0; |
---|
[2273] | 234 | } |
---|
| 235 | |
---|
[2285] | 236 | int sources_add_raw (int stream , char * device, int fh, char * driver) { |
---|
[2275] | 237 | struct roar_stream_server * ss; |
---|
[566] | 238 | |
---|
[2275] | 239 | if ( fh > -1 ) |
---|
| 240 | return streams_set_fh(stream, fh); |
---|
[65] | 241 | |
---|
[2275] | 242 | streams_get(stream, &ss); |
---|
[1609] | 243 | |
---|
[2275] | 244 | if ( roar_vio_open_file(&(ss->vio), device, O_RDONLY, 0644) == -1 ) |
---|
| 245 | return -1; |
---|
[65] | 246 | |
---|
[2275] | 247 | return streams_set_fh(stream, -2); |
---|
[65] | 248 | } |
---|
| 249 | |
---|
[1499] | 250 | #ifdef ROAR_HAVE_IO_POSIX |
---|
[67] | 251 | int sources_add_wav (char * driver, char * device, char * container, char * options, int primary) { |
---|
| 252 | int stream; |
---|
| 253 | int fh; |
---|
| 254 | char buf[44]; |
---|
| 255 | struct roar_stream * s; |
---|
| 256 | |
---|
[566] | 257 | ROAR_WARN("sources_add_raw(*): The wav(e) source is obsolete, use source 'cf' (default)!"); |
---|
| 258 | |
---|
[67] | 259 | if ( (fh = open(device, O_RDONLY, 0644)) == -1 ) { |
---|
| 260 | return -1; |
---|
| 261 | } |
---|
| 262 | |
---|
| 263 | if (read(fh, buf, 44) != 44) { |
---|
| 264 | close(fh); |
---|
| 265 | return -1; |
---|
| 266 | } |
---|
| 267 | |
---|
| 268 | if ( (stream = streams_new()) == -1 ) { |
---|
| 269 | close(fh); |
---|
| 270 | return -1; |
---|
| 271 | } |
---|
| 272 | |
---|
| 273 | streams_get(stream, (struct roar_stream_server **)&s); |
---|
| 274 | |
---|
| 275 | memcpy(&(s->info), g_sa, sizeof(struct roar_audio_info)); |
---|
| 276 | |
---|
[1499] | 277 | memcpy(&(s->info.rate ), buf+24, 4); |
---|
| 278 | memcpy(&(s->info.channels), buf+22, 2); |
---|
| 279 | memcpy(&(s->info.bits ), buf+34, 2); |
---|
[67] | 280 | |
---|
[1609] | 281 | if ( streams_set_dir(stream, ROAR_DIR_PLAY, 1) == -1 ) { |
---|
| 282 | streams_delete(stream); |
---|
| 283 | close(fh); |
---|
| 284 | return -1; |
---|
| 285 | } |
---|
[67] | 286 | s->pos_rel_id = -1; |
---|
| 287 | |
---|
| 288 | streams_set_fh(stream, fh); |
---|
| 289 | |
---|
[1031] | 290 | streams_set_flag(stream, ROAR_FLAG_SOURCE); |
---|
[67] | 291 | client_stream_add(g_source_client, stream); |
---|
| 292 | |
---|
| 293 | return 0; |
---|
| 294 | } |
---|
[1499] | 295 | #endif |
---|
| 296 | |
---|
[1614] | 297 | #define _ret(x) streams_delete(stream); return (x) |
---|
[542] | 298 | |
---|
| 299 | int sources_add_cf (char * driver, char * device, char * container, char * options, int primary) { |
---|
[555] | 300 | int stream; |
---|
| 301 | int codec; |
---|
| 302 | int len; |
---|
| 303 | char buf[64]; |
---|
[1499] | 304 | struct roar_stream * s; |
---|
| 305 | struct roar_vio_calls * vio; |
---|
[1614] | 306 | struct roar_vio_defaults def; |
---|
| 307 | |
---|
| 308 | if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, O_RDONLY, 0644) == -1 ) |
---|
| 309 | return -1; |
---|
[555] | 310 | |
---|
[542] | 311 | if ( (stream = streams_new()) == -1 ) { |
---|
| 312 | return -1; |
---|
| 313 | } |
---|
| 314 | |
---|
| 315 | streams_get(stream, (struct roar_stream_server **)&s); |
---|
| 316 | |
---|
| 317 | memcpy(&(s->info), g_sa, sizeof(struct roar_audio_info)); |
---|
| 318 | |
---|
[1609] | 319 | if ( streams_set_dir(stream, ROAR_DIR_PLAY, 1) == -1 ) { |
---|
| 320 | streams_delete(stream); |
---|
| 321 | return -1; |
---|
| 322 | } |
---|
| 323 | |
---|
[542] | 324 | s->pos_rel_id = -1; |
---|
[1499] | 325 | |
---|
| 326 | /* |
---|
| 327 | if ( (fh = open(device, O_RDONLY, 0644)) == -1 ) { |
---|
| 328 | return -1; |
---|
| 329 | } |
---|
| 330 | */ |
---|
| 331 | |
---|
| 332 | vio = &(ROAR_STREAM_SERVER(s)->vio); |
---|
| 333 | |
---|
[1614] | 334 | //if ( roar_vio_open_file(vio, device, O_RDONLY, 0644) == -1 ) { |
---|
| 335 | if ( roar_vio_open_dstr(vio, device, &def, 1) == -1 ) { |
---|
[1499] | 336 | _ret(-1); |
---|
| 337 | } |
---|
| 338 | |
---|
[1614] | 339 | ROAR_DBG("sources_add_cf(*) = ?"); |
---|
| 340 | |
---|
[1499] | 341 | // TODO: finy out a better way of doing auto detetion without need for seek! |
---|
| 342 | if ( options == NULL ) { |
---|
| 343 | if ( (len = roar_vio_read(vio, buf, 64)) < 1 ) { |
---|
| 344 | _ret(-1); |
---|
| 345 | } |
---|
| 346 | |
---|
| 347 | if ( roar_vio_lseek(vio, -len, SEEK_CUR) == (off_t)-1 ) { |
---|
| 348 | _ret(-1); |
---|
| 349 | } |
---|
| 350 | |
---|
| 351 | if ( (codec = roar_file_codecdetect(buf, len)) == -1 ) { |
---|
| 352 | _ret(-1); |
---|
| 353 | } |
---|
| 354 | } else { |
---|
| 355 | if ( !strncmp(options, "codec=", 6) ) |
---|
| 356 | options += 6; |
---|
| 357 | |
---|
| 358 | if ( (codec = roar_str2codec(options)) == -1 ) { |
---|
| 359 | _ret(-1); |
---|
| 360 | } |
---|
| 361 | } |
---|
| 362 | |
---|
[542] | 363 | s->info.codec = codec; |
---|
| 364 | |
---|
[566] | 365 | ROAR_STREAM_SERVER(s)->codec_orgi = codec; |
---|
| 366 | |
---|
[1614] | 367 | ROAR_DBG("sources_add_cf(*) = ?"); |
---|
[1504] | 368 | streams_set_fh(stream, -2); |
---|
[1614] | 369 | ROAR_DBG("sources_add_cf(*) = ?"); |
---|
[644] | 370 | streams_set_socktype(stream, ROAR_SOCKET_TYPE_FILE); |
---|
| 371 | |
---|
| 372 | if ( primary ) |
---|
| 373 | streams_mark_primary(stream); |
---|
[542] | 374 | |
---|
[1031] | 375 | streams_set_flag(stream, ROAR_FLAG_SOURCE); |
---|
[542] | 376 | client_stream_add(g_source_client, stream); |
---|
| 377 | |
---|
| 378 | return 0; |
---|
| 379 | } |
---|
| 380 | |
---|
[1499] | 381 | #undef _ret |
---|
| 382 | |
---|
| 383 | |
---|
[1022] | 384 | int sources_add_roar (char * driver, char * device, char * container, char * options, int primary) { |
---|
| 385 | int stream; |
---|
| 386 | int fh; |
---|
| 387 | int codec = ROAR_CODEC_DEFAULT; |
---|
| 388 | struct roar_stream * s; |
---|
| 389 | |
---|
| 390 | if ( options != NULL && *options ) { |
---|
[1186] | 391 | if ( !strncmp(options, "codec=", 6) ) |
---|
| 392 | options += 6; |
---|
| 393 | |
---|
[1022] | 394 | if ( (codec = roar_str2codec(options)) == -1 ) { |
---|
| 395 | return -1; |
---|
| 396 | } |
---|
| 397 | } |
---|
| 398 | |
---|
| 399 | if ( (fh = roar_simple_monitor(g_sa->rate, g_sa->channels, g_sa->bits, codec, device, "roard")) == -1 ) { |
---|
| 400 | return -1; |
---|
| 401 | } |
---|
| 402 | |
---|
| 403 | if ( (stream = streams_new()) == -1 ) { |
---|
| 404 | close(fh); |
---|
| 405 | return -1; |
---|
| 406 | } |
---|
| 407 | |
---|
| 408 | streams_get(stream, (struct roar_stream_server **)&s); |
---|
| 409 | |
---|
| 410 | memcpy(&(s->info), g_sa, sizeof(struct roar_audio_info)); |
---|
| 411 | |
---|
[1609] | 412 | if ( streams_set_dir(stream, ROAR_DIR_PLAY, 1) == -1 ) { |
---|
| 413 | streams_delete(stream); |
---|
| 414 | close(fh); |
---|
| 415 | return -1; |
---|
| 416 | } |
---|
| 417 | |
---|
[1022] | 418 | s->pos_rel_id = -1; |
---|
| 419 | s->info.codec = codec; |
---|
| 420 | |
---|
| 421 | ROAR_STREAM_SERVER(s)->codec_orgi = codec; |
---|
| 422 | |
---|
| 423 | streams_set_fh(stream, fh); |
---|
| 424 | |
---|
| 425 | if ( primary ) |
---|
| 426 | streams_mark_primary(stream); |
---|
| 427 | |
---|
[1031] | 428 | streams_set_flag(stream, ROAR_FLAG_SOURCE); |
---|
[1022] | 429 | client_stream_add(g_source_client, stream); |
---|
| 430 | |
---|
| 431 | return 0; |
---|
| 432 | } |
---|
| 433 | |
---|
[2507] | 434 | #ifndef ROAR_WITHOUT_DCOMP_CDRIVER |
---|
[2286] | 435 | int sources_add_cdriver (int stream , char * device, int fh, char * driver) { |
---|
| 436 | int roar_cdriver_open(struct roar_vio_calls * calls, char * name, char * dev, struct roar_audio_info * info, int dir); |
---|
| 437 | struct roar_stream_server * ss; |
---|
| 438 | |
---|
| 439 | if ( fh > -1 ) |
---|
| 440 | return -1; |
---|
| 441 | |
---|
| 442 | streams_get(stream, &ss); |
---|
| 443 | |
---|
| 444 | if ( !strncmp(driver, "cdriver:", 8) ) |
---|
| 445 | driver += 8; |
---|
| 446 | |
---|
[2290] | 447 | ROAR_DBG("sources_add_cdriver(stream=%i, device='%s', fh=%i, driver='%s') = ?", stream, device, fh, driver); |
---|
| 448 | |
---|
[2286] | 449 | if ( roar_cdriver_open(&(ss->vio), driver, device, &(ROAR_STREAM(ss)->info), ROAR_DIR_RECORD) == -1 ) |
---|
| 450 | return -1; |
---|
| 451 | |
---|
| 452 | return streams_set_fh(stream, -2); |
---|
| 453 | } |
---|
[2507] | 454 | #endif |
---|
[2286] | 455 | |
---|
[2485] | 456 | #endif |
---|
| 457 | |
---|
[0] | 458 | //ll |
---|