Home --> Documentations --> PJMEDIA Reference

Sample Transport Adapter

Example on how to create transport adapter. More...


PJ_BEGIN_DECL pj_status_t pjmedia_tp_adapter_create (pjmedia_endpt *endpt, const char *name, pjmedia_transport *base_tp, pj_bool_t del_base, pjmedia_transport **p_tp)

Detailed Description

This describes a sample implementation of transport adapter, similar to the way the SRTP transport adapter works.

Function Documentation

◆ pjmedia_tp_adapter_create()

PJ_BEGIN_DECL pj_status_t pjmedia_tp_adapter_create ( pjmedia_endpt endpt,
const char *  name,
pjmedia_transport base_tp,
pj_bool_t  del_base,
pjmedia_transport **  p_tp 

Create the transport adapter, specifying the underlying transport to be used to send and receive RTP/RTCP packets.

endptThe media endpoint.
nameOptional name to identify this media transport for logging purposes.
base_tpThe base/underlying media transport to send and receive RTP/RTCP packets.
del_baseSpecify whether the base transport should also be destroyed when destroy() is called upon us.
p_tpPointer to receive the media transport instance.
PJ_SUCCESS on success, or the appropriate error code.


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