mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 06:42:22 +08:00
格式化srt相关代码
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#ifndef ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H
|
||||
#define ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H
|
||||
|
||||
#include "Packet.hpp"
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
@@ -7,23 +8,30 @@
|
||||
#include <set>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
namespace SRT {
|
||||
|
||||
class PacketSendQueue {
|
||||
public:
|
||||
using Ptr = std::shared_ptr<PacketSendQueue>;
|
||||
using LostPair = std::pair<uint32_t, uint32_t>;
|
||||
PacketSendQueue(uint32_t max_size, uint32_t lantency);
|
||||
|
||||
PacketSendQueue(uint32_t max_size, uint32_t latency);
|
||||
~PacketSendQueue() = default;
|
||||
|
||||
bool drop(uint32_t num);
|
||||
bool inputPacket(DataPacket::Ptr pkt);
|
||||
std::list<DataPacket::Ptr> findPacketBySeq(uint32_t start,uint32_t end);
|
||||
std::list<DataPacket::Ptr> findPacketBySeq(uint32_t start, uint32_t end);
|
||||
|
||||
private:
|
||||
uint32_t timeLantency();
|
||||
uint32_t timeLatency();
|
||||
|
||||
private:
|
||||
std::list<DataPacket::Ptr> _pkt_cache;
|
||||
uint32_t _pkt_cap;
|
||||
uint32_t _pkt_lantency;
|
||||
uint32_t _pkt_latency;
|
||||
std::list<DataPacket::Ptr> _pkt_cache;
|
||||
};
|
||||
|
||||
} // namespace SRT
|
||||
|
||||
#endif // ZLMEDIAKIT_SRT_PACKET_SEND_QUEUE_H
|
||||
Reference in New Issue
Block a user