Ignore:
Timestamp:
Apr 29, 2008 5:15:41 PM (12 years ago)
Author:
nanang
Message:

More on ticket #513:

  • Added RTCP XR print reports to streamutil.c
  • Added new API pjmedia_stream_get_stat_xr()
  • Added field rtcp_xr_enabled to stream info structure
  • Swapped the wrong RTCP XR statistic storage (encoding direction should be stored in TX, decoding direction in RX, it was the opposite)
File:
1 edited

Legend:

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

    r1942 r1943  
    15581558    stream->transport = tp; 
    15591559 
    1560 #if PJMEDIA_HAS_RTCP_XR && PJMEDIA_STREAM_ENABLE_XR 
    1561     /* Enable RTCP XR and update some settings */ 
    1562     { 
     1560#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) 
     1561    /* Enable RTCP XR and update stream info/config to RTCP XR */ 
     1562    if (info->rtcp_xr_enabled) { 
    15631563        int i; 
     1564 
    15641565        pjmedia_rtcp_enable_xr(&stream->rtcp, PJ_TRUE); 
    15651566 
     
    17141715} 
    17151716 
     1717#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) 
     1718/* 
     1719 * Get stream extended statistics. 
     1720 */ 
     1721PJ_DEF(pj_status_t) pjmedia_stream_get_stat_xr( const pjmedia_stream *stream, 
     1722                                                pjmedia_rtcp_xr_stat *stat) 
     1723{ 
     1724    PJ_ASSERT_RETURN(stream && stat, PJ_EINVAL); 
     1725 
     1726    if (stream->rtcp.xr_enabled) { 
     1727        pj_memcpy(stat, &stream->rtcp.xr_session.stat, sizeof(pjmedia_rtcp_xr_stat)); 
     1728        return PJ_SUCCESS; 
     1729    } 
     1730    return PJ_ENOTFOUND; 
     1731} 
     1732#endif 
    17161733 
    17171734/* 
Note: See TracChangeset for help on using the changeset viewer.