Ignore:
Timestamp:
Dec 10, 2010 11:04:30 AM (13 years ago)
Author:
bennylp
Message:

Migration of current video works from private repository to this repository. This closed #1176

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/streamutil.c

    r3292 r3392  
    506506        unsigned wav_ptime; 
    507507 
    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); 
    510509        status = pjmedia_wav_player_port_create(pool, play_file, wav_ptime, 
    511510                                                0, -1, &play_file_port); 
     
    533532 
    534533        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), 
    539538                                                0, 0, &rec_file_port); 
    540539        if (status != PJ_SUCCESS) { 
     
    563562        if (dir == PJMEDIA_DIR_ENCODING_DECODING) 
    564563            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), 
    569568                                        0, &snd_port); 
    570569        else if (dir == PJMEDIA_DIR_ENCODING) 
    571570            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), 
    576575                                        0, &snd_port); 
    577576        else 
    578577            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), 
    583582                                        0, &snd_port); 
    584583 
     
    758757 
    759758 
    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), 
    765762        good_number(bps, (codec_param->info.avg_bps+7)/8), 
    766763        good_number(ipbps, ((codec_param->info.avg_bps+7)/8) +  
Note: See TracChangeset for help on using the changeset viewer.