mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +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"]["BufferRaw"] = (Json::UInt64)(ObjectStatistic<BufferRaw>::count());
|
||||||
val["data"]["BufferLikeString"] = (Json::UInt64)(ObjectStatistic<BufferLikeString>::count());
|
val["data"]["BufferLikeString"] = (Json::UInt64)(ObjectStatistic<BufferLikeString>::count());
|
||||||
val["data"]["BufferList"] = (Json::UInt64)(ObjectStatistic<BufferList>::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////////////
|
////////////以下是注册的Hook API////////////
|
||||||
|
@ -173,6 +173,8 @@ public:
|
|||||||
uint32_t _pts = 0;
|
uint32_t _pts = 0;
|
||||||
size_t _prefix_size = 0;
|
size_t _prefix_size = 0;
|
||||||
BufferLikeString _buffer;
|
BufferLikeString _buffer;
|
||||||
|
|
||||||
|
private:
|
||||||
//对象个数统计
|
//对象个数统计
|
||||||
ObjectStatistic<FrameImp> _statistic;
|
ObjectStatistic<FrameImp> _statistic;
|
||||||
|
|
||||||
|
@ -146,4 +146,8 @@ RtmpPacket::Ptr RtmpPacket::create(){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace mediakit
|
}//namespace mediakit
|
||||||
|
|
||||||
|
namespace toolkit {
|
||||||
|
StatisticImp(mediakit::RtmpPacket);
|
||||||
|
}
|
@ -213,6 +213,10 @@ private:
|
|||||||
RtmpPacket(){
|
RtmpPacket(){
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//对象个数统计
|
||||||
|
ObjectStatistic<RtmpPacket> _statistic;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -545,4 +545,8 @@ RtpPacket::Ptr RtpPacket::create(){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace mediakit
|
}//namespace mediakit
|
||||||
|
|
||||||
|
namespace toolkit {
|
||||||
|
StatisticImp(mediakit::RtpPacket);
|
||||||
|
}
|
@ -172,6 +172,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class ResourcePool_l<RtpPacket>;
|
friend class ResourcePool_l<RtpPacket>;
|
||||||
RtpPacket() = default;
|
RtpPacket() = default;
|
||||||
|
|
||||||
|
private:
|
||||||
|
//对象个数统计
|
||||||
|
ObjectStatistic<RtpPacket> _statistic;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RtpPayload {
|
class RtpPayload {
|
||||||
|
Loading…
Reference in New Issue
Block a user