Ignore:
Timestamp:
Apr 5, 2006 12:53:42 PM (18 years ago)
Author:
bennylp
Message:

Added RTCP end to end delay calculation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/rtcp.h

    r382 r383  
    117117{ 
    118118    pjmedia_rtcp_common  common;        /**< Common header.         */ 
    119     pjmedia_rtcp_sr sr;         /**< Sender report.         */ 
    120     pjmedia_rtcp_rr rr;         /**< variable-length list   */ 
     119    pjmedia_rtcp_sr      sr;            /**< Sender report.         */ 
     120    pjmedia_rtcp_rr      rr;            /**< variable-length list   */ 
    121121}; 
    122122 
     
    147147 
    148148/** 
    149  * RTCP session. 
     149 * RTCP session is used to monitor the RTP session of one endpoint. There 
     150 * should only be one RTCP session for a bidirectional RTP streams. 
    150151 */ 
    151152struct pjmedia_rtcp_session 
     
    155156    pjmedia_rtp_seq_session seq_ctrl;   /**< RTCP sequence number control.  */ 
    156157 
    157     unsigned        clock_rate;     /**< Clock rate.                        */ 
    158     pj_uint32_t     received;       /**< # pkts received                    */ 
    159     pj_uint32_t     expected_prior; /**< # pkts expected at last interval   */ 
    160     pj_uint32_t     received_prior; /**< # pkts received at last interval   */ 
    161     pj_int32_t      transit;        /**< Relative trans time for prev pkt   */ 
    162     pj_uint32_t     jitter;         /**< Estimated jitter                   */ 
    163     pj_timestamp    ts_freq;        /**< System timestamp frequency.        */ 
    164  
    165     pjmedia_rtcp_ntp_rec rtcp_lsr;       /**< NTP ts in last SR received    */ 
    166     unsigned             rtcp_lsr_time;  /**< Time when last SR is received.*/ 
    167     pj_uint32_t          peer_ssrc;      /**< Peer SSRC                     */ 
    168      
     158    unsigned                clock_rate; /**< Clock rate of the stream       */ 
     159    pj_uint32_t             received;   /**< # pkt received                 */ 
     160    pj_uint32_t             exp_prior;  /**< # pkt expected at last interval*/ 
     161    pj_uint32_t             rx_prior;   /**< # pkt received at last interval*/ 
     162    pj_int32_t              transit;    /**< Rel transit time for prev pkt  */ 
     163    pj_uint32_t             jitter;     /**< Scaled jitter                  */ 
     164    pj_timestamp            ts_freq;    /**< System timestamp frequency.    */ 
     165 
     166    pjmedia_rtcp_ntp_rec    rtcp_lsr;    /**< NTP ts in last SR received    */ 
     167    pj_timestamp            rtcp_lsr_time;/**< Time when last SR is received*/ 
     168    pj_uint32_t             peer_ssrc;   /**< Peer SSRC                     */ 
     169    unsigned                ee_delay;   /**< End-to-end delay, in msec.     */ 
    169170}; 
    170171 
     
    220221 
    221222/** 
    222  * Build a RTCP SR/RR packet to be transmitted to remote RTP peer. 
    223  * @param session The session. 
    224  * 
    225  * @param rtcp_pkt  [output] Upon return, it will contain pointer to the  
     223 * Call this function when an RTCP packet is received from remote peer. 
     224 * This RTCP packet received from remote is used to calculate the end-to- 
     225 * end delay of the network. 
     226 * 
     227 * @param session   RTCP session. 
     228 * @param rtcp_pkt  The received RTCP packet. 
     229 * @param size      Size of the incoming packet. 
     230 */ 
     231PJ_DECL(void) pjmedia_rtcp_rx_rtcp( pjmedia_rtcp_session *session, 
     232                                    const void *rtcp_pkt, 
     233                                    pj_size_t size); 
     234 
     235 
     236/** 
     237 * Build a RTCP SR+RR packet to be transmitted to remote RTP peer. 
     238 * Note that this function will reset the interval counters (such as 
     239 * the ones to calculate fraction lost) in the session. 
     240 * 
     241 * @param session   The RTCP session. 
     242 * @param rtcp_pkt  Upon return, it will contain pointer to the  
    226243 *                  RTCP packet. 
    227  * @param len       [output] Upon return, it will indicate the size of  
     244 * @param len       Upon return, it will indicate the size of  
    228245 *                  the RTCP packet. 
    229246 */ 
    230247PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session,  
    231248                                       pjmedia_rtcp_pkt **rtcp_pkt,  
    232                                        int *len ); 
     249                                       int *len); 
    233250 
    234251 
Note: See TracChangeset for help on using the changeset viewer.