Changeset 856
- Timestamp:
- Dec 22, 2006 3:24:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/streamutil.c
r815 r856 51 51 " --play-file=WAV Send audio from the WAV file instead of from \n" 52 52 " the sound device. \n" 53 //" --record-file=WAV Record incoming audio to WAV file instead of \n"54 //" playing it to sound device. \n"53 " --record-file=WAV Record incoming audio to WAV file instead of \n" 54 " playing it to sound device. \n" 55 55 " --send-recv Set stream direction to bidirectional. \n" 56 56 " --send-only Set stream direction to send only \n" … … 394 394 } 395 395 396 396 printf("Playing from WAV file %s..\n", play_file); 397 398 } else if (rec_file) { 399 400 status = pjmedia_wav_writer_port_create(pool, rec_file, 401 stream_port->info.clock_rate, 402 stream_port->info.channel_count, 403 stream_port->info.samples_per_frame, 404 stream_port->info.bits_per_sample, 405 0, 0, &rec_file_port); 406 if (status != PJ_SUCCESS) { 407 app_perror(THIS_FILE, "Unable to use file", status); 408 goto on_exit; 409 } 410 411 status = pjmedia_master_port_create(pool, stream_port, rec_file_port, 412 0, &master_port); 413 if (status != PJ_SUCCESS) { 414 app_perror(THIS_FILE, "Unable to create master port", status); 415 goto on_exit; 416 } 417 418 status = pjmedia_master_port_start(master_port); 419 if (status != PJ_SUCCESS) { 420 app_perror(THIS_FILE, "Error starting master port", status); 421 goto on_exit; 422 } 423 424 printf("Recording to WAV file %s..\n", rec_file); 425 397 426 } else { 398 427
Note: See TracChangeset
for help on using the changeset viewer.