remove duplicate code (#4570)
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows / build (push) Waiting to run

getRecvSpeed和getRecvTotalBytes这两函数已在RtspPlayer中实现了,就没必要在RtspPlayerImp中再实现一遍了吧.
This commit is contained in:
mtdxc 2025-11-26 18:51:07 +08:00 committed by GitHub
parent 38cfa2c736
commit 8a4788504e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,36 +59,6 @@ public:
std::vector<Track::Ptr> getTracks(bool ready = true) const override;
size_t getRecvSpeed() override {
size_t ret = TcpClient::getRecvSpeed();
for (auto &rtp : _rtp_sock) {
if (rtp) {
ret += rtp->getRecvSpeed();
}
}
for (auto &rtcp : _rtcp_sock) {
if (rtcp) {
ret += rtcp->getRecvSpeed();
}
}
return ret;
}
size_t getRecvTotalBytes() override {
size_t ret = TcpClient::getRecvTotalBytes();
for (auto &rtp : _rtp_sock) {
if (rtp) {
ret += rtp->getRecvTotalBytes();
}
}
for (auto &rtcp : _rtcp_sock) {
if (rtcp) {
ret += rtcp->getRecvTotalBytes();
}
}
return ret;
}
private:
// 派生类回调函数 [AUTO-TRANSLATED:61e20903]
// Derived class callback function