Ignore:
Timestamp:
Feb 9, 2006 2:01:40 PM (18 years ago)
Author:
bennylp
Message:

Updated with new jitter buffer, and statistics in pjsua

File:
1 edited

Legend:

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

    r164 r169  
    234234 
    235235    /* 
    236      * Now create the stream! 
     236     * Now create and start the stream! 
    237237     */ 
    238238    for (i=0; i<(int)stream_cnt; ++i) { 
     
    241241                                       &session->stream_info[i], 
    242242                                       &session->stream[i]); 
     243        if (status == PJ_SUCCESS) 
     244            status = pjmedia_stream_start(session->stream[i]); 
     245 
    243246        if (status != PJ_SUCCESS) { 
    244247 
     
    260263 
    261264 
     265/* 
     266 * Get session info. 
     267 */ 
     268PJ_DEF(pj_status_t) pjmedia_session_get_info( pjmedia_session *session, 
     269                                              pjmedia_session_info *info ) 
     270{ 
     271    PJ_ASSERT_RETURN(session && info, PJ_EINVAL); 
     272 
     273    info->stream_cnt = session->stream_cnt; 
     274    pj_memcpy(info->stream_info, session->stream_info, 
     275              session->stream_cnt * sizeof(pjmedia_stream_info)); 
     276 
     277    return PJ_SUCCESS; 
     278} 
     279 
     280 
    262281/** 
    263282 * Destroy media session. 
     
    369388 * Get statistics 
    370389 */ 
    371 PJ_DEF(pj_status_t) pjmedia_session_get_stat(const pjmedia_session *session,  
    372                                              unsigned *count, 
    373                                              pjmedia_stream_stat stat[]) 
    374 { 
    375     PJ_ASSERT_RETURN(session && count && *count && stat, PJ_EINVAL); 
    376  
    377     *count = 0; 
    378     pj_memset(stat, 0, *count * sizeof(pjmedia_stream_stat)); 
    379     return PJ_EINVALIDOP; 
    380 } 
    381  
    382  
    383 /** 
    384  * Get individual stream statistic. 
    385  */ 
    386 PJ_DEF(pj_status_t) pjmedia_session_get_stream_stat( const pjmedia_session *s, 
     390PJ_DEF(pj_status_t) pjmedia_session_get_stream_stat( pjmedia_session *session, 
    387391                                                     unsigned index, 
    388392                                                     pjmedia_stream_stat *stat) 
    389393{ 
    390     PJ_ASSERT_RETURN(s && index < s->stream_cnt && stat, PJ_EINVAL); 
    391     pj_memset(stat, 0, sizeof(pjmedia_stream_stat)); 
    392     return PJ_EINVALIDOP; 
    393 } 
    394  
    395  
     394    PJ_ASSERT_RETURN(session && stat && index < session->stream_cnt,  
     395                     PJ_EINVAL); 
     396 
     397    return pjmedia_stream_get_stat(session->stream[index], stat); 
     398} 
     399 
     400 
Note: See TracChangeset for help on using the changeset viewer.