Ignore:
Timestamp:
Jul 9, 2013 7:17:39 AM (10 years ago)
Author:
ming
Message:

Closed #1687: Allow media type change during SDP negotiation

File:
1 edited

Legend:

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

    r3664 r4554  
    314314 
    315315/** 
     316 * Flags to be given to pjmedia_sdp_neg_modify_local_offer2(). 
     317 */ 
     318typedef enum pjmedia_mod_offer_flag 
     319{ 
     320   /** 
     321    * Allow media type in the SDP to be changed. 
     322    * When generating a new offer, in the case that a media line doesn't match 
     323    * the active SDP, the new media line will be considered to replace the 
     324    * existing media at the same position. 
     325    */ 
     326   PJMEDIA_SDP_NEG_ALLOW_MEDIA_CHANGE = 1 
     327 
     328} pjmedia_mod_offer_flag; 
     329 
     330 
     331/** 
    316332 * Get the state string description of the specified state. 
    317333 * 
     
    494510pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg, 
    495511                               const pjmedia_sdp_session **local); 
     512 
     513/** 
     514 * Modify local session with a new SDP and treat this as a new offer.  
     515 * This function can only be called in state PJMEDIA_SDP_NEG_STATE_DONE. 
     516 * After calling this function, application can send the SDP as offer  
     517 * to remote party, using signaling protocol such as SIP. 
     518 * The negotiator state will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, 
     519 * where it waits for SDP answer from remote. See also 
     520 * #pjmedia_sdp_neg_modify_local_offer2() 
     521 * 
     522 * @param pool          Pool to allocate memory. The pool's lifetime needs 
     523 *                      to be valid for the duration of the negotiator. 
     524 * @param neg           The SDP negotiator instance. 
     525 * @param local         The new local SDP. 
     526 * 
     527 * @return              PJ_SUCCESS on success, or the appropriate 
     528 *                      error code. 
     529 */ 
     530PJ_DECL(pj_status_t)  
     531pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, 
     532                                    pjmedia_sdp_neg *neg, 
     533                                    const pjmedia_sdp_session *local); 
    496534 
    497535/** 
     
    506544 *                      to be valid for the duration of the negotiator. 
    507545 * @param neg           The SDP negotiator instance. 
     546 * @param flags         Bitmask from pjmedia_mod_offer_flag. 
    508547 * @param local         The new local SDP. 
    509548 * 
     
    512551 */ 
    513552PJ_DECL(pj_status_t)  
    514 pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool, 
    515                                     pjmedia_sdp_neg *neg, 
    516                                     const pjmedia_sdp_session *local); 
     553pjmedia_sdp_neg_modify_local_offer2( pj_pool_t *pool, 
     554                                     pjmedia_sdp_neg *neg, 
     555                                     unsigned flags, 
     556                                     const pjmedia_sdp_session *local); 
    517557 
    518558/** 
Note: See TracChangeset for help on using the changeset viewer.