#ifndef ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H #define ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H #include "Packet.hpp" #include #include #include #include #include #include namespace SRT { class PacketSendQueue { public: using Ptr = std::shared_ptr; using LostPair = std::pair; PacketSendQueue(uint32_t max_size, uint32_t latency); ~PacketSendQueue() = default; bool drop(uint32_t num); bool inputPacket(DataPacket::Ptr pkt); std::list findPacketBySeq(uint32_t start, uint32_t end); private: uint32_t timeLatency(); private: uint32_t _pkt_cap; uint32_t _pkt_latency; std::list _pkt_cache; }; } // namespace SRT #endif // ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H