uvgRTP 2.3.0
An open-source library for RTP/SRTP media delivery
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uvgrtp::context Class Reference

Provides CNAME isolation and can be used to create uvgrtp::session objects. More...

#include <context.hh>

Public Member Functions

 context ()
 RTP context constructor.
 
 ~context ()
 RTP context destructor.
 
uvgrtp::sessioncreate_session (std::string address)
 Create a new RTP session.
 
uvgrtp::sessioncreate_session (std::string remote_addr, std::string local_addr)
 Create a new RTP session.
 
rtp_error_t destroy_session (uvgrtp::session *session)
 Destroy RTP session and all of its media streams.
 
bool crypto_enabled () const
 Has Crypto++ been included in uvgRTP library.
 

Detailed Description

Provides CNAME isolation and can be used to create uvgrtp::session objects.

Definition at line 16 of file context.hh.

Constructor & Destructor Documentation

◆ context()

uvgrtp::context::context ( )

RTP context constructor.

Most of the time one RTP context per application is enough. If CNAME namespace isolation is required, multiple context objects can be created.

◆ ~context()

uvgrtp::context::~context ( )

RTP context destructor.

This does not destroy active sessions. They must be destroyed manually by calling uvgrtp::context::destroy_session()

Member Function Documentation

◆ create_session() [1/2]

uvgrtp::session * uvgrtp::context::create_session ( std::string  address)

Create a new RTP session.

Parameters
addressIP address of the remote participant
Returns
RTP session object
Return values
uvgrtp::sessionOn success
nullptrIf "address" is empty or memory allocation failed

◆ create_session() [2/2]

uvgrtp::session * uvgrtp::context::create_session ( std::string  remote_addr,
std::string  local_addr 
)

Create a new RTP session.

If UDP holepunching should be utilized, in addition to remote IP address, the caller must also provide local IP address where uvgRTP should bind itself to. If you are using uvgRTP for unidirectional streaming, please take a look at RCE_HOLEPUNCH_KEEPALIVE

Parameters
remote_addrIP address of the remote participant
local_addrIP address of a local interface
Returns
RTP session object
Return values
uvgrtp::sessionOn success
nullptrIf memory allocation failed

◆ crypto_enabled()

bool uvgrtp::context::crypto_enabled ( ) const

Has Crypto++ been included in uvgRTP library.

Return values
trueCrypto++ has been included, using SRTP is possible
falseCrypto++ has not been included, using SRTP is not possible

◆ destroy_session()

rtp_error_t uvgrtp::context::destroy_session ( uvgrtp::session session)

Destroy RTP session and all of its media streams.

Parameters
sessionPointer to the session object that should be destroyed
Returns
RTP error code
Return values
RTP_OKOn success
RTP_INVALID_VALUEIf session is nullptr

The documentation for this class was generated from the following file: