mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
Add rtp video statistics module
This commit is contained in:
18
src/rtp/rtp_video_receive_statistics.cpp
Normal file
18
src/rtp/rtp_video_receive_statistics.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "rtp_video_receive_statistics.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
RtpVideoReceiveStatistics::RtpVideoReceiveStatistics() {}
|
||||
|
||||
RtpVideoReceiveStatistics::~RtpVideoReceiveStatistics() {}
|
||||
|
||||
void RtpVideoReceiveStatistics::UpdateReceiveBytes(uint32_t received_bytes) {
|
||||
received_bytes_ += received_bytes;
|
||||
}
|
||||
|
||||
bool RtpVideoReceiveStatistics::Process() {
|
||||
LOG_INFO("rtp statistics: Receive [{} bps]", received_bytes_);
|
||||
received_bytes_ = 0;
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user