Home --> Documentations --> PJMEDIA Reference

Data Structures | Enumerations | Functions
ICE Media Transport

Interactive Connectivity Establishment (ICE) transport. More...

Data Structures

struct  pjmedia_ice_cb
 
struct  pjmedia_ice_transport_info
 

Enumerations

enum  pjmedia_transport_ice_options { PJMEDIA_ICE_NO_SRC_ADDR_CHECKING = 1 }
 

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)
 
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)
 
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)
 
pj_grp_lock_tpjmedia_ice_get_grp_lock (pjmedia_transport *tp)
 

Detailed Description

This describes the implementation of media transport using Interactive Connectivity Establishment (ICE) protocol.

Enumeration Type Documentation

Options that can be specified when creating ICE transport.

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.

Function Documentation

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
endptThe media endpoint.
nameOptional name to identify this ICE media transport for logging purposes.
comp_cntNumber of components to be created.
cfgPointer to configuration settings.
cbOptional structure containing ICE specific callbacks.
p_tpPointer 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
endptThe media endpoint.
nameOptional name to identify this ICE media transport for logging purposes.
comp_cntNumber of components to be created.
cfgPointer to configuration settings.
cbOptional structure containing ICE specific callbacks.
optionsOptions, see pjmedia_transport_ice_options.
p_tpPointer 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
endptThe media endpoint.
nameOptional name to identify this ICE media transport for logging purposes.
comp_cntNumber of components to be created.
cfgPointer to configuration settings.
cbOptional structure containing ICE specific callbacks.
optionsOptions, see pjmedia_transport_ice_options.
user_dataUser data to be attached to the transport.
p_tpPointer 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
tpThe ICE media transport.
Returns
The group lock.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.