for some optimize and anti pkt lost and force pop packet when too late

This commit is contained in:
xiongguangjie
2022-06-04 20:51:49 +08:00
parent 89b135400c
commit 71ce31d5c0
8 changed files with 95 additions and 28 deletions

View File

@@ -21,6 +21,8 @@ public:
bool inputPacket(DataPacket::Ptr pkt);
std::list<DataPacket::Ptr> tryGetPacket();
uint32_t timeLantency();
uint32_t timeLantencyFrom(TimePoint now);
std::list<DataPacket::Ptr> tryGetPacketByNow(TimePoint now);
std::list<LostPair> getLostSeq();
size_t getSize();
@@ -41,6 +43,8 @@ private:
uint32_t _pkt_expected_seq = 0;
uint32_t _pkt_cap;
uint32_t _pkt_lantency;
TimePoint _last_pop_ts;
};
}