mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
添加rtp rtmp个数统计
This commit is contained in:
parent
62ba87dd0f
commit
14b318525e
@ -1043,6 +1043,9 @@ void installWebApi() {
|
||||
val["data"]["BufferRaw"] = (Json::UInt64)(ObjectStatistic<BufferRaw>::count());
|
||||
val["data"]["BufferLikeString"] = (Json::UInt64)(ObjectStatistic<BufferLikeString>::count());
|
||||
val["data"]["BufferList"] = (Json::UInt64)(ObjectStatistic<BufferList>::count());
|
||||
|
||||
val["data"]["RtpPacket"] = (Json::UInt64)(ObjectStatistic<RtpPacket>::count());
|
||||
val["data"]["RtmpPacket"] = (Json::UInt64)(ObjectStatistic<RtmpPacket>::count());
|
||||
});
|
||||
|
||||
////////////以下是注册的Hook API////////////
|
||||
|
@ -173,6 +173,8 @@ public:
|
||||
uint32_t _pts = 0;
|
||||
size_t _prefix_size = 0;
|
||||
BufferLikeString _buffer;
|
||||
|
||||
private:
|
||||
//对象个数统计
|
||||
ObjectStatistic<FrameImp> _statistic;
|
||||
|
||||
|
@ -146,4 +146,8 @@ RtmpPacket::Ptr RtmpPacket::create(){
|
||||
#endif
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
}//namespace mediakit
|
||||
|
||||
namespace toolkit {
|
||||
StatisticImp(mediakit::RtmpPacket);
|
||||
}
|
@ -213,6 +213,10 @@ private:
|
||||
RtmpPacket(){
|
||||
clear();
|
||||
}
|
||||
|
||||
private:
|
||||
//对象个数统计
|
||||
ObjectStatistic<RtmpPacket> _statistic;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -545,4 +545,8 @@ RtpPacket::Ptr RtpPacket::create(){
|
||||
#endif
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
}//namespace mediakit
|
||||
|
||||
namespace toolkit {
|
||||
StatisticImp(mediakit::RtpPacket);
|
||||
}
|
@ -172,6 +172,10 @@ public:
|
||||
private:
|
||||
friend class ResourcePool_l<RtpPacket>;
|
||||
RtpPacket() = default;
|
||||
|
||||
private:
|
||||
//对象个数统计
|
||||
ObjectStatistic<RtpPacket> _statistic;
|
||||
};
|
||||
|
||||
class RtpPayload {
|
||||
|
Loading…
Reference in New Issue
Block a user