1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #307, support config to send plaintext RTP.

This commit is contained in:
winlin 2020-04-07 16:05:31 +08:00
parent 00810e6d1d
commit 6c5b51618c
6 changed files with 59 additions and 7 deletions

View file

@ -164,6 +164,11 @@ private:
private:
// For each RTC session, we use a specified cid for debugging logs.
int cid;
// For each RTC session, whether requires encrypt.
// Read config value, rtc_server.encrypt, default to on.
// Sepcifies by HTTP API, query encrypt, optional.
// TODO: FIXME: Support reload.
bool encrypt;
public:
SrsRequest request;
SrsSource* source;
@ -185,6 +190,8 @@ public:
std::string get_peer_id() const { return peer_id; }
void set_peer_id(const std::string& id) { peer_id = id; }
void set_encrypt(bool v) { encrypt = v; }
void switch_to_context();
public:
srs_error_t on_stun(SrsUdpMuxSocket* udp_mux_skt, SrsStunPacket* stun_req);