3 #include <unordered_map>
6 #include "holepuncher.hh"
7 #include "pkt_dispatch.hh"
10 #include "srtp/srtcp.hh"
11 #include "srtp/srtp.hh"
14 #include "formats/media.hh"
21 media_stream(std::string addr,
int src_port,
int dst_port, rtp_format_t fmt,
int flags);
22 media_stream(std::string remote_addr, std::string local_addr,
int src_port,
int dst_port, rtp_format_t fmt,
int flags);
43 rtp_error_t init(uvgrtp::zrtp *zrtp);
59 rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt);
84 rtp_error_t
push_frame(uint8_t *data,
size_t data_len,
int flags);
85 rtp_error_t
push_frame(uint8_t *data,
size_t data_len, uint32_t ts,
int flags);
86 rtp_error_t
push_frame(std::unique_ptr<uint8_t[]> data,
size_t data_len,
int flags);
87 rtp_error_t
push_frame(std::unique_ptr<uint8_t[]> data,
size_t data_len, uint32_t ts,
int flags);
139 rtp_error_t install_deallocation_hook(
void (*hook)(
void *));
154 rtp_error_t install_notify_hook(
void *arg,
void (*hook)(
void *,
int));
171 void set_media_config(
void *config);
172 void *get_media_config();
197 rtp_error_t init_connection();
202 uvgrtp::srtcp *srtcp_;
203 uvgrtp::socket *socket_;
207 sockaddr_in addr_out_;
216 rtp_ctx_conf_t ctx_config_;
225 uint32_t rtp_handler_key_;
226 uint32_t zrtp_handler_key_;
229 uvgrtp::pkt_dispatcher *pkt_dispatcher_;
230 std::thread *dispatcher_thread_;
233 uvgrtp::formats::media *media_;
236 uvgrtp::holepuncher *holepuncher_;
240 namespace uvg_rtp = uvgrtp;