mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 11:38:11 +08:00
rtc拉流代理支持显示sockInfo和码率
This commit is contained in:
@@ -2023,4 +2023,24 @@ Json::Value IceAgent::getChecklistInfo() const {
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t IceAgent::getRecvSpeed() {
|
||||
size_t ret = 0;
|
||||
for (auto s : _socket_candidate_manager.getAllSockets()) {
|
||||
if (s && s->getSock()) {
|
||||
ret += s->getSock()->getRecvSpeed();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t IceAgent::getRecvTotalBytes() {
|
||||
size_t ret = 0;
|
||||
for (auto s : _socket_candidate_manager.getAllSockets()) {
|
||||
if (s && s->getSock()) {
|
||||
ret += s->getSock()->getRecvTotalBytes();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace RTC
|
||||
|
||||
Reference in New Issue
Block a user