Group PJMEDIA_TRANSPORT_ADAPTER_SAMPLE

group PJMEDIA_TRANSPORT_ADAPTER_SAMPLE

Example on how to create transport adapter.

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

Functions

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.

Parameters:
  • endpt – The media endpoint.

  • name – Optional name to identify this media transport for logging purposes.

  • base_tp – The base/underlying media transport to send and receive RTP/RTCP packets.

  • del_base – Specify whether the base transport should also be destroyed when destroy() is called upon us.

  • p_tp – Pointer to receive the media transport instance.

Returns:

PJ_SUCCESS on success, or the appropriate error code.