uvgRTP 2.3.0
An open-source library for RTP/SRTP media delivery
|
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::session * | create_session (std::string address) |
Create a new RTP session. | |
uvgrtp::session * | create_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. | |
Provides CNAME isolation and can be used to create uvgrtp::session objects.
Definition at line 16 of file context.hh.
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.
uvgrtp::context::~context | ( | ) |
RTP context destructor.
This does not destroy active sessions. They must be destroyed manually by calling uvgrtp::context::destroy_session()
uvgrtp::session * uvgrtp::context::create_session | ( | std::string | address | ) |
Create a new RTP session.
address | IP address of the remote participant |
uvgrtp::session | On success |
nullptr | If "address" is empty or memory allocation failed |
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
remote_addr | IP address of the remote participant |
local_addr | IP address of a local interface |
uvgrtp::session | On success |
nullptr | If memory allocation failed |
bool uvgrtp::context::crypto_enabled | ( | ) | const |
Has Crypto++ been included in uvgRTP library.
true | Crypto++ has been included, using SRTP is possible |
false | Crypto++ has not been included, using SRTP is not possible |
rtp_error_t uvgrtp::context::destroy_session | ( | uvgrtp::session * | session | ) |
Destroy RTP session and all of its media streams.
session | Pointer to the session object that should be destroyed |
RTP_OK | On success |
RTP_INVALID_VALUE | If session is nullptr |