Group PJMEDIA_TRANSPORT_ICE¶
- group PJMEDIA_TRANSPORT_ICE
Interactive Connectivity Establishment (ICE) transport.
This describes the implementation of media transport using Interactive Connectivity Establishment (ICE) protocol.
Enums
-
enum pjmedia_transport_ice_options¶
Options that can be specified when creating ICE transport.
Values:
-
enumerator PJMEDIA_ICE_NO_SRC_ADDR_CHECKING¶
Normally when remote doesn’t use ICE, the ICE transport will continuously check the source address of incoming packets to see if it is different than the configured remote address, and switch the remote address to the source address of the packet if they are different after several packets are received. Specifying this option will disable this feature.
-
enumerator PJMEDIA_ICE_NO_SRC_ADDR_CHECKING¶
Functions
-
pj_status_t pjmedia_ice_create(pjmedia_endpt *endpt, const char *name, unsigned comp_cnt, const pj_ice_strans_cfg *cfg, const pjmedia_ice_cb *cb, pjmedia_transport **p_tp)¶
Create the Interactive Connectivity Establishment (ICE) media transport using the specified configuration. When STUN or TURN (or both) is used, the creation operation will complete asynchronously, when STUN resolution and TURN allocation completes. When the initialization completes, the on_ice_complete() complete will be called with op parameter equal to PJ_ICE_STRANS_OP_INIT.
In addition, this transport will also notify the application about the result of ICE negotiation, also in on_ice_complete() callback. In this case the callback will be called with op parameter equal to PJ_ICE_STRANS_OP_NEGOTIATION.
Other than this, application should use the Media Transport API to manipulate this media transport.
- Parameters
endpt – The media endpoint.
name – Optional name to identify this ICE media transport for logging purposes.
comp_cnt – Number of components to be created.
cfg – Pointer to configuration settings.
cb – Optional structure containing ICE specific callbacks.
p_tp – Pointer to receive the media transport instance.
- Returns
PJ_SUCCESS on success, or the appropriate error code.
-
pj_status_t pjmedia_ice_create2(pjmedia_endpt *endpt, const char *name, unsigned comp_cnt, const pj_ice_strans_cfg *cfg, const pjmedia_ice_cb *cb, unsigned options, pjmedia_transport **p_tp)¶
The same as pjmedia_ice_create() with additional options param.
- Parameters
endpt – The media endpoint.
name – Optional name to identify this ICE media transport for logging purposes.
comp_cnt – Number of components to be created.
cfg – Pointer to configuration settings.
cb – Optional structure containing ICE specific callbacks.
options – Options, see pjmedia_transport_ice_options.
p_tp – Pointer to receive the media transport instance.
- Returns
PJ_SUCCESS on success, or the appropriate error code.
-
pj_status_t pjmedia_ice_create3(pjmedia_endpt *endpt, const char *name, unsigned comp_cnt, const pj_ice_strans_cfg *cfg, const pjmedia_ice_cb *cb, unsigned options, void *user_data, pjmedia_transport **p_tp)¶
The same as pjmedia_ice_create2() with additional user_data param.
- Parameters
endpt – The media endpoint.
name – Optional name to identify this ICE media transport for logging purposes.
comp_cnt – Number of components to be created.
cfg – Pointer to configuration settings.
cb – Optional structure containing ICE specific callbacks.
options – Options, see pjmedia_transport_ice_options.
user_data – User data to be attached to the transport.
p_tp – Pointer to receive the media transport instance.
- Returns
PJ_SUCCESS on success, or the appropriate error code.
-
pj_grp_lock_t *pjmedia_ice_get_grp_lock(pjmedia_transport *tp)¶
Get the group lock for the ICE media transport.
- Parameters
tp – The ICE media transport.
- Returns
The group lock.
-
pj_status_t pjmedia_ice_add_ice_cb(pjmedia_transport *tp, const pjmedia_ice_cb *cb, void *user_data)¶
Add application to receive ICE notifications from the specified ICE media transport.
- Parameters
tp – The ICE media transport.
cb – The ICE specific callbacks.
user_data – Optional application user data.
- Returns
PJ_SUCCESS on success, or the appropriate error code.
-
pj_status_t pjmedia_ice_remove_ice_cb(pjmedia_transport *tp, const pjmedia_ice_cb *cb, void *user_data)¶
Remove application to stop receiving ICE notifications from the specified ICE media transport.
- Parameters
tp – The ICE media transport.
cb – The ICE specific callbacks.
user_data – Optional application user data. The same user data passed to pjmedia_ice_add_ice_cb(), this is for validation purpose.
- Returns
PJ_SUCCESS on success, or the appropriate error code.
-
struct pjmedia_ice_cb¶
- #include <transport_ice.h>
Structure containing callbacks to receive ICE notifications.
-
struct pjmedia_ice_transport_info¶
- #include <transport_ice.h>
This structure specifies ICE transport specific info. This structure will be filled in media transport specific info.
-
enum pjmedia_transport_ice_options¶