Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: webrtc/video/end_to_end_tests.cc

Issue 2853503002: Dont request keyframes if the stream is inactive or if we are currently receiving a keyframe. (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/video_packet_buffer_unittest.cc ('k') | webrtc/video/rtp_stream_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/end_to_end_tests.cc
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc
index 99e52794240f475ca131c42e70abdc9288529730..6e721b60ee4c53db1a1660b63d67264acdec93ab 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -2229,6 +2229,45 @@ TEST_F(EndToEndTest, RembWithSendSideBwe) {
RunBaseTest(&test);
}
+TEST_F(EndToEndTest, StopSendingKeyframeRequestsForInactiveStream) {
+ class KeyframeRequestObserver : public test::EndToEndTest {
+ public:
+ KeyframeRequestObserver() : clock_(Clock::GetRealTimeClock()) {}
+
+ void OnVideoStreamsCreated(
+ VideoSendStream* send_stream,
+ const std::vector<VideoReceiveStream*>& receive_streams) override {
+ RTC_DCHECK_EQ(1, receive_streams.size());
+ send_stream_ = send_stream;
+ receive_stream_ = receive_streams[0];
+ }
+
+ void PerformTest() override {
+ bool frame_decoded = false;
+ int64_t start_time = clock_->TimeInMilliseconds();
+ while (clock_->TimeInMilliseconds() - start_time <= 5000) {
+ if (receive_stream_->GetStats().frames_decoded > 0) {
+ frame_decoded = true;
+ break;
+ }
+ SleepMs(100);
+ }
+ ASSERT_TRUE(frame_decoded);
+ send_stream_->Stop();
+ SleepMs(10000);
+ ASSERT_EQ(
+ 1U, receive_stream_->GetStats().rtcp_packet_type_counts.pli_packets);
+ }
+
+ private:
+ Clock* clock_;
+ VideoSendStream* send_stream_;
+ VideoReceiveStream* receive_stream_;
+ } test;
+
+ RunBaseTest(&test);
+}
+
class ProbingTest : public test::EndToEndTest {
public:
explicit ProbingTest(int start_bitrate_bps)
« no previous file with comments | « webrtc/modules/video_coding/video_packet_buffer_unittest.cc ('k') | webrtc/video/rtp_stream_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698