uvgRTP 3.1.3
An open-source library for RTP/SRTP media delivery
Loading...
Searching...
No Matches
context.hh
1#pragma once
2
3#include "util.hh"
4
5#include <map>
6#include <string>
7#include <memory>
8
9
10namespace uvgrtp {
11
12 class session;
13 class socketfactory;
14
18 class context {
19 public:
27
35
46 uvgrtp::session* create_session(std::pair<std::string, std::string> addresses);
47
58 uvgrtp::session *create_session(std::string address);
59
61 // Obsolete method, replaced by create_session(std::pair<std::string, std::string> addresses);
62 uvgrtp::session *create_session(std::string remote_addr, std::string local_addr);
64
76
78 std::string& get_cname();
80
87 bool crypto_enabled() const;
88
89 private:
90 /* Generate CNAME for participant using host and login names */
91 std::string generate_cname() const;
92
93 /* CNAME is the same for all connections */
94 std::string cname_;
95 std::shared_ptr<uvgrtp::socketfactory> sfp_;
96 };
97}
98
99namespace uvg_rtp = uvgrtp;
Provides CNAME isolation and can be used to create uvgrtp::session objects.
Definition context.hh:18
bool crypto_enabled() const
Has Crypto++ been included in uvgRTP library.
rtp_error_t destroy_session(uvgrtp::session *session)
Destroy RTP session and all of its media streams.
~context()
RTP context destructor.
uvgrtp::session * create_session(std::string address)
Create a new RTP session.
context()
RTP context constructor.
uvgrtp::session * create_session(std::pair< std::string, std::string > addresses)
Create a new RTP session between two IP addresses.
Provides ZRTP synchronization and can be used to create uvgrtp::media_stream objects.
Definition session.hh:27