Ignore:
Timestamp:
Feb 4, 2008 11:52:43 PM (16 years ago)
Author:
nanang
Message:

Ticket #461:

  • added param userdata to JB callbacks
  • added a bit optimization on pjmedia_jb2_get_frame(): shifting pointer instead of shifting frame buffer(memmove) when only parts of PCM frame needed
  • modified DTX handling mechanism: detects jumping timestamp but good sequence to generate noise/silence frames, instead of relying on abnormal drift.
  • modified behaviour on failure of allocating frame
  • moved abnormal drift detection from compensate_drift() to update_state()
  • added/removed some log for debugging purpose
File:
1 edited

Legend:

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

    r1775 r1778  
    5656{ 
    5757    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 */ 
     58    PJMEDIA_JB_PH_LEARNING  = 1,        /**< Learning */ 
     59    PJMEDIA_JB_PH_RUNNING   = 2,        /**< Running */ 
    6060} pjmedia_jb2_phase; 
    6161 
     
    137137 
    138138/** 
     139 * This structure describes jitter buffer callback 
     140 */ 
     141typedef struct pjmedia_jb2_cb 
     142{ 
     143    pj_status_t (*decode) (pjmedia_jb2_frame *frame, void *userdata); 
     144    pj_status_t (*plc)    (pjmedia_jb2_frame *frame, void *userdata); 
     145    pj_status_t (*cng)    (pjmedia_jb2_frame *frame, void *userdata); 
     146    void                  *user_data; 
     147} pjmedia_jb2_cb; 
     148 
     149 
     150/** 
    139151 * This structure describes jitter buffer current status. 
    140152 */ 
     
    162174 
    163175} pjmedia_jb2_setting; 
    164  
    165 typedef struct pjmedia_jb2_cb 
    166 { 
    167     pj_status_t (*decode) (pjmedia_jb2_frame *frame); 
    168     pj_status_t (*plc)    (pjmedia_jb2_frame *frame); 
    169     pj_status_t (*cng)    (pjmedia_jb2_frame *frame); 
    170 } pjmedia_jb2_cb; 
    171176 
    172177 
Note: See TracChangeset for help on using the changeset viewer.