Changeset 3126

Show
Ignore:
Timestamp:
02/05/00 15:15:13 (14 years ago)
Author:
ucacoxh
Message:

- Filter junk rtt values. (Little endian VAT does not interop with

big endian machines).

Location:
rat/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/MODS

    r3124 r3126  
    10711071          etc, from command line. 
    10721072        - Add check in settings that sdes values read in are not already set. 
     1073        - Add filter on rtt values to avoid displaying garbage values from rtp 
     1074          misimplementations. 
    10731075 
    10741076TODO -- They're features not bugs dammit! 
  • rat/trunk/rtp_callback.c

    r3108 r3126  
    129129 
    130130        /* rtt = arr - dep - delay */ 
     131        debug_msg("rtt arr - dep %lu  delay %lu\n", arr - dep, delay); 
    131132        delta = ntp32_sub(arr,   dep); 
    132133        delta = ntp32_sub(delta, delay); 
     
    187188{ 
    188189        pdb_entry_t  *e; 
    189         uint32_t fract_lost; 
     190        uint32_t fract_lost, my_ssrc; 
    190191 
    191192        /* Calculate rtt estimate */ 
    192  
    193         if (r->ssrc == rtp_my_ssrc(sp->rtp_session[0]) && 
     193        my_ssrc =  rtp_my_ssrc(sp->rtp_session[0]); 
     194        if (r->ssrc == my_ssrc && 
     195            r->ssrc != ssrc    && /* filter self reports */ 
    194196            pdb_item_get(sp->pdb, ssrc, &e) && 
    195197            r->lsr != 0) { 
    196198                uint32_t ntp_sec, ntp_frac, ntp32; 
    197  
     199                double rtt; 
    198200                ntp64_time(&ntp_sec, &ntp_frac); 
    199201                ntp32 = ntp64_to_ntp32(ntp_sec, ntp_frac); 
    200202                 
    201                 e->last_rtt = rtp_rtt_calc(ntp32, r->lsr, r->dlsr); 
     203                rtt = rtp_rtt_calc(ntp32, r->lsr, r->dlsr); 
     204                /* 
     205                 * Filter out blatantly wrong rtt values.  Some tools might not 
     206                 * implement dlsr and lsr (broken) or forget to do byte-swapping (grr) 
     207                 */ 
     208                if (rtt < 100.0) { 
     209                        e->last_rtt = rtt; 
     210                } else { 
     211                        debug_msg("Junk rtt (%f secs) - receiver rtp misimplementation?\n"); 
     212                } 
    202213                if (e->avg_rtt == 0.0) { 
    203214                        e->avg_rtt = e->last_rtt; 
  • rat/trunk/ui_audiotool.tcl

    r3123 r3126  
    13551355        stats_add_field $win.df.playout.6 "Packets Dropped (spike):"  SPIKE_TOGED($ssrc) 
    13561356        stats_add_field $win.df.playout.7 "Relative Clock Rate:"      SKEW($ssrc) 
    1357         stats_add_field $win.df.playout.8 "Round Trip Time (ms):"     RTT($ssrc) 
    13581357 
    13591358        frame $win.df.decoder -relief groove -bd 2 
     
    13681367        stats_add_field $win.df.decoder.7 "Packets misordered: "     PCKTS_MISO($ssrc) 
    13691368        stats_add_field $win.df.decoder.8 "Packets duplicated: "     PCKTS_DUP($ssrc) 
     1369        stats_add_field $win.df.decoder.9 "Round Trip Time (ms):"    RTT($ssrc) 
    13701370 
    13711371# Audio settings