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}
diff --git a/call/video_receive_stream.cc b/call/video_receive_stream.cc
index b0156fc..86ef88a 100644
--- a/call/video_receive_stream.cc
+++ b/call/video_receive_stream.cc
@@ -54,7 +54,6 @@
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 << ", ";
diff --git a/call/video_receive_stream.h b/call/video_receive_stream.h
index 0bcb6d3..305e17a 100644
--- a/call/video_receive_stream.h
+++ b/call/video_receive_stream.h
@@ -85,7 +85,6 @@
int current_payload_type = -1;
int total_bitrate_bps = 0;
- int discarded_packets = 0;
int width = 0;
int height = 0;
diff --git a/modules/video_coding/include/video_coding_defines.h b/modules/video_coding/include/video_coding_defines.h
index 0998610..84d5de9 100644
--- a/modules/video_coding/include/video_coding_defines.h
+++ b/modules/video_coding/include/video_coding_defines.h
@@ -84,10 +84,7 @@
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,
diff --git a/video/end_to_end_tests/stats_tests.cc b/video/end_to_end_tests/stats_tests.cc
index bad04b4..14160f7 100644
--- a/video/end_to_end_tests/stats_tests.cc
+++ b/video/end_to_end_tests/stats_tests.cc
@@ -126,8 +126,7 @@
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 ||
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc
index 4927b99..538bd78 100644
--- a/video/receive_statistics_proxy.cc
+++ b/video/receive_statistics_proxy.cc
@@ -849,17 +849,6 @@
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_);
diff --git a/video/receive_statistics_proxy.h b/video/receive_statistics_proxy.h
index 8d54f49..6eb9d48 100644
--- a/video/receive_statistics_proxy.h
+++ b/video/receive_statistics_proxy.h
@@ -65,8 +65,6 @@
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;
diff --git a/video/receive_statistics_proxy_unittest.cc b/video/receive_statistics_proxy_unittest.cc
index 9af5db4..e050137 100644
--- a/video/receive_statistics_proxy_unittest.cc
+++ b/video/receive_statistics_proxy_unittest.cc
@@ -443,21 +443,18 @@
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;