- Timestamp:
- Dec 10, 2010 11:04:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/streamutil.c
r3292 r3392 506 506 unsigned wav_ptime; 507 507 508 wav_ptime = stream_port->info.samples_per_frame * 1000 / 509 stream_port->info.clock_rate; 508 wav_ptime = PJMEDIA_PIA_PTIME(&stream_port->info); 510 509 status = pjmedia_wav_player_port_create(pool, play_file, wav_ptime, 511 510 0, -1, &play_file_port); … … 533 532 534 533 status = pjmedia_wav_writer_port_create(pool, rec_file, 535 stream_port->info.clock_rate,536 stream_port->info.channel_count,537 stream_port->info.samples_per_frame,538 stream_port->info.bits_per_sample,534 PJMEDIA_PIA_SRATE(&stream_port->info), 535 PJMEDIA_PIA_CCNT(&stream_port->info), 536 PJMEDIA_PIA_SPF(&stream_port->info), 537 PJMEDIA_PIA_BITS(&stream_port->info), 539 538 0, 0, &rec_file_port); 540 539 if (status != PJ_SUCCESS) { … … 563 562 if (dir == PJMEDIA_DIR_ENCODING_DECODING) 564 563 status = pjmedia_snd_port_create(pool, -1, -1, 565 stream_port->info.clock_rate,566 stream_port->info.channel_count,567 stream_port->info.samples_per_frame,568 stream_port->info.bits_per_sample,564 PJMEDIA_PIA_SRATE(&stream_port->info), 565 PJMEDIA_PIA_CCNT(&stream_port->info), 566 PJMEDIA_PIA_SPF(&stream_port->info), 567 PJMEDIA_PIA_BITS(&stream_port->info), 569 568 0, &snd_port); 570 569 else if (dir == PJMEDIA_DIR_ENCODING) 571 570 status = pjmedia_snd_port_create_rec(pool, -1, 572 stream_port->info.clock_rate,573 stream_port->info.channel_count,574 stream_port->info.samples_per_frame,575 stream_port->info.bits_per_sample,571 PJMEDIA_PIA_SRATE(&stream_port->info), 572 PJMEDIA_PIA_CCNT(&stream_port->info), 573 PJMEDIA_PIA_SPF(&stream_port->info), 574 PJMEDIA_PIA_BITS(&stream_port->info), 576 575 0, &snd_port); 577 576 else 578 577 status = pjmedia_snd_port_create_player(pool, -1, 579 stream_port->info.clock_rate,580 stream_port->info.channel_count,581 stream_port->info.samples_per_frame,582 stream_port->info.bits_per_sample,578 PJMEDIA_PIA_SRATE(&stream_port->info), 579 PJMEDIA_PIA_CCNT(&stream_port->info), 580 PJMEDIA_PIA_SPF(&stream_port->info), 581 PJMEDIA_PIA_BITS(&stream_port->info), 583 582 0, &snd_port); 584 583 … … 758 757 759 758 760 printf(" Info: audio %.*s@%dHz, %dms/frame, %sB/s (%sB/s +IP hdr)\n", 761 (int)port->info.encoding_name.slen, 762 port->info.encoding_name.ptr, 763 port->info.clock_rate, 764 port->info.samples_per_frame * 1000 / port->info.clock_rate, 759 printf(" Info: audio %dHz, %dms/frame, %sB/s (%sB/s +IP hdr)\n", 760 PJMEDIA_PIA_SRATE(&port->info), 761 PJMEDIA_PIA_PTIME(&port->info), 765 762 good_number(bps, (codec_param->info.avg_bps+7)/8), 766 763 good_number(ipbps, ((codec_param->info.avg_bps+7)/8) +
Note: See TracChangeset
for help on using the changeset viewer.