Changeset 2917 for rat/trunk/source.c

Show
Ignore:
Timestamp:
11/11/99 09:55:49 (14 years ago)
Author:
ucacoxh
Message:

- Errata

1. Do not adjust avg_transit when doing buffer skew adaptation
shifts. The difference between transit and avg_transit is used as
test for adaptation. If both adjust in skew adaptation it looks like
adaptation still necessary immediately after adaptation.

2. Forget using avg_transit when close to transit for new talkspurt.
Was just an experiment that backfired.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/source.c

    r2916 r2917  
    649649                } 
    650650 
    651                 if (adjust_playout && src->packets_done &&  
    652                     ts_gt(ts_mul(src->pdbe->jitter, 3), ts_abs_diff(transit, src->pdbe->avg_transit))) { 
    653                         /* Use avg transit as it's close */ 
    654                         transit = src->pdbe->avg_transit; 
    655                         debug_msg("transit %d  transit_avg %d\n", transit.ticks, src->pdbe->avg_transit.ticks); 
    656                 } 
    657  
    658651                playout = playout_calc(sp, e->ssrc, transit, adjust_playout); 
    659652                playout = ts_add(e->transit, playout); 
     
    848841        } 
    849842 
     843        return FALSE; 
     844 
    850845        actual  = source_get_audio_buffered(src); 
    851846        desired = source_get_playout_delay(src); 
     
    923918                pb_shift_forward(src->media,   adjustment); 
    924919                pb_shift_forward(src->channel, adjustment); 
    925                 src->pdbe->transit      = ts_sub(src->pdbe->transit,      adjustment); 
    926                 src->pdbe->last_transit = ts_sub(src->pdbe->last_transit, adjustment); 
    927                 src->pdbe->avg_transit  = ts_sub(src->pdbe->avg_transit,  adjustment); 
     920 
     921                src->pdbe->transit      = ts_sub(src->pdbe->transit, adjustment); 
     922                /* avg_transit and last_transit are fine.  Difference in     */ 
     923                /* avg_transit and transit triggered this adjustment.        */ 
    928924 
    929925                if (ts_valid(src->last_repair)) { 
     
    952948                pb_shift_units_back_after(src->media,   playout, adjustment); 
    953949                pb_shift_units_back_after(src->channel, playout, adjustment); 
    954                 src->pdbe->transit      = ts_add(src->pdbe->transit,      adjustment); 
    955                 src->pdbe->last_transit = ts_add(src->pdbe->last_transit, adjustment); 
    956                 src->pdbe->avg_transit  = ts_add(src->pdbe->avg_transit,  adjustment); 
     950                src->pdbe->transit = ts_add(src->pdbe->transit, adjustment); 
    957951 
    958952                if (ts_gt(adjustment, src->skew_adjust)) {