22 bool operator> (const GREPacket &other) const {
23 return seq > other.seq;
27 class Reorderer : public Sender {
29 Reorderer(Sender* sender);
30 void send_packet(uint16_t proto, const std::string& data, int seq);
31 void possibly_adjust_tv(timeval *tv);
33 int get_reorders() const { return num_reorders; }
34 int get_lost_packets() const { return num_lost_packets; }
37 void check_ts_discontinuity(uint16_t proto, const std::string &data, bool silence);
41 timeval last_sent_packet;
43 std::priority_queue<GREPacket, std::vector<GREPacket>, std::greater<GREPacket>> packet_buffer;
44 std::map<int, int> ccs;
46 int num_reorders = 0, num_lost_packets = 0;
49 #endif // !defined(_REORDERER_H)