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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2033763002: Always send RED headers if configured. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Tests passing. Created 4 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
« webrtc/video/video_send_stream.cc ('K') | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 9c43da270003add7dc72304350b7b73cbbf3274a..87abfea08ca75e642083957949600d6c0af255b2 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -308,11 +308,13 @@ class FecObserver : public test::EndToEndTest {
FecObserver(bool header_extensions_enabled,
bool use_nack,
bool expect_red,
+ bool expect_fec,
const std::string& codec)
: EndToEndTest(VideoSendStreamTest::kDefaultTimeoutMs),
payload_name_(codec),
use_nack_(use_nack),
expect_red_(expect_red),
+ expect_fec_(expect_fec),
send_count_(0),
received_media_(false),
received_fec_(false),
@@ -375,6 +377,7 @@ class FecObserver : public test::EndToEndTest {
if (encapsulated_payload_type != -1) {
if (encapsulated_payload_type ==
VideoSendStreamTest::kUlpfecPayloadType) {
+ EXPECT_TRUE(expect_fec_);
received_fec_ = true;
} else {
received_media_ = true;
@@ -382,7 +385,7 @@ class FecObserver : public test::EndToEndTest {
}
if (send_count_ > 100 && received_media_) {
- if (received_fec_ || !expect_red_)
+ if (received_fec_ || !expect_fec_)
observation_complete_.Set();
}
@@ -442,6 +445,7 @@ class FecObserver : public test::EndToEndTest {
const std::string payload_name_;
const bool use_nack_;
const bool expect_red_;
+ const bool expect_fec_;
int send_count_;
bool received_media_;
bool received_fec_;
@@ -450,12 +454,12 @@ class FecObserver : public test::EndToEndTest {
};
TEST_F(VideoSendStreamTest, SupportsFecWithExtensions) {
- FecObserver test(true, false, true, "VP8");
+ FecObserver test(true, false, true, true, "VP8");
RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, SupportsFecWithoutExtensions) {
- FecObserver test(false, false, true, "VP8");
+ FecObserver test(false, false, true, true, "VP8");
RunBaseTest(&test);
}
@@ -463,25 +467,25 @@ TEST_F(VideoSendStreamTest, SupportsFecWithoutExtensions) {
// since we'll still have to re-request FEC packets, effectively wasting
// bandwidth since the receiver has to wait for FEC retransmissions to determine
// that the received state is actually decodable.
-TEST_F(VideoSendStreamTest, DoesNotUtilizeRedForH264WithNackEnabled) {
- FecObserver test(false, true, false, "H264");
+TEST_F(VideoSendStreamTest, DoesNotUtilizeFecForH264WithNackEnabled) {
+ FecObserver test(false, true, true, false, "H264");
RunBaseTest(&test);
}
// Without retransmissions FEC for H264 is fine.
TEST_F(VideoSendStreamTest, DoesUtilizeRedForH264WithoutNackEnabled) {
- FecObserver test(false, false, true, "H264");
+ FecObserver test(false, false, true, true, "H264");
RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp8WithNackEnabled) {
- FecObserver test(false, true, true, "VP8");
+ FecObserver test(false, true, true, true, "VP8");
RunBaseTest(&test);
}
#if !defined(RTC_DISABLE_VP9)
TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp9WithNackEnabled) {
- FecObserver test(false, true, true, "VP9");
+ FecObserver test(false, true, true, true, "VP9");
RunBaseTest(&test);
}
#endif // !defined(RTC_DISABLE_VP9)
« webrtc/video/video_send_stream.cc ('K') | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698