代码拉取完成,页面将自动刷新
同步操作将从 夏楚/ZLMediaKit 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef ZLMEDIAKIT_SRT_STATISTIC_H
#define ZLMEDIAKIT_SRT_STATISTIC_H
#include <map>
#include "Common.hpp"
#include "Packet.hpp"
namespace SRT {
class PacketRecvRateContext {
public:
PacketRecvRateContext(TimePoint start);
~PacketRecvRateContext() = default;
void inputPacket(TimePoint &ts,size_t len = 0);
uint32_t getPacketRecvRate(uint32_t& bytesps);
std::string dump();
static const int SIZE = 16;
private:
TimePoint _last_arrive_time;
int64_t _ts_arr[SIZE];
size_t _size_arr[SIZE];
size_t _cur_idx;
//std::map<int64_t, int64_t> _pkt_map;
};
class EstimatedLinkCapacityContext {
public:
EstimatedLinkCapacityContext(TimePoint start);
~EstimatedLinkCapacityContext() = default;
void setLastSeq(uint32_t seq){
_last_seq = seq;
}
void inputPacket(TimePoint &ts,DataPacket::Ptr& pkt);
uint32_t getEstimatedLinkCapacity();
static const int SIZE = 64;
private:
void probe1Arrival(TimePoint &ts,const DataPacket::Ptr& pkt, bool unordered);
void probe2Arrival(TimePoint &ts,const DataPacket::Ptr& pkt);
private:
TimePoint _start;
TimePoint _ts_probe_time;
int64_t _dur_probe_arr[SIZE];
size_t _cur_idx;
uint32_t _last_seq = 0;
uint32_t _probe1_seq = SEQ_NONE;
//std::map<int64_t, int64_t> _pkt_map;
};
/*
class RecvRateContext {
public:
RecvRateContext(TimePoint start)
: _start(start) {};
~RecvRateContext() = default;
void inputPacket(TimePoint &ts, size_t size);
uint32_t getRecvRate();
private:
TimePoint _start;
std::map<int64_t, size_t> _pkt_map;
};
*/
} // namespace SRT
#endif // ZLMEDIAKIT_SRT_STATISTIC_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。