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

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 1425673002: Remove CanCreateAndDestroyManyVideoStreams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <algorithm> 10 #include <algorithm>
(...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 3118
3119 Start(); 3119 Start();
3120 SleepMs(kSilenceTimeoutMs); 3120 SleepMs(kSilenceTimeoutMs);
3121 Stop(); 3121 Stop();
3122 3122
3123 sender_transport.StopSending(); 3123 sender_transport.StopSending();
3124 3124
3125 DestroyStreams(); 3125 DestroyStreams();
3126 } 3126 }
3127 3127
3128 // TODO(pbos): Remove this regression test when VideoEngine is no longer used as
3129 // a backend. This is to test that we hand channels back properly.
3130 TEST_F(EndToEndTest, CanCreateAndDestroyManyVideoStreams) {
3131 test::NullTransport transport;
3132 rtc::scoped_ptr<Call> call(Call::Create(Call::Config()));
3133 test::FakeDecoder fake_decoder;
3134 test::FakeEncoder fake_encoder(Clock::GetRealTimeClock());
3135 for (size_t i = 0; i < 100; ++i) {
3136 VideoSendStream::Config send_config(&transport);
3137 send_config.encoder_settings.encoder = &fake_encoder;
3138 send_config.encoder_settings.payload_name = "FAKE";
3139 send_config.encoder_settings.payload_type = 123;
3140
3141 VideoEncoderConfig encoder_config;
3142 encoder_config.streams = test::CreateVideoStreams(1);
3143 send_config.rtp.ssrcs.push_back(1);
3144 VideoSendStream* send_stream =
3145 call->CreateVideoSendStream(send_config, encoder_config);
3146 call->DestroyVideoSendStream(send_stream);
3147
3148 VideoReceiveStream::Config receive_config(&transport);
3149 receive_config.rtp.remote_ssrc = 1;
3150 receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
3151 VideoReceiveStream::Decoder decoder;
3152 decoder.decoder = &fake_decoder;
3153 decoder.payload_type = 123;
3154 decoder.payload_name = "FAKE";
3155 receive_config.decoders.push_back(decoder);
3156 VideoReceiveStream* receive_stream =
3157 call->CreateVideoReceiveStream(receive_config);
3158 call->DestroyVideoReceiveStream(receive_stream);
3159 }
3160 }
3161
3162 void VerifyEmptyNackConfig(const NackConfig& config) { 3128 void VerifyEmptyNackConfig(const NackConfig& config) {
3163 EXPECT_EQ(0, config.rtp_history_ms) 3129 EXPECT_EQ(0, config.rtp_history_ms)
3164 << "Enabling NACK requires rtcp-fb: nack negotiation."; 3130 << "Enabling NACK requires rtcp-fb: nack negotiation.";
3165 } 3131 }
3166 3132
3167 void VerifyEmptyFecConfig(const FecConfig& config) { 3133 void VerifyEmptyFecConfig(const FecConfig& config) {
3168 EXPECT_EQ(-1, config.ulpfec_payload_type) 3134 EXPECT_EQ(-1, config.ulpfec_payload_type)
3169 << "Enabling FEC requires rtpmap: ulpfec negotiation."; 3135 << "Enabling FEC requires rtpmap: ulpfec negotiation.";
3170 EXPECT_EQ(-1, config.red_payload_type) 3136 EXPECT_EQ(-1, config.red_payload_type)
3171 << "Enabling FEC requires rtpmap: red negotiation."; 3137 << "Enabling FEC requires rtpmap: red negotiation.";
(...skipping 26 matching lines...) Expand all
3198 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) 3164 EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
3199 << "Enabling RTX requires rtpmap: rtx negotiation."; 3165 << "Enabling RTX requires rtpmap: rtx negotiation.";
3200 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3166 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3201 << "Enabling RTP extensions require negotiation."; 3167 << "Enabling RTP extensions require negotiation.";
3202 3168
3203 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3169 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3204 VerifyEmptyFecConfig(default_receive_config.rtp.fec); 3170 VerifyEmptyFecConfig(default_receive_config.rtp.fec);
3205 } 3171 }
3206 3172
3207 } // namespace webrtc 3173 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698