Ignore:
Timestamp:
Apr 6, 2006 7:29:03 PM (18 years ago)
Author:
bennylp
Message:

Integrate (stream) quality monitoring into RTCP framework, and update all RTCP clients accordingly

File:
1 edited

Legend:

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

    r214 r390  
    181181 
    182182/** 
     183 * This structure is used to receive additional information about the 
     184 * state of incoming RTP packet. 
     185 */ 
     186struct pjmedia_rtp_status 
     187{ 
     188    union { 
     189        struct flag { 
     190            int bad:1;      /**< General flag to indicate that sequence is 
     191                                 bad, and application should not process 
     192                                 this packet. More information will be given 
     193                                 in other flags.                            */ 
     194            int badpt:1;    /**< Bad payload type.                          */ 
     195            int dup:1;      /**< Indicates duplicate packet                 */ 
     196            int outorder:1; /**< Indicates out of order packet              */ 
     197            int probation:1;/**< Indicates that session is in probation 
     198                                 until more packets are received.           */ 
     199            int restart:1;  /**< Indicates that sequence number has made 
     200                                 a large jump, and internal base sequence 
     201                                 number has been adjusted.                  */ 
     202        } flag;             /**< Status flags.                              */ 
     203 
     204        pj_uint16_t value;  /**< Status value, to conveniently address all 
     205                                 flags.                                     */ 
     206 
     207    } status;               /**< Status information union.                  */ 
     208 
     209    pj_uint16_t diff;       /**< Sequence number difference from previous 
     210                                 packet. Normally the value should be 1.     
     211                                 Value greater than one may indicate packet 
     212                                 loss. If packet with lower sequence is 
     213                                 received, the value will be set to zero. 
     214                                 If base sequence has been restarted, the 
     215                                 value will be one.                         */ 
     216}; 
     217 
     218/** 
     219 * @see pjmedia_rtp_status 
     220 */ 
     221typedef struct pjmedia_rtp_status pjmedia_rtp_status; 
     222 
     223 
     224/** 
    183225 * This function will initialize the RTP session according to given parameters. 
    184226 * 
     
    242284 * @param ses       The session. 
    243285 * @param hdr       The RTP header of the incoming packet. 
    244  * 
    245  * @return          PJ_SUCCESS if the packet is valid and can be processed,  
    246  *                  otherwise will return the appropriate status code. 
    247  */ 
    248 PJ_DECL(pj_status_t) pjmedia_rtp_session_update( pjmedia_rtp_session *ses,  
    249                                                  const pjmedia_rtp_hdr *hdr); 
     286 * @param seq_st    Optional structure to receive the status of the RTP packet 
     287 *                  processing. 
     288 */ 
     289PJ_DECL(void) pjmedia_rtp_session_update( pjmedia_rtp_session *ses,  
     290                                          const pjmedia_rtp_hdr *hdr, 
     291                                          pjmedia_rtp_status *seq_st); 
    250292 
    251293 
     
    266308 
    267309/**  
    268  * Internal function to restart the sequence number control, shared by RTCP  
    269  * implementation.  
    270  * 
    271  * @param seq_ctrl  The sequence control instance. 
    272  * @param seq       Sequence number to restart. 
    273  */ 
    274 void pjmedia_rtp_seq_restart(pjmedia_rtp_seq_session *seq_ctrl,  
    275                              pj_uint16_t seq); 
    276  
    277 /**  
    278310 * Internal function update sequence control, shared by RTCP implementation. 
    279311 * 
    280  * @param seq_ctrl  The sequence control instance. 
    281  * @param seq       Sequence number to update. 
    282  * 
    283  * @return          PJ_SUCCESS if the sequence number can be accepted. 
    284  */ 
    285 pj_status_t pjmedia_rtp_seq_update(pjmedia_rtp_seq_session *seq_ctrl,  
    286                                    pj_uint16_t seq); 
     312 * @param seq_ctrl      The sequence control instance. 
     313 * @param seq           Sequence number to update. 
     314 * @param seq_status    Optional structure to receive additional information  
     315 *                      about the packet. 
     316 */ 
     317void pjmedia_rtp_seq_update( pjmedia_rtp_seq_session *seq_ctrl,  
     318                             pj_uint16_t seq, 
     319                             pjmedia_rtp_status *seq_status); 
    287320 
    288321/** 
Note: See TracChangeset for help on using the changeset viewer.