Changeset 5253 for pjproject


Ignore:
Timestamp:
Mar 4, 2016 8:41:42 AM (5 years ago)
Author:
bennylp
Message:

Misc (Re #1882): encdec print the bitrate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/encdec.c

    r5251 r5253  
    100100    pjmedia_port *wavin, *wavout; 
    101101    unsigned lost_pct; 
     102    unsigned bitstream_size = 0; 
    102103    pj_status_t status; 
    103104 
     
    176177        } 
    177178         
     179        bitstream_size += frm_bit.size; 
     180 
    178181        /* Parse the bitstream (not really necessary for this case 
    179182         * since we always decode 1 frame, but it's still good 
     
    218221    pj_pool_release(pool); 
    219222 
     223    printf("Total encoded size: %u bytes\n", bitstream_size); 
     224    printf("Bitrate: %.3fKbps\n", bitstream_size*8.0/file_msec_duration); 
    220225    return PJ_SUCCESS; 
    221226} 
Note: See TracChangeset for help on using the changeset viewer.