Changeset 2844
- Timestamp:
- Jul 29, 2009 12:14:21 PM (15 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/math.h
r2577 r2844 169 169 * @return The standard deviation. 170 170 */ 171 PJ_INLINE(unsigned) pj_math_stat_get_stddev( pj_math_stat *stat)171 PJ_INLINE(unsigned) pj_math_stat_get_stddev(const pj_math_stat *stat) 172 172 { 173 173 if (stat->n == 0) return 0; -
pjproject/trunk/pjmedia/include/pjmedia/jbuf.h
r2578 r2844 301 301 * @return PJ_SUCCESS on success. 302 302 */ 303 PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( pjmedia_jbuf *jb,303 PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( const pjmedia_jbuf *jb, 304 304 pjmedia_jb_state *state ); 305 305 -
pjproject/trunk/pjmedia/include/pjmedia/session.h
r2394 r2844 270 270 * Get session statistics. The stream statistic shows various 271 271 * indicators such as packet count, packet lost, jitter, delay, etc. 272 * See also #pjmedia_session_get_stream_stat_jbuf() 272 273 * 273 274 * @param session The media session. … … 300 301 #endif 301 302 303 304 /** 305 * Get current jitter buffer state for the specified stream. 306 * See also #pjmedia_session_get_stream_stat() 307 * 308 * @param session The media session. 309 * @param index Stream index. 310 * @param state Jitter buffer state. 311 * 312 * @return PJ_SUCCESS on success. 313 */ 314 PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat_jbuf( 315 pjmedia_session *session, 316 unsigned index, 317 pjmedia_jb_state *state); 302 318 303 319 /** -
pjproject/trunk/pjmedia/include/pjmedia/stream.h
r2506 r2844 29 29 #include <pjmedia/codec.h> 30 30 #include <pjmedia/endpoint.h> 31 #include <pjmedia/jbuf.h> 31 32 #include <pjmedia/port.h> 32 33 #include <pjmedia/rtcp.h> … … 215 216 216 217 /** 217 * Get the stream statistics. 218 * Get the stream statistics. See also 219 * #pjmedia_stream_get_stat_jbuf() 218 220 * 219 221 * @param stream The media stream. … … 237 239 pjmedia_rtcp_xr_stat *stat); 238 240 #endif 241 242 /** 243 * Get current jitter buffer state. See also 244 * #pjmedia_stream_get_stat() 245 * 246 * @param stream The media stream. 247 * @param state Jitter buffer state. 248 * 249 * @return PJ_SUCCESS on success. 250 */ 251 PJ_DECL(pj_status_t) pjmedia_stream_get_stat_jbuf(const pjmedia_stream *stream, 252 pjmedia_jb_state *state); 253 239 254 240 255 /** -
pjproject/trunk/pjmedia/src/pjmedia/jbuf.c
r2672 r2844 212 212 213 213 214 static unsigned jb_framelist_size( jb_framelist_t *framelist)214 static unsigned jb_framelist_size(const jb_framelist_t *framelist) 215 215 { 216 216 return framelist->size; … … 469 469 PJ_DEF(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb) 470 470 { 471 TRACE__((jb->jb_name.ptr, " \n"472 " JB summary:\n"473 " size=%d prefetch=%d\n"474 " delay (min/max/avg/dev)=%d/%d/%d/%d ms\n"475 " burst (min/max/avg/dev)=%d/%d/%d/%d frames\n"476 " lost=%d discard=%d empty=%d\n",471 TRACE__((jb->jb_name.ptr, "" 472 "JB summary:" 473 " size=%d prefetch=%d," 474 " delay (min/max/avg/dev)=%d/%d/%d/%d ms," 475 " burst (min/max/avg/dev)=%d/%d/%d/%d frames," 476 " lost=%d discard=%d empty=%d", 477 477 jb->jb_framelist.size, jb->jb_prefetch, 478 478 jb->jb_delay.min, jb->jb_delay.max, jb->jb_delay.mean, … … 766 766 * Get jitter buffer state. 767 767 */ 768 PJ_DEF(pj_status_t) pjmedia_jbuf_get_state( pjmedia_jbuf *jb,768 PJ_DEF(pj_status_t) pjmedia_jbuf_get_state( const pjmedia_jbuf *jb, 769 769 pjmedia_jb_state *state ) 770 770 { -
pjproject/trunk/pjmedia/src/pjmedia/session.c
r2394 r2844 858 858 #endif 859 859 860 PJ_DEF(pj_status_t) pjmedia_session_get_stream_stat_jbuf( 861 pjmedia_session *session, 862 unsigned index, 863 pjmedia_jb_state *state) 864 { 865 PJ_ASSERT_RETURN(session && state && index < session->stream_cnt, 866 PJ_EINVAL); 867 868 return pjmedia_stream_get_stat_jbuf(session->stream[index], state); 869 } 870 860 871 /* 861 872 * Dial DTMF digit to the stream, using RFC 2833 mechanism. -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r2834 r2844 328 328 if (frame_type != stream->jb_last_frm) { 329 329 pjmedia_jb_state jb_state; 330 const char *with_plc = ""; 330 331 331 332 /* Activate PLC to smoothen the missing frame */ … … 347 348 } while (samples_count < samples_required); 348 349 350 with_plc = ", plc invoked"; 349 351 } 350 352 … … 352 354 pjmedia_jbuf_get_state(stream->jb, &jb_state); 353 355 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)); 356 358 357 359 } … … 1880 1882 jb_init = 0; 1881 1883 1882 1883 1884 /* Create jitter buffer */ 1884 1885 status = pjmedia_jbuf_create(pool, &stream->port.info.name, … … 2171 2172 } 2172 2173 #endif 2174 2175 /* 2176 * Get jitter buffer state. 2177 */ 2178 PJ_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 } 2173 2184 2174 2185 /*
Note: See TracChangeset
for help on using the changeset viewer.