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

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

Issue 3005433002: Fix places that trigger no-unused-lambda-capture (Closed)
Patch Set: Created 3 years, 3 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 unified diff | Download patch
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 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2955 } test; 2955 } test;
2956 2956
2957 test::ScopedFieldTrials override_field_trials( 2957 test::ScopedFieldTrials override_field_trials(
2958 "WebRTC-VideoContentTypeExtension/Enabled/"); 2958 "WebRTC-VideoContentTypeExtension/Enabled/");
2959 metrics::Reset(); 2959 metrics::Reset();
2960 2960
2961 Call::Config send_config(test.GetSenderCallConfig()); 2961 Call::Config send_config(test.GetSenderCallConfig());
2962 Call::Config recv_config(test.GetReceiverCallConfig()); 2962 Call::Config recv_config(test.GetReceiverCallConfig());
2963 VideoEncoderConfig encoder_config_with_screenshare; 2963 VideoEncoderConfig encoder_config_with_screenshare;
2964 2964
2965 task_queue_.SendTask([this, &test, &override_field_trials, &send_config, 2965 task_queue_.SendTask([this, &test, &send_config, &recv_config,
2966 &recv_config, &encoder_config_with_screenshare]() { 2966 &encoder_config_with_screenshare]() {
2967 CreateSenderCall(send_config); 2967 CreateSenderCall(send_config);
2968 CreateReceiverCall(recv_config); 2968 CreateReceiverCall(recv_config);
2969 2969
2970 receive_transport_.reset(test.CreateReceiveTransport(&task_queue_)); 2970 receive_transport_.reset(test.CreateReceiveTransport(&task_queue_));
2971 send_transport_.reset( 2971 send_transport_.reset(
2972 test.CreateSendTransport(&task_queue_, sender_call_.get())); 2972 test.CreateSendTransport(&task_queue_, sender_call_.get()));
2973 send_transport_->SetReceiver(receiver_call_->Receiver()); 2973 send_transport_->SetReceiver(receiver_call_->Receiver());
2974 receive_transport_->SetReceiver(sender_call_->Receiver()); 2974 receive_transport_->SetReceiver(sender_call_->Receiver());
2975 2975
2976 receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); 2976 receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp);
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 4262
4263 return SEND_PACKET; 4263 return SEND_PACKET;
4264 } 4264 }
4265 4265
4266 rtc::Optional<uint16_t> last_observed_sequence_number_ GUARDED_BY(crit_); 4266 rtc::Optional<uint16_t> last_observed_sequence_number_ GUARDED_BY(crit_);
4267 rtc::Optional<uint32_t> last_observed_timestamp_ GUARDED_BY(crit_); 4267 rtc::Optional<uint32_t> last_observed_timestamp_ GUARDED_BY(crit_);
4268 size_t num_flexfec_packets_sent_ GUARDED_BY(crit_); 4268 size_t num_flexfec_packets_sent_ GUARDED_BY(crit_);
4269 rtc::CriticalSection crit_; 4269 rtc::CriticalSection crit_;
4270 } observer; 4270 } observer;
4271 4271
4272 constexpr int kFrameMaxWidth = 320; 4272 // These would have been declared as constexpr, but then some compilers
4273 constexpr int kFrameMaxHeight = 180; 4273 // require them to be captured in the lambda, and other compilers complain
nisse-webrtc 2017/08/23 09:42:02 If I understood you correctly, it's some windows c
eladalon 2017/08/23 10:26:26 Might take some time. I suggest lgtm-izing this CL
4274 constexpr int kFrameRate = 15; 4274 // about no-ununused-lambda-capture. Keeping them as normal variables was
4275 // the easiest work-around.
4276 int kFrameMaxWidth = 320;
stefan-webrtc 2017/08/23 09:37:25 const?
eladalon 2017/08/23 10:26:26 Same answer.
4277 int kFrameMaxHeight = 180;
4278 int kFrameRate = 15;
4275 4279
4276 Call::Config config(event_log_.get()); 4280 Call::Config config(event_log_.get());
4277 4281
4278 std::unique_ptr<test::PacketTransport> send_transport; 4282 std::unique_ptr<test::PacketTransport> send_transport;
4279 std::unique_ptr<test::PacketTransport> receive_transport; 4283 std::unique_ptr<test::PacketTransport> receive_transport;
4280 std::unique_ptr<VideoEncoder> encoder; 4284 std::unique_ptr<VideoEncoder> encoder;
4281 4285
4282 task_queue_.SendTask([&]() { 4286 task_queue_.SendTask([&]() {
4283 CreateCalls(config, config); 4287 CreateCalls(config, config);
4284 4288
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 std::unique_ptr<VideoEncoder> encoder_; 5007 std::unique_ptr<VideoEncoder> encoder_;
5004 std::unique_ptr<VideoDecoder> decoder_; 5008 std::unique_ptr<VideoDecoder> decoder_;
5005 rtc::CriticalSection crit_; 5009 rtc::CriticalSection crit_;
5006 int recorded_frames_ GUARDED_BY(crit_); 5010 int recorded_frames_ GUARDED_BY(crit_);
5007 } test(this); 5011 } test(this);
5008 5012
5009 RunBaseTest(&test); 5013 RunBaseTest(&test);
5010 } 5014 }
5011 5015
5012 } // namespace webrtc 5016 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698