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

Support disable NACK in config

This commit is contained in:
winlin 2020-05-04 20:42:30 +08:00
parent d125116317
commit 8c4b6d3166
9 changed files with 212 additions and 69 deletions

View file

@ -227,6 +227,8 @@ private:
srs_utime_t mw_sleep;
int mw_msgs;
bool realtime;
// Whether enabled nack.
bool nack_enabled_;
public:
SrsRtcPlayer(SrsRtcSession* s, int parent_cid);
virtual ~SrsRtcPlayer();
@ -260,6 +262,8 @@ private:
public:
void nack_fetch(std::vector<SrsRtpPacket2*>& pkts, uint32_t ssrc, uint16_t seq);
void simulate_nack_drop(int nn);
private:
void simulate_drop_packet(SrsRtpHeader* h, int nn_bytes);
};
class SrsRtcPublisher : virtual public ISrsHourGlass, virtual public ISrsRtpPacketDecodeHandler
@ -278,6 +282,8 @@ private:
private:
SrsRequest* req;
SrsSource* source;
// Whether enabled nack.
bool nack_enabled_;
// Simulators.
int nn_simulate_nack_drop;
private:
@ -310,6 +316,8 @@ public:
virtual srs_error_t notify(int type, srs_utime_t interval, srs_utime_t tick);
public:
void simulate_nack_drop(int nn);
private:
void simulate_drop_packet(SrsRtpHeader* h, int nn_bytes);
};
class SrsRtcSession