Ignore:
Timestamp:
Oct 13, 2011 9:02:41 AM (13 years ago)
Author:
nanang
Message:

Re #1378:

  • Implemented new algorithm for JB progressive discard.
  • Added new API and for setting JB discard algorithm at run-time.
  • Updated JB test for the new algorithm.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/test/jbuf_test.c

    r3553 r3814  
    4444    int lost; 
    4545    int empty; 
    46     int delay;      /**< Maximum delay, in frames.          */ 
     46    int delay;      /**< Average delay, in frames.          */ 
     47    int delay_min;  /**< Minimum delay, in frames.          */ 
    4748} test_cond_t; 
    4849 
     
    7071        else if (pj_ansi_stricmp(cond_st, "delay") == 0) 
    7172            cond->delay = cond_val; 
     73        else if (pj_ansi_stricmp(cond_st, "delay_min") == 0) 
     74            cond->delay_min = cond_val; 
    7275        else if (pj_ansi_stricmp(cond_st, "discard") == 0) 
    7376            cond->discard = cond_val; 
     
    218221        cond.burst = -1; 
    219222        cond.delay = -1; 
     223        cond.delay_min = -1; 
    220224        cond.discard = -1; 
    221225        cond.empty = -1; 
     
    314318            rc |= 2; 
    315319        } 
     320        if (cond.delay_min >= 0 && (int)state.min_delay/JB_PTIME > cond.delay_min) { 
     321            printf("! 'Minimum delay' should be %d, it is %d\n",  
     322                   cond.delay_min, state.min_delay/JB_PTIME); 
     323            rc |= 32; 
     324        } 
    316325        if (cond.discard >= 0 && (int)state.discard > cond.discard) { 
    317326            printf("! 'Discard' should be %d, it is %d\n", 
Note: See TracChangeset for help on using the changeset viewer.