Ignore:
Timestamp:
Dec 28, 2016 3:40:07 AM (7 years ago)
Author:
nanang
Message:

Re #1900: More merged from trunk (r5512 mistakenly contains merged changes in third-party dir only).

Location:
pjproject/branches/projects/uwp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/uwp

  • pjproject/branches/projects/uwp/pjsip/include/pjsua-lib/pjsua.h

    r5185 r5513  
    13671367 
    13681368    /** 
     1369     * This callback is called when SRTP media transport is created. 
     1370     * Application can modify the SRTP setting \a srtp_opt to specify 
     1371     * the cryptos and keys which are going to be used. Note that 
     1372     * application should not modify the field 
     1373     * \a pjmedia_srtp_setting.close_member_tp and can only modify 
     1374     * the field \a pjmedia_srtp_setting.use for initial INVITE. 
     1375     * 
     1376     * @param call_id       Call ID 
     1377     * @param media_idx     The media index in the SDP for which this SRTP 
     1378     *                      media transport will be used. 
     1379     * @param srtp_opt      The SRTP setting. Application can modify this. 
     1380     */ 
     1381    void (*on_create_media_transport_srtp)(pjsua_call_id call_id, 
     1382                                           unsigned media_idx, 
     1383                                           pjmedia_srtp_setting *srtp_opt); 
     1384 
     1385    /** 
    13691386     * This callback can be used by application to override the account 
    13701387     * to be used to handle an incoming message. Initially, the account to 
     
    15781595 
    15791596    /** 
    1580      * This specifies if the library startup should ignore failure with the 
     1597     * This specifies if the library should ignore failure with the 
    15811598     * STUN servers. If this is set to PJ_FALSE, the library will refuse to 
    15821599     * start if it fails to resolve or contact any of the STUN servers. 
     1600     * 
     1601     * This setting will also determine what happens if STUN servers are 
     1602     * unavailable during runtime (if set to PJ_FALSE, calls will 
     1603     * directly fail, otherwise (if PJ_TRUE) call medias will 
     1604     * fallback to proceed as though not using STUN servers. 
    15831605     * 
    15841606     * Default: PJ_TRUE 
     
    20442066    pj_sockaddr      addr; 
    20452067 
     2068    /** 
     2069     * The index of the usable STUN server. 
     2070     */ 
     2071    unsigned         index; 
    20462072}; 
    20472073 
     
    20832109 */ 
    20842110PJ_DECL(pj_status_t) pjsua_get_nat_type(pj_stun_nat_type *type); 
     2111 
     2112 
     2113/** 
     2114 * Update the STUN servers list. The #pjsua_init() must have been called 
     2115 * before calling this function. 
     2116 * 
     2117 * @param count         Number of STUN server entries. 
     2118 * @param srv           Array of STUN server entries to try. Please see 
     2119 *                      the \a stun_srv field in the #pjsua_config  
     2120 *                      documentation about the format of this entry. 
     2121 * @param wait          Specify non-zero to make the function block until 
     2122 *                      it gets the result. In this case, the function 
     2123 *                      will block while the resolution is being done, 
     2124 *                      and the callback will be called before this function 
     2125 *                      returns. 
     2126 * 
     2127 * @return              If \a wait parameter is non-zero, this will return 
     2128 *                      PJ_SUCCESS if one usable STUN server is found. 
     2129 *                      Otherwise it will always return PJ_SUCCESS, and 
     2130 *                      application will be notified about the result in 
     2131 *                      the callback #on_stun_resolution_complete. 
     2132 */ 
     2133PJ_DECL(pj_status_t) pjsua_update_stun_servers(unsigned count, pj_str_t srv[], 
     2134                                               pj_bool_t wait); 
    20852135 
    20862136 
     
    27232773     * this setting has no effect. 
    27242774     */ 
    2725     PJSUA_STUN_USE_DISABLED 
     2775    PJSUA_STUN_USE_DISABLED, 
     2776     
     2777    /** 
     2778     * Retry other STUN servers if the STUN server selected during 
     2779     * startup (#pjsua_init()) or after calling #pjsua_update_stun_servers() 
     2780     * is unavailable during runtime. This setting is valid only for 
     2781     * account's media STUN setting and if the call is using UDP media 
     2782     * transport. 
     2783     */ 
     2784    PJSUA_STUN_RETRY_ON_FAILURE 
    27262785 
    27272786} pjsua_stun_use; 
     
    28942953     */ 
    28952954    pjsip_hdr       reg_hdr_list; 
     2955 
     2956    /** 
     2957     * Additional parameters that will be appended in the Contact header 
     2958     * for this account. This will only affect REGISTER requests and 
     2959     * will be appended after \a contact_params; 
     2960     * 
     2961     * The parameters should be preceeded by semicolon, and all strings must 
     2962     * be properly escaped. Example: 
     2963     *   ";my-param=X;another-param=Hi%20there" 
     2964     */ 
     2965    pj_str_t        reg_contact_params; 
    28962966 
    28972967    /**  
     
    32653335 
    32663336    /** 
     3337     * Specify the send keyframe config for video stream. 
     3338     * 
     3339     * Default: see #pjmedia_vid_stream_sk_config 
     3340     */ 
     3341    pjmedia_vid_stream_sk_config vid_stream_sk_cfg; 
     3342 
     3343    /** 
    32673344     * Media transport config. 
    32683345     */ 
     
    32843361     * Control the use of STUN for the media transports. 
    32853362     * 
    3286      * Default: PJSUA_STUN_USE_DEFAULT 
     3363     * Default: PJSUA_STUN_RETRY_ON_FAILURE 
    32873364     */ 
    32883365    pjsua_stun_use              media_stun_use; 
     
    42084285     * PJSUA_CALL_UNHOLD will take precedence over this flag. 
    42094286     */ 
    4210     PJSUA_CALL_NO_SDP_OFFER = 8 
     4287    PJSUA_CALL_NO_SDP_OFFER = 8, 
     4288 
     4289    /** 
     4290     * Deinitialize and recreate media, including media transport. This flag 
     4291     * is useful in IP address change situation, if the media transport 
     4292     * address (or address family) changes, for example during IPv4/IPv6 
     4293     * network handover. 
     4294     * This flag is only valid for #pjsua_call_reinvite()/reinvite2(), or 
     4295     * #pjsua_call_update()/update2(). 
     4296     * 
     4297     * Warning: If the re-INVITE/UPDATE fails, the old media will not be 
     4298     * reverted. 
     4299     */ 
     4300    PJSUA_CALL_REINIT_MEDIA = 16, 
     4301     
     4302    /** 
     4303     * Update the local invite session's Via with the via address from 
     4304     * the account. This flag is only valid for #pjsua_call_set_hold2(), 
     4305     * #pjsua_call_reinvite() and #pjsua_call_update(). Similar to 
     4306     * the flag PJSUA_CALL_UPDATE_CONTACT above, this flag is useful 
     4307     * in IP address change situation, after the local account's Via has 
     4308     * been updated (typically with re-registration). 
     4309     */ 
     4310    PJSUA_CALL_UPDATE_VIA = 32 
    42114311 
    42124312} pjsua_call_flag; 
     
    48124912 
    48134913/** 
    4814  * Send DTMF digits to remote using RFC 2833 payload formats.  
     4914 * Send DTMF digits to remote using RFC 2833 payload formats. 
    48154915 * 
    48164916 * @param call_id       Call identification. 
    48174917 * @param digits        DTMF string digits to be sent as described on RFC 2833  
    4818  *                      section 3.10. Character 'R' is used to represent the  
     4918 *                      section 3.10. If PJMEDIA_HAS_DTMF_FLASH is enabled,  
     4919 *                      character 'R' is used to represent the  
    48194920 *                      event type 16 (flash) as stated in RFC 4730. 
    48204921 * 
     
    59976098} pjsua_media_transport; 
    59986099 
     6100/** 
     6101 * This enumeration specifies the sound device mode. 
     6102 */ 
     6103typedef enum pjsua_snd_dev_mode 
     6104{ 
     6105    /** 
     6106     * Open sound device without mic (speaker only). 
     6107     */ 
     6108    PJSUA_SND_DEV_SPEAKER_ONLY = 1, 
     6109 
     6110    /** 
     6111     * Do not open sound device, after setting the sound device. 
     6112     */ 
     6113    PJSUA_SND_DEV_NO_IMMEDIATE_OPEN  = 2 
     6114 
     6115} pjsua_snd_dev_mode; 
     6116 
     6117 
     6118/** 
     6119 * This structure specifies the parameters to set the sound device. 
     6120 * Use pjsua_snd_dev_param_default() to initialize this structure with 
     6121 * default values. 
     6122 */ 
     6123typedef struct pjsua_snd_dev_param 
     6124{ 
     6125    /* 
     6126     * Capture dev id. 
     6127     * 
     6128     * Default: PJMEDIA_AUD_DEFAULT_CAPTURE_DEV 
     6129     */ 
     6130    int                 capture_dev; 
     6131 
     6132    /* 
     6133     * Playback dev id. 
     6134     * 
     6135     * Default: PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV 
     6136     */ 
     6137    int                 playback_dev; 
     6138 
     6139    /* 
     6140     * Sound device mode, refer to #pjsua_snd_dev_mode. 
     6141     * 
     6142     * Default: 0 
     6143     */ 
     6144    unsigned            mode; 
     6145 
     6146} pjsua_snd_dev_param; 
     6147 
     6148 
     6149/** 
     6150 * Initialize pjsua_snd_dev_param with default values. 
     6151 * 
     6152 * @param prm           The parameter. 
     6153 */ 
     6154PJ_DECL(void) pjsua_snd_dev_param_default(pjsua_snd_dev_param *prm); 
     6155 
    59996156 
    60006157/** 
     
    63846541                                       int playback_dev); 
    63856542 
     6543/** 
     6544 * Select or change sound device according to the specified param. 
     6545 * 
     6546 * @param snd_param     Sound device param.  
     6547 * 
     6548 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     6549 */ 
     6550PJ_DECL(pj_status_t) pjsua_set_snd_dev2(pjsua_snd_dev_param *snd_param); 
     6551 
    63866552 
    63876553/** 
Note: See TracChangeset for help on using the changeset viewer.