Ignore:
Timestamp:
Feb 3, 2008 4:55:31 PM (16 years ago)
Author:
nanang
Message:

Ticket #461:

  • added JB phases(idle, learning, running)
  • changed jb_vbuf_shrink_to() to jb_vbuf_shrink(), the size param specifies the shrink size
  • added jb_vbuf_expand
  • modified insert_samples(), automatically insert new frames needed to jb
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/jbuf2/pjmedia/include/pjmedia/jbuf2.h

    r1770 r1775  
    4949 */ 
    5050typedef struct pjmedia_jb2_t pjmedia_jb2_t; 
     51 
     52/** 
     53 * Types of jitter buffer phase. 
     54 */ 
     55typedef enum pjmedia_jb2_phase  
     56{ 
     57    PJMEDIA_JB_PH_IDLE      = 0,        /**< No activity in PUT/GET or both */ 
     58    PJMEDIA_JB_PH_LEARNING  = 1,        /**< Normal encoded frame */ 
     59    PJMEDIA_JB_PH_RUNNING   = 2,        /**< Normal PCM frame */ 
     60} pjmedia_jb2_phase; 
    5161 
    5262/** 
     
    7989typedef struct pjmedia_jb2_state 
    8090{ 
    81     /* frames */ 
     91    pjmedia_jb2_phase phase; 
     92 
     93    /* in frames */ 
    8294    pj_uint16_t  level; 
    8395    pj_uint32_t  frame_cnt; 
    8496     
    85     /* samples */ 
     97    /* in samples */ 
    8698    pj_int32_t   drift; 
    8799    pj_uint32_t  drift_span; 
     
    97109typedef struct pjmedia_jb2_stat 
    98110{ 
    99     /* frames */ 
     111    /* in frames */ 
    100112    pj_uint32_t  lost; 
    101113    pj_uint32_t  late; 
     
    104116    pj_uint32_t  in; 
    105117 
    106     /* ticks */ 
     118    /* in ticks */ 
    107119    pj_uint32_t  full; 
    108120    pj_uint32_t  empty; 
    109121 
    110     /* samples */ 
     122    /* in samples */ 
    111123    pj_uint32_t  max_size; 
    112124    pj_int32_t   max_drift; 
     
    114126    pj_int32_t   max_comp; 
    115127 
    116     /* ticks */ 
     128    /* in frames */ 
    117129    pj_uint16_t  max_level; 
    118130} pjmedia_jb2_stat; 
Note: See TracChangeset for help on using the changeset viewer.