Commit 14b31852 by xia-chu

添加rtp rtmp个数统计

parent 62ba87dd
......@@ -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
\ No newline at end of file
}//namespace mediakit
namespace toolkit {
StatisticImp(mediakit::RtmpPacket);
}
\ No newline at end of file
......@@ -213,6 +213,10 @@ private:
RtmpPacket(){
clear();
}
private:
//对象个数统计
ObjectStatistic<RtmpPacket> _statistic;
};
/**
......
......@@ -545,4 +545,8 @@ RtpPacket::Ptr RtpPacket::create(){
#endif
}
}//namespace mediakit
\ No newline at end of file
}//namespace mediakit
namespace toolkit {
StatisticImp(mediakit::RtpPacket);
}
\ No newline at end of file
......@@ -172,6 +172,10 @@ public:
private:
friend class ResourcePool_l<RtpPacket>;
RtpPacket() = default;
private:
//对象个数统计
ObjectStatistic<RtpPacket> _statistic;
};
class RtpPayload {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论