mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 15:20:42 +01:00
Delete unused methods from VCMReceiveStatisticsCallback
Bug: webrtc:7408 Change-Id: I942b8ce6d91578a6cc3ea8fe3ddd53068af96185 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129931 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27333}
This commit is contained in:
parent
ce584cf1d9
commit
dd41da697a
7 changed files with 9 additions and 31 deletions
|
@ -54,7 +54,6 @@ std::string VideoReceiveStream::Stats::ToString(int64_t time_ms) const {
|
|||
ss << "targ_delay_ms: " << target_delay_ms << ", ";
|
||||
ss << "jb_delay_ms: " << jitter_buffer_ms << ", ";
|
||||
ss << "min_playout_delay_ms: " << min_playout_delay_ms << ", ";
|
||||
ss << "discarded: " << discarded_packets << ", ";
|
||||
ss << "sync_offset_ms: " << sync_offset_ms << ", ";
|
||||
ss << "cum_loss: " << rtcp_stats.packets_lost << ", ";
|
||||
ss << "max_ext_seq: " << rtcp_stats.extended_highest_sequence_number << ", ";
|
||||
|
|
|
@ -85,7 +85,6 @@ class VideoReceiveStream {
|
|||
int current_payload_type = -1;
|
||||
|
||||
int total_bitrate_bps = 0;
|
||||
int discarded_packets = 0;
|
||||
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
|
|
|
@ -84,10 +84,7 @@ class VCMReceiveStatisticsCallback {
|
|||
virtual void OnCompleteFrame(bool is_keyframe,
|
||||
size_t size_bytes,
|
||||
VideoContentType content_type) = 0;
|
||||
// TODO(nisse): Delete.
|
||||
virtual void OnDiscardedPacketsUpdated(int discarded_packets) = 0;
|
||||
// TODO(nisse): Delete.
|
||||
virtual void OnFrameCountsUpdated(const FrameCounts& frame_counts) = 0;
|
||||
|
||||
virtual void OnFrameBufferTimingsUpdated(int decode_ms,
|
||||
int max_decode_ms,
|
||||
int current_delay_ms,
|
||||
|
|
|
@ -126,8 +126,7 @@ TEST_F(StatsEndToEndTest, GetStats) {
|
|||
stats.rtp_stats.transmitted.padding_bytes != 0 ||
|
||||
stats.rtp_stats.retransmitted.packets != 0;
|
||||
|
||||
receive_stats_filled_["CodecStats"] |=
|
||||
stats.target_delay_ms != 0 || stats.discarded_packets != 0;
|
||||
receive_stats_filled_["CodecStats"] |= stats.target_delay_ms != 0;
|
||||
|
||||
receive_stats_filled_["FrameCounts"] |=
|
||||
stats.frame_counts.key_frames != 0 ||
|
||||
|
|
|
@ -849,17 +849,6 @@ void ReceiveStatisticsProxy::OnCompleteFrame(bool is_keyframe,
|
|||
UpdateFramerate(now_ms);
|
||||
}
|
||||
|
||||
void ReceiveStatisticsProxy::OnFrameCountsUpdated(
|
||||
const FrameCounts& frame_counts) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
stats_.frame_counts = frame_counts;
|
||||
}
|
||||
|
||||
void ReceiveStatisticsProxy::OnDiscardedPacketsUpdated(int discarded_packets) {
|
||||
rtc::CritScope lock(&crit_);
|
||||
stats_.discarded_packets = discarded_packets;
|
||||
}
|
||||
|
||||
void ReceiveStatisticsProxy::OnPreDecode(VideoCodecType codec_type, int qp) {
|
||||
RTC_DCHECK_RUN_ON(&decode_thread_);
|
||||
rtc::CritScope lock(&crit_);
|
||||
|
|
|
@ -65,8 +65,6 @@ class ReceiveStatisticsProxy : public VCMReceiveStatisticsCallback,
|
|||
void OnStreamInactive();
|
||||
|
||||
// Overrides VCMReceiveStatisticsCallback.
|
||||
void OnFrameCountsUpdated(const FrameCounts& frame_counts) override;
|
||||
void OnDiscardedPacketsUpdated(int discarded_packets) override;
|
||||
void OnCompleteFrame(bool is_keyframe,
|
||||
size_t size_bytes,
|
||||
VideoContentType content_type) override;
|
||||
|
|
|
@ -443,21 +443,18 @@ TEST_F(ReceiveStatisticsProxyTest,
|
|||
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsFrameCounts) {
|
||||
const int kKeyFrames = 3;
|
||||
const int kDeltaFrames = 22;
|
||||
FrameCounts frame_counts;
|
||||
frame_counts.key_frames = kKeyFrames;
|
||||
frame_counts.delta_frames = kDeltaFrames;
|
||||
statistics_proxy_->OnFrameCountsUpdated(frame_counts);
|
||||
for (int i = 0; i < kKeyFrames; i++) {
|
||||
statistics_proxy_->OnCompleteFrame(true, 0, VideoContentType::UNSPECIFIED);
|
||||
}
|
||||
for (int i = 0; i < kDeltaFrames; i++) {
|
||||
statistics_proxy_->OnCompleteFrame(false, 0, VideoContentType::UNSPECIFIED);
|
||||
}
|
||||
|
||||
VideoReceiveStream::Stats stats = statistics_proxy_->GetStats();
|
||||
EXPECT_EQ(kKeyFrames, stats.frame_counts.key_frames);
|
||||
EXPECT_EQ(kDeltaFrames, stats.frame_counts.delta_frames);
|
||||
}
|
||||
|
||||
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsDiscardedPackets) {
|
||||
const int kDiscardedPackets = 12;
|
||||
statistics_proxy_->OnDiscardedPacketsUpdated(kDiscardedPackets);
|
||||
EXPECT_EQ(kDiscardedPackets, statistics_proxy_->GetStats().discarded_packets);
|
||||
}
|
||||
|
||||
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsRtcpStats) {
|
||||
const uint8_t kFracLost = 0;
|
||||
const int32_t kCumLost = 1;
|
||||
|
|
Loading…
Reference in a new issue