Ignore:
Timestamp:
Jul 29, 2009 12:14:21 PM (15 years ago)
Author:
bennylp
Message:

Ticket #923: New API to retrieve current jitter buffer state from a stream/session

  • added pjmedia_session_get_stream_stat_jbuf() and pjmedia_session_get_stream_stat_jbuf()
  • fixed const correctness in pjmedia_jbuf_get_state(), jb_framelist_size(), and pj_math_stat_get_stddev(),
  • modify the jitter buffer statistic log message printed by stream (it contains newlines)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r2834 r2844  
    328328            if (frame_type != stream->jb_last_frm) { 
    329329                pjmedia_jb_state jb_state; 
     330                const char *with_plc = ""; 
    330331 
    331332                /* Activate PLC to smoothen the missing frame */ 
     
    347348                    } while (samples_count < samples_required); 
    348349 
     350                    with_plc = ", plc invoked"; 
    349351                }  
    350352 
     
    352354                pjmedia_jbuf_get_state(stream->jb, &jb_state); 
    353355                PJ_LOG(5,(stream->port.info.name.ptr,  
    354                           "Jitter buffer empty (prefetch=%d)",  
    355                           jb_state.prefetch)); 
     356                          "Jitter buffer empty (prefetch=%d)%s",  
     357                          jb_state.prefetch, with_plc)); 
    356358 
    357359            } 
     
    18801882        jb_init = 0; 
    18811883 
    1882  
    18831884    /* Create jitter buffer */ 
    18841885    status = pjmedia_jbuf_create(pool, &stream->port.info.name, 
     
    21712172} 
    21722173#endif 
     2174 
     2175/* 
     2176 * Get jitter buffer state. 
     2177 */ 
     2178PJ_DEF(pj_status_t) pjmedia_stream_get_stat_jbuf(const pjmedia_stream *stream, 
     2179                                                 pjmedia_jb_state *state) 
     2180{ 
     2181    PJ_ASSERT_RETURN(stream && state, PJ_EINVAL); 
     2182    return pjmedia_jbuf_get_state(stream->jb, state); 
     2183} 
    21732184 
    21742185/* 
Note: See TracChangeset for help on using the changeset viewer.