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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 2573453002: Add multithreaded fake encoder and corresponding FlexFEC VideoSendStreamTest. (Closed)
Patch Set: Add the test here. Created 4 years 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/test/fake_encoder.cc ('K') | « webrtc/test/fake_encoder.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 7a11ae1243b190aac712275e379c9302968b0ca7..4dbecd9b5694b0eea559d264bd0f41a7a99b915b 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -365,7 +365,10 @@ class UlpfecObserver : public test::EndToEndTest {
sent_media_(false),
sent_ulpfec_(false),
header_extensions_enabled_(header_extensions_enabled) {
- if (codec == "H264") {
+ if (codec == "MTFE") {
stefan-webrtc 2016/12/12 15:18:28 I think this is a bit ugly. Can we pass in the obj
brandtr 2016/12/13 11:32:23 We could, but it seems that I would still need to
stefan-webrtc 2016/12/13 13:04:46 Right, but you can then just call it H264, instead
brandtr 2016/12/14 10:13:50 Yep. I also made it a FakeH264Encoder, so I'm not
stefan-webrtc 2016/12/14 11:42:31 This works, but instead of only passing in the pay
brandtr 2016/12/19 08:54:53 Done. This made the test instantiations more verbo
+ encoder_.reset(
+ new test::MultiThreadedFakeEncoder(Clock::GetRealTimeClock()));
+ } else if (codec == "H264") {
encoder_.reset(new test::FakeH264Encoder(Clock::GetRealTimeClock()));
} else if (codec == "VP8") {
encoder_.reset(VP8Encoder::Create());
@@ -534,6 +537,11 @@ TEST_F(VideoSendStreamTest, DoesUtilizeUlpfecForVp9WithNackEnabled) {
}
#endif // !defined(RTC_DISABLE_VP9)
+TEST_F(VideoSendStreamTest, SupportsUlpfecMTFE) {
+ UlpfecObserver test(false, false, true, true, "MTFE");
+ RunBaseTest(&test);
+}
+
// TODO(brandtr): Move these FlexFEC tests when we have created
// FlexfecSendStream.
class FlexfecObserver : public test::EndToEndTest {
@@ -547,7 +555,10 @@ class FlexfecObserver : public test::EndToEndTest {
sent_media_(false),
sent_flexfec_(false),
header_extensions_enabled_(header_extensions_enabled) {
- if (codec == "H264") {
+ if (codec == "MTFE") {
+ encoder_.reset(
+ new test::MultiThreadedFakeEncoder(Clock::GetRealTimeClock()));
+ } else if (codec == "H264") {
encoder_.reset(new test::FakeH264Encoder(Clock::GetRealTimeClock()));
} else if (codec == "VP8") {
encoder_.reset(VP8Encoder::Create());
@@ -675,6 +686,11 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackH264) {
RunBaseTest(&test);
}
+TEST_F(VideoSendStreamTest, SupportsFlexfecMTFE) {
+ FlexfecObserver test(false, false, "MTFE");
+ RunBaseTest(&test);
+}
+
void VideoSendStreamTest::TestNackRetransmission(
uint32_t retransmit_ssrc,
uint8_t retransmit_payload_type) {
« webrtc/test/fake_encoder.cc ('K') | « webrtc/test/fake_encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698