WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

Loopback Media Transport

Loopback transport for testing. More...

Data Structures

struct  pjmedia_loop_tp_setting
 

Functions

void pjmedia_loop_tp_setting_default (pjmedia_loop_tp_setting *opt)
 
pj_status_t pjmedia_transport_loop_create (pjmedia_endpt *endpt, pjmedia_transport **p_tp)
 
pj_status_t pjmedia_transport_loop_create2 (pjmedia_endpt *endpt, const pjmedia_loop_tp_setting *opt, pjmedia_transport **p_tp)
 
pj_status_t pjmedia_transport_loop_disable_rx (pjmedia_transport *tp, void *user, pj_bool_t disabled)
 

Detailed Description

This is the loopback media transport, where packets sent to this transport will be sent back to the streams attached to this transport. Unlike the other PJMEDIA transports, the loop transport may be attached to multiple streams (in other words, application should specify the same loop transport instance when calling pjmedia_stream_create()). Any RTP or RTCP packets sent by one stream to this transport by default will be sent back to all streams that are attached to this transport, including to the stream that sends the packet. Application may individually select which stream to receive packets by calling pjmedia_transport_loop_disable_rx().

Function Documentation

◆ pjmedia_loop_tp_setting_default()

void pjmedia_loop_tp_setting_default ( pjmedia_loop_tp_setting opt)

Initialize loopback media transport setting with its default values.

Parameters
optSRTP setting to be initialized.

◆ pjmedia_transport_loop_create()

pj_status_t pjmedia_transport_loop_create ( pjmedia_endpt endpt,
pjmedia_transport **  p_tp 
)

Create the loopback transport.

Parameters
endptThe media endpoint instance.
p_tpPointer to receive the transport instance.
Returns
PJ_SUCCESS on success.

◆ pjmedia_transport_loop_create2()

pj_status_t pjmedia_transport_loop_create2 ( pjmedia_endpt endpt,
const pjmedia_loop_tp_setting opt,
pjmedia_transport **  p_tp 
)

Create the loopback transport.

Parameters
endptThe media endpoint instance.
optOptional settings. If NULL is given, default settings will be used.
p_tpPointer to receive the transport instance.
Returns
PJ_SUCCESS on success.

◆ pjmedia_transport_loop_disable_rx()

pj_status_t pjmedia_transport_loop_disable_rx ( pjmedia_transport tp,
void *  user,
pj_bool_t  disabled 
)

Set the configuration of whether a stream will become the receiver of incoming packets.

Parameters
tpThe transport.
userThe stream.
disabledPJ_TRUE to disable the receiving of packets, or PJ_FALSE to enable it.

 


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