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 01d34a76a406c4566e0fcf25b581acdeb4593596..5ef5845940dd00d31ec07dba50ab5a3331ce2a2e 100644 |
--- a/webrtc/video/end_to_end_tests.cc |
+++ b/webrtc/video/end_to_end_tests.cc |
@@ -39,6 +39,7 @@ |
#include "webrtc/rtc_base/event.h" |
#include "webrtc/rtc_base/file.h" |
#include "webrtc/rtc_base/optional.h" |
+#include "webrtc/rtc_base/ptr_util.h" |
#include "webrtc/rtc_base/random.h" |
#include "webrtc/rtc_base/rate_limiter.h" |
#include "webrtc/system_wrappers/include/metrics.h" |
@@ -217,41 +218,50 @@ TEST_F(EndToEndTest, RendersSingleDelayedFrame) { |
rtc::Event event_; |
} renderer; |
- CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
+ test::FrameForwarder frame_forwarder; |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
+ std::unique_ptr<test::DirectTransport> receiver_transport; |
- test::DirectTransport sender_transport(sender_call_.get(), payload_type_map_); |
- test::DirectTransport receiver_transport(receiver_call_.get(), |
- payload_type_map_); |
- sender_transport.SetReceiver(receiver_call_->Receiver()); |
- receiver_transport.SetReceiver(sender_call_->Receiver()); |
+ task_queue_.SendTask([this, &renderer, &frame_forwarder, &sender_transport, |
+ &receiver_transport]() { |
+ CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
- CreateSendConfig(1, 0, 0, &sender_transport); |
- CreateMatchingReceiveConfigs(&receiver_transport); |
+ sender_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, sender_call_.get(), payload_type_map_); |
+ receiver_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, receiver_call_.get(), payload_type_map_); |
+ sender_transport->SetReceiver(receiver_call_->Receiver()); |
+ receiver_transport->SetReceiver(sender_call_->Receiver()); |
- video_receive_configs_[0].renderer = &renderer; |
+ CreateSendConfig(1, 0, 0, sender_transport.get()); |
+ CreateMatchingReceiveConfigs(receiver_transport.get()); |
- CreateVideoStreams(); |
- Start(); |
+ video_receive_configs_[0].renderer = &renderer; |
- // Create frames that are smaller than the send width/height, this is done to |
- // check that the callbacks are done after processing video. |
- std::unique_ptr<test::FrameGenerator> frame_generator( |
- test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight)); |
- test::FrameForwarder frame_forwarder; |
- video_send_stream_->SetSource( |
- &frame_forwarder, |
- VideoSendStream::DegradationPreference::kMaintainFramerate); |
+ CreateVideoStreams(); |
+ Start(); |
- frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
- EXPECT_TRUE(renderer.Wait()) |
- << "Timed out while waiting for the frame to render."; |
+ // Create frames that are smaller than the send width/height, this is done |
+ // to check that the callbacks are done after processing video. |
+ std::unique_ptr<test::FrameGenerator> frame_generator( |
+ test::FrameGenerator::CreateSquareGenerator(kWidth, kHeight)); |
+ video_send_stream_->SetSource( |
+ &frame_forwarder, |
+ VideoSendStream::DegradationPreference::kMaintainFramerate); |
- Stop(); |
+ frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
+ }); |
- sender_transport.StopSending(); |
- receiver_transport.StopSending(); |
+ EXPECT_TRUE(renderer.Wait()) |
+ << "Timed out while waiting for the frame to render."; |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &sender_transport, &receiver_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ sender_transport.reset(); |
+ receiver_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
TEST_F(EndToEndTest, TransmitsFirstFrame) { |
@@ -266,39 +276,48 @@ TEST_F(EndToEndTest, TransmitsFirstFrame) { |
rtc::Event event_; |
} renderer; |
- CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
+ std::unique_ptr<test::FrameGenerator> frame_generator; |
+ test::FrameForwarder frame_forwarder; |
- test::DirectTransport sender_transport(sender_call_.get(), payload_type_map_); |
- test::DirectTransport receiver_transport(receiver_call_.get(), |
- payload_type_map_); |
- sender_transport.SetReceiver(receiver_call_->Receiver()); |
- receiver_transport.SetReceiver(sender_call_->Receiver()); |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
+ std::unique_ptr<test::DirectTransport> receiver_transport; |
- CreateSendConfig(1, 0, 0, &sender_transport); |
- CreateMatchingReceiveConfigs(&receiver_transport); |
- video_receive_configs_[0].renderer = &renderer; |
+ task_queue_.SendTask([this, &renderer, &frame_generator, &frame_forwarder, |
+ &sender_transport, &receiver_transport]() { |
+ CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
- CreateVideoStreams(); |
- Start(); |
+ sender_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, sender_call_.get(), payload_type_map_); |
+ receiver_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, receiver_call_.get(), payload_type_map_); |
+ sender_transport->SetReceiver(receiver_call_->Receiver()); |
+ receiver_transport->SetReceiver(sender_call_->Receiver()); |
- std::unique_ptr<test::FrameGenerator> frame_generator( |
- test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, |
- kDefaultHeight)); |
- test::FrameForwarder frame_forwarder; |
- video_send_stream_->SetSource( |
- &frame_forwarder, |
- VideoSendStream::DegradationPreference::kMaintainFramerate); |
- frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
+ CreateSendConfig(1, 0, 0, sender_transport.get()); |
+ CreateMatchingReceiveConfigs(receiver_transport.get()); |
+ video_receive_configs_[0].renderer = &renderer; |
- EXPECT_TRUE(renderer.Wait()) |
- << "Timed out while waiting for the frame to render."; |
+ CreateVideoStreams(); |
+ Start(); |
- Stop(); |
+ frame_generator = test::FrameGenerator::CreateSquareGenerator( |
+ kDefaultWidth, kDefaultHeight); |
+ video_send_stream_->SetSource( |
+ &frame_forwarder, |
+ VideoSendStream::DegradationPreference::kMaintainFramerate); |
+ frame_forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
+ }); |
- sender_transport.StopSending(); |
- receiver_transport.StopSending(); |
+ EXPECT_TRUE(renderer.Wait()) |
+ << "Timed out while waiting for the frame to render."; |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &sender_transport, &receiver_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ sender_transport.reset(); |
+ receiver_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
class CodecObserver : public test::EndToEndTest, |
@@ -540,10 +559,11 @@ TEST_F(EndToEndTest, ReceivesNackAndRetransmitsAudio) { |
size_t GetNumVideoStreams() const override { return 0; } |
size_t GetNumAudioStreams() const override { return 1; } |
- test::PacketTransport* CreateReceiveTransport() override { |
+ test::PacketTransport* CreateReceiveTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) override { |
test::PacketTransport* receive_transport = new test::PacketTransport( |
- nullptr, this, test::PacketTransport::kReceiver, payload_type_map_, |
- FakeNetworkPipe::Config()); |
+ task_queue, nullptr, this, test::PacketTransport::kReceiver, |
+ payload_type_map_, FakeNetworkPipe::Config()); |
receive_transport_ = receive_transport; |
return receive_transport; |
} |
@@ -798,12 +818,14 @@ class FlexfecRenderObserver : public test::EndToEndTest, |
return SEND_PACKET; |
} |
- test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
+ test::PacketTransport* CreateSendTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* sender_call) override { |
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC. |
const int kNetworkDelayMs = 100; |
FakeNetworkPipe::Config config; |
config.queue_delay_ms = kNetworkDelayMs; |
- return new test::PacketTransport(sender_call, this, |
+ return new test::PacketTransport(task_queue, sender_call, this, |
test::PacketTransport::kSender, |
test::CallTest::payload_type_map_, config); |
} |
@@ -977,13 +999,15 @@ TEST_F(EndToEndTest, ReceivedUlpfecPacketsNotNacked) { |
return SEND_PACKET; |
} |
- test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
+ test::PacketTransport* CreateSendTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* sender_call) override { |
// At low RTT (< kLowRttNackMs) -> NACK only, no FEC. |
// Configure some network delay. |
const int kNetworkDelayMs = 50; |
FakeNetworkPipe::Config config; |
config.queue_delay_ms = kNetworkDelayMs; |
- return new test::PacketTransport(sender_call, this, |
+ return new test::PacketTransport(task_queue, sender_call, this, |
test::PacketTransport::kSender, |
payload_type_map_, config); |
} |
@@ -1325,35 +1349,45 @@ TEST_F(EndToEndTest, UnknownRtpPacketGivesUnknownSsrcReturnCode) { |
rtc::Event delivered_packet_; |
}; |
- CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
+ std::unique_ptr<test::DirectTransport> send_transport; |
+ std::unique_ptr<test::DirectTransport> receive_transport; |
+ std::unique_ptr<PacketInputObserver> input_observer; |
- test::DirectTransport send_transport(sender_call_.get(), payload_type_map_); |
- test::DirectTransport receive_transport(receiver_call_.get(), |
- payload_type_map_); |
- PacketInputObserver input_observer(receiver_call_->Receiver()); |
- send_transport.SetReceiver(&input_observer); |
- receive_transport.SetReceiver(sender_call_->Receiver()); |
- |
- CreateSendConfig(1, 0, 0, &send_transport); |
- CreateMatchingReceiveConfigs(&receive_transport); |
- |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
- kDefaultHeight); |
- Start(); |
+ task_queue_.SendTask([this, &send_transport, &receive_transport, |
+ &input_observer]() { |
+ CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
- receiver_call_->DestroyVideoReceiveStream(video_receive_streams_[0]); |
- video_receive_streams_.clear(); |
+ send_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, sender_call_.get(), payload_type_map_); |
+ receive_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, receiver_call_.get(), payload_type_map_); |
+ input_observer = |
+ rtc::MakeUnique<PacketInputObserver>(receiver_call_->Receiver()); |
+ send_transport->SetReceiver(input_observer.get()); |
+ receive_transport->SetReceiver(sender_call_->Receiver()); |
- // Wait() waits for a received packet. |
- EXPECT_TRUE(input_observer.Wait()); |
+ CreateSendConfig(1, 0, 0, send_transport.get()); |
+ CreateMatchingReceiveConfigs(receive_transport.get()); |
- Stop(); |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
+ kDefaultHeight); |
+ Start(); |
- DestroyStreams(); |
+ receiver_call_->DestroyVideoReceiveStream(video_receive_streams_[0]); |
+ video_receive_streams_.clear(); |
+ }); |
- send_transport.StopSending(); |
- receive_transport.StopSending(); |
+ // Wait() waits for a received packet. |
+ EXPECT_TRUE(input_observer->Wait()); |
+ |
+ task_queue_.SendTask([this, &send_transport, &receive_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ send_transport.reset(); |
+ receive_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
void EndToEndTest::RespectsRtcpMode(RtcpMode rtcp_mode) { |
@@ -1460,7 +1494,8 @@ class MultiStreamTest { |
int height; |
} codec_settings[kNumStreams]; |
- MultiStreamTest() { |
+ explicit MultiStreamTest(test::SingleThreadedTaskQueueForTesting* task_queue) |
+ : task_queue_(task_queue) { |
// TODO(sprang): Cleanup when msvc supports explicit initializers for array. |
codec_settings[0] = {1, 640, 480}; |
codec_settings[1] = {2, 320, 240}; |
@@ -1472,78 +1507,92 @@ class MultiStreamTest { |
void RunTest() { |
webrtc::RtcEventLogNullImpl event_log; |
Call::Config config(&event_log); |
- std::unique_ptr<Call> sender_call(Call::Create(config)); |
- std::unique_ptr<Call> receiver_call(Call::Create(config)); |
- std::unique_ptr<test::DirectTransport> sender_transport( |
- CreateSendTransport(sender_call.get())); |
- std::unique_ptr<test::DirectTransport> receiver_transport( |
- CreateReceiveTransport(receiver_call.get())); |
- sender_transport->SetReceiver(receiver_call->Receiver()); |
- receiver_transport->SetReceiver(sender_call->Receiver()); |
- |
- std::unique_ptr<VideoEncoder> encoders[kNumStreams]; |
- for (size_t i = 0; i < kNumStreams; ++i) |
- encoders[i].reset(VP8Encoder::Create()); |
+ std::unique_ptr<Call> sender_call; |
+ std::unique_ptr<Call> receiver_call; |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
+ std::unique_ptr<test::DirectTransport> receiver_transport; |
VideoSendStream* send_streams[kNumStreams]; |
VideoReceiveStream* receive_streams[kNumStreams]; |
- |
test::FrameGeneratorCapturer* frame_generators[kNumStreams]; |
std::vector<std::unique_ptr<VideoDecoder>> allocated_decoders; |
- for (size_t i = 0; i < kNumStreams; ++i) { |
- uint32_t ssrc = codec_settings[i].ssrc; |
- int width = codec_settings[i].width; |
- int height = codec_settings[i].height; |
- |
- VideoSendStream::Config send_config(sender_transport.get()); |
- send_config.rtp.ssrcs.push_back(ssrc); |
- send_config.encoder_settings.encoder = encoders[i].get(); |
- send_config.encoder_settings.payload_name = "VP8"; |
- send_config.encoder_settings.payload_type = kVideoPayloadType; |
- VideoEncoderConfig encoder_config; |
- test::FillEncoderConfiguration(1, &encoder_config); |
- encoder_config.max_bitrate_bps = 100000; |
- |
- UpdateSendConfig(i, &send_config, &encoder_config, &frame_generators[i]); |
- |
- send_streams[i] = sender_call->CreateVideoSendStream( |
- send_config.Copy(), encoder_config.Copy()); |
- send_streams[i]->Start(); |
- |
- VideoReceiveStream::Config receive_config(receiver_transport.get()); |
- receive_config.rtp.remote_ssrc = ssrc; |
- receive_config.rtp.local_ssrc = test::CallTest::kReceiverLocalVideoSsrc; |
- VideoReceiveStream::Decoder decoder = |
- test::CreateMatchingDecoder(send_config.encoder_settings); |
- allocated_decoders.push_back( |
- std::unique_ptr<VideoDecoder>(decoder.decoder)); |
- receive_config.decoders.push_back(decoder); |
- |
- UpdateReceiveConfig(i, &receive_config); |
- |
- receive_streams[i] = |
- receiver_call->CreateVideoReceiveStream(std::move(receive_config)); |
- receive_streams[i]->Start(); |
+ std::unique_ptr<VideoEncoder> encoders[kNumStreams]; |
- frame_generators[i] = test::FrameGeneratorCapturer::Create( |
- width, height, 30, Clock::GetRealTimeClock()); |
- send_streams[i]->SetSource( |
- frame_generators[i], |
- VideoSendStream::DegradationPreference::kMaintainFramerate); |
- frame_generators[i]->Start(); |
- } |
+ task_queue_->SendTask([&]() { |
+ sender_call = rtc::WrapUnique(Call::Create(config)); |
+ receiver_call = rtc::WrapUnique(Call::Create(config)); |
+ sender_transport = |
+ rtc::WrapUnique(CreateSendTransport(task_queue_, sender_call.get())); |
+ receiver_transport = rtc::WrapUnique( |
+ CreateReceiveTransport(task_queue_, receiver_call.get())); |
+ |
+ sender_transport->SetReceiver(receiver_call->Receiver()); |
+ receiver_transport->SetReceiver(sender_call->Receiver()); |
+ |
+ for (size_t i = 0; i < kNumStreams; ++i) |
+ encoders[i].reset(VP8Encoder::Create()); |
+ |
+ for (size_t i = 0; i < kNumStreams; ++i) { |
+ uint32_t ssrc = codec_settings[i].ssrc; |
+ int width = codec_settings[i].width; |
+ int height = codec_settings[i].height; |
+ |
+ VideoSendStream::Config send_config(sender_transport.get()); |
+ send_config.rtp.ssrcs.push_back(ssrc); |
+ send_config.encoder_settings.encoder = encoders[i].get(); |
+ send_config.encoder_settings.payload_name = "VP8"; |
+ send_config.encoder_settings.payload_type = kVideoPayloadType; |
+ VideoEncoderConfig encoder_config; |
+ test::FillEncoderConfiguration(1, &encoder_config); |
+ encoder_config.max_bitrate_bps = 100000; |
+ |
+ UpdateSendConfig(i, &send_config, &encoder_config, |
+ &frame_generators[i]); |
+ |
+ send_streams[i] = sender_call->CreateVideoSendStream( |
+ send_config.Copy(), encoder_config.Copy()); |
+ send_streams[i]->Start(); |
+ |
+ VideoReceiveStream::Config receive_config(receiver_transport.get()); |
+ receive_config.rtp.remote_ssrc = ssrc; |
+ receive_config.rtp.local_ssrc = test::CallTest::kReceiverLocalVideoSsrc; |
+ VideoReceiveStream::Decoder decoder = |
+ test::CreateMatchingDecoder(send_config.encoder_settings); |
+ allocated_decoders.push_back( |
+ std::unique_ptr<VideoDecoder>(decoder.decoder)); |
+ receive_config.decoders.push_back(decoder); |
+ |
+ UpdateReceiveConfig(i, &receive_config); |
+ |
+ receive_streams[i] = |
+ receiver_call->CreateVideoReceiveStream(std::move(receive_config)); |
+ receive_streams[i]->Start(); |
+ |
+ frame_generators[i] = test::FrameGeneratorCapturer::Create( |
+ width, height, 30, Clock::GetRealTimeClock()); |
+ send_streams[i]->SetSource( |
+ frame_generators[i], |
+ VideoSendStream::DegradationPreference::kMaintainFramerate); |
+ frame_generators[i]->Start(); |
+ } |
+ }); |
Wait(); |
- for (size_t i = 0; i < kNumStreams; ++i) { |
- frame_generators[i]->Stop(); |
- sender_call->DestroyVideoSendStream(send_streams[i]); |
- receiver_call->DestroyVideoReceiveStream(receive_streams[i]); |
- delete frame_generators[i]; |
- } |
+ task_queue_->SendTask([&]() { |
+ for (size_t i = 0; i < kNumStreams; ++i) { |
+ frame_generators[i]->Stop(); |
+ sender_call->DestroyVideoSendStream(send_streams[i]); |
+ receiver_call->DestroyVideoReceiveStream(receive_streams[i]); |
+ delete frame_generators[i]; |
+ } |
- sender_transport->StopSending(); |
- receiver_transport->StopSending(); |
+ sender_transport.reset(); |
+ receiver_transport.reset(); |
+ |
+ sender_call.reset(); |
+ receiver_call.reset(); |
+ }); |
} |
protected: |
@@ -1559,12 +1608,20 @@ class MultiStreamTest { |
virtual void UpdateReceiveConfig(size_t stream_index, |
VideoReceiveStream::Config* receive_config) { |
} |
- virtual test::DirectTransport* CreateSendTransport(Call* sender_call) { |
- return new test::DirectTransport(sender_call, payload_type_map_); |
+ virtual test::DirectTransport* CreateSendTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* sender_call) { |
+ return new test::DirectTransport(task_queue, sender_call, |
+ payload_type_map_); |
} |
- virtual test::DirectTransport* CreateReceiveTransport(Call* receiver_call) { |
- return new test::DirectTransport(receiver_call, payload_type_map_); |
+ virtual test::DirectTransport* CreateReceiveTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* receiver_call) { |
+ return new test::DirectTransport(task_queue, receiver_call, |
+ payload_type_map_); |
} |
+ |
+ test::SingleThreadedTaskQueueForTesting* const task_queue_; |
}; |
// Each renderer verifies that it receives the expected resolution, and as soon |
@@ -1600,7 +1657,8 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) { |
class Tester : public MultiStreamTest { |
public: |
- Tester() {} |
+ explicit Tester(test::SingleThreadedTaskQueueForTesting* task_queue) |
+ : MultiStreamTest(task_queue) {} |
virtual ~Tester() {} |
protected: |
@@ -1629,7 +1687,7 @@ TEST_F(EndToEndTest, SendsAndReceivesMultipleStreams) { |
private: |
std::unique_ptr<VideoOutputObserver> observers_[kNumStreams]; |
- } tester; |
+ } tester(&task_queue_); |
tester.RunTest(); |
} |
@@ -1640,11 +1698,12 @@ TEST_F(EndToEndTest, AssignsTransportSequenceNumbers) { |
class RtpExtensionHeaderObserver : public test::DirectTransport { |
public: |
RtpExtensionHeaderObserver( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
Call* sender_call, |
const uint32_t& first_media_ssrc, |
const std::map<uint32_t, uint32_t>& ssrc_map, |
const std::map<uint8_t, MediaType>& payload_type_map) |
- : DirectTransport(sender_call, payload_type_map), |
+ : DirectTransport(task_queue, sender_call, payload_type_map), |
done_(false, false), |
parser_(RtpHeaderParser::Create()), |
first_media_ssrc_(first_media_ssrc), |
@@ -1759,8 +1818,11 @@ TEST_F(EndToEndTest, AssignsTransportSequenceNumbers) { |
class TransportSequenceNumberTester : public MultiStreamTest { |
public: |
- TransportSequenceNumberTester() |
- : first_media_ssrc_(0), observer_(nullptr) {} |
+ explicit TransportSequenceNumberTester( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) |
+ : MultiStreamTest(task_queue), |
+ first_media_ssrc_(0), |
+ observer_(nullptr) {} |
virtual ~TransportSequenceNumberTester() {} |
protected: |
@@ -1807,15 +1869,17 @@ TEST_F(EndToEndTest, AssignsTransportSequenceNumbers) { |
receive_config->renderer = &fake_renderer_; |
} |
- test::DirectTransport* CreateSendTransport(Call* sender_call) override { |
+ test::DirectTransport* CreateSendTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* sender_call) override { |
std::map<uint8_t, MediaType> payload_type_map = |
MultiStreamTest::payload_type_map_; |
RTC_DCHECK(payload_type_map.find(kSendRtxPayloadType) == |
payload_type_map.end()); |
payload_type_map[kSendRtxPayloadType] = MediaType::VIDEO; |
- observer_ = |
- new RtpExtensionHeaderObserver(sender_call, first_media_ssrc_, |
- rtx_to_media_ssrcs_, payload_type_map); |
+ observer_ = new RtpExtensionHeaderObserver( |
+ task_queue, sender_call, first_media_ssrc_, rtx_to_media_ssrcs_, |
+ payload_type_map); |
return observer_; |
} |
@@ -1824,7 +1888,7 @@ TEST_F(EndToEndTest, AssignsTransportSequenceNumbers) { |
uint32_t first_media_ssrc_; |
std::map<uint32_t, uint32_t> rtx_to_media_ssrcs_; |
RtpExtensionHeaderObserver* observer_; |
- } tester; |
+ } tester(&task_queue_); |
tester.RunTest(); |
} |
@@ -2037,30 +2101,36 @@ TEST_F(EndToEndTest, ObserversEncodedFrames) { |
EncodedFrameTestObserver post_encode_observer; |
EncodedFrameTestObserver pre_decode_observer; |
+ test::FrameForwarder forwarder; |
+ std::unique_ptr<test::FrameGenerator> frame_generator; |
- CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
+ std::unique_ptr<test::DirectTransport> receiver_transport; |
- test::DirectTransport sender_transport(sender_call_.get(), payload_type_map_); |
- test::DirectTransport receiver_transport(receiver_call_.get(), |
- payload_type_map_); |
- sender_transport.SetReceiver(receiver_call_->Receiver()); |
- receiver_transport.SetReceiver(sender_call_->Receiver()); |
+ task_queue_.SendTask([&]() { |
+ CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
- CreateSendConfig(1, 0, 0, &sender_transport); |
- CreateMatchingReceiveConfigs(&receiver_transport); |
- video_send_config_.post_encode_callback = &post_encode_observer; |
- video_receive_configs_[0].pre_decode_callback = &pre_decode_observer; |
+ sender_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, sender_call_.get(), payload_type_map_); |
+ receiver_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, receiver_call_.get(), payload_type_map_); |
+ sender_transport->SetReceiver(receiver_call_->Receiver()); |
+ receiver_transport->SetReceiver(sender_call_->Receiver()); |
- CreateVideoStreams(); |
- Start(); |
+ CreateSendConfig(1, 0, 0, sender_transport.get()); |
+ CreateMatchingReceiveConfigs(receiver_transport.get()); |
+ video_send_config_.post_encode_callback = &post_encode_observer; |
+ video_receive_configs_[0].pre_decode_callback = &pre_decode_observer; |
- std::unique_ptr<test::FrameGenerator> frame_generator( |
- test::FrameGenerator::CreateSquareGenerator(kDefaultWidth, |
- kDefaultHeight)); |
- test::FrameForwarder forwarder; |
- video_send_stream_->SetSource( |
- &forwarder, VideoSendStream::DegradationPreference::kMaintainFramerate); |
- forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
+ CreateVideoStreams(); |
+ Start(); |
+ |
+ frame_generator = test::FrameGenerator::CreateSquareGenerator( |
+ kDefaultWidth, kDefaultHeight); |
+ video_send_stream_->SetSource( |
+ &forwarder, VideoSendStream::DegradationPreference::kMaintainFramerate); |
+ forwarder.IncomingCapturedFrame(*frame_generator->NextFrame()); |
+ }); |
EXPECT_TRUE(post_encode_observer.Wait()) |
<< "Timed out while waiting for send-side encoded-frame callback."; |
@@ -2070,12 +2140,13 @@ TEST_F(EndToEndTest, ObserversEncodedFrames) { |
post_encode_observer.ExpectEqualFrames(pre_decode_observer); |
- Stop(); |
- |
- sender_transport.StopSending(); |
- receiver_transport.StopSending(); |
- |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &sender_transport, &receiver_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ sender_transport.reset(); |
+ receiver_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
TEST_F(EndToEndTest, ReceiveStreamSendsRemb) { |
@@ -2203,10 +2274,11 @@ TEST_F(EndToEndTest, RembWithSendSideBwe) { |
~BweObserver() {} |
- test::PacketTransport* CreateReceiveTransport() override { |
+ test::PacketTransport* CreateReceiveTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) override { |
receive_transport_ = new test::PacketTransport( |
- nullptr, this, test::PacketTransport::kReceiver, payload_type_map_, |
- FakeNetworkPipe::Config()); |
+ task_queue, nullptr, this, test::PacketTransport::kReceiver, |
+ payload_type_map_, FakeNetworkPipe::Config()); |
return receive_transport_; |
} |
@@ -2313,7 +2385,9 @@ TEST_F(EndToEndTest, RembWithSendSideBwe) { |
TEST_F(EndToEndTest, StopSendingKeyframeRequestsForInactiveStream) { |
class KeyframeRequestObserver : public test::EndToEndTest { |
public: |
- KeyframeRequestObserver() : clock_(Clock::GetRealTimeClock()) {} |
+ explicit KeyframeRequestObserver( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) |
+ : clock_(Clock::GetRealTimeClock()), task_queue_(task_queue) {} |
void OnVideoStreamsCreated( |
VideoSendStream* send_stream, |
@@ -2334,7 +2408,7 @@ TEST_F(EndToEndTest, StopSendingKeyframeRequestsForInactiveStream) { |
SleepMs(100); |
} |
ASSERT_TRUE(frame_decoded); |
- send_stream_->Stop(); |
+ task_queue_->SendTask([this]() { send_stream_->Stop(); }); |
SleepMs(10000); |
ASSERT_EQ( |
1U, receive_stream_->GetStats().rtcp_packet_type_counts.pli_packets); |
@@ -2344,7 +2418,8 @@ TEST_F(EndToEndTest, StopSendingKeyframeRequestsForInactiveStream) { |
Clock* clock_; |
VideoSendStream* send_stream_; |
VideoReceiveStream* receive_stream_; |
- } test; |
+ test::SingleThreadedTaskQueueForTesting* const task_queue_; |
+ } test(&task_queue_); |
RunBaseTest(&test); |
} |
@@ -2429,8 +2504,10 @@ TEST_F(EndToEndTest, TriggerMidCallProbing) { |
class TriggerMidCallProbingTest : public ProbingTest { |
public: |
- explicit TriggerMidCallProbingTest(bool* success) |
- : ProbingTest(300000), success_(success) {} |
+ TriggerMidCallProbingTest( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ bool* success) |
+ : ProbingTest(300000), success_(success), task_queue_(task_queue) {} |
void PerformTest() override { |
*success_ = false; |
@@ -2446,7 +2523,9 @@ TEST_F(EndToEndTest, TriggerMidCallProbing) { |
if (stats.send_bandwidth_bps > 5 * 300000) { |
Call::Config::BitrateConfig bitrate_config; |
bitrate_config.max_bitrate_bps = 100000; |
- sender_call_->SetBitrateConfig(bitrate_config); |
+ task_queue_->SendTask([this, &bitrate_config]() { |
+ sender_call_->SetBitrateConfig(bitrate_config); |
+ }); |
++state_; |
} |
break; |
@@ -2454,7 +2533,9 @@ TEST_F(EndToEndTest, TriggerMidCallProbing) { |
if (stats.send_bandwidth_bps < 110000) { |
Call::Config::BitrateConfig bitrate_config; |
bitrate_config.max_bitrate_bps = 2500000; |
- sender_call_->SetBitrateConfig(bitrate_config); |
+ task_queue_->SendTask([this, &bitrate_config]() { |
+ sender_call_->SetBitrateConfig(bitrate_config); |
+ }); |
++state_; |
} |
break; |
@@ -2474,12 +2555,13 @@ TEST_F(EndToEndTest, TriggerMidCallProbing) { |
private: |
const int kTimeoutMs = 5000; |
bool* const success_; |
+ test::SingleThreadedTaskQueueForTesting* const task_queue_; |
}; |
bool success = false; |
const int kMaxAttempts = 3; |
for (int i = 0; i < kMaxAttempts; ++i) { |
- TriggerMidCallProbingTest test(&success); |
+ TriggerMidCallProbingTest test(&task_queue_, &success); |
RunBaseTest(&test); |
if (success) |
return; |
@@ -2711,10 +2793,6 @@ void EndToEndTest::VerifyHistogramStats(bool use_rtx, |
metrics::Reset(); |
RunBaseTest(&test); |
- // Delete the call for Call stats to be reported. |
- sender_call_.reset(); |
- receiver_call_.reset(); |
- |
std::string video_prefix = |
screenshare ? "WebRTC.Video.Screenshare." : "WebRTC.Video."; |
@@ -2881,59 +2959,67 @@ TEST_F(EndToEndTest, MAYBE_ContentTypeSwitches) { |
metrics::Reset(); |
Call::Config send_config(test.GetSenderCallConfig()); |
- CreateSenderCall(send_config); |
Call::Config recv_config(test.GetReceiverCallConfig()); |
- CreateReceiverCall(recv_config); |
- receive_transport_.reset(test.CreateReceiveTransport()); |
- send_transport_.reset(test.CreateSendTransport(sender_call_.get())); |
- send_transport_->SetReceiver(receiver_call_->Receiver()); |
- receive_transport_->SetReceiver(sender_call_->Receiver()); |
- receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
- CreateSendConfig(1, 0, 0, send_transport_.get()); |
- CreateMatchingReceiveConfigs(receive_transport_.get()); |
- |
- // Modify send and receive configs. |
- video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- video_receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- video_receive_configs_[0].renderer = &test; |
- // RTT needed for RemoteNtpTimeEstimator for the receive stream. |
- video_receive_configs_[0].rtp.rtcp_xr.receiver_reference_time_report = true; |
- // Start with realtime video. |
- video_encoder_config_.content_type = |
- VideoEncoderConfig::ContentType::kRealtimeVideo; |
- // Second encoder config for the second part of the test uses screenshare |
- VideoEncoderConfig encoder_config_with_screenshare_ = |
- video_encoder_config_.Copy(); |
- encoder_config_with_screenshare_.content_type = |
- VideoEncoderConfig::ContentType::kScreen; |
- |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
- kDefaultHeight); |
- Start(); |
+ VideoEncoderConfig encoder_config_with_screenshare; |
+ |
+ task_queue_.SendTask([this, &test, &override_field_trials, &send_config, |
+ &recv_config, &encoder_config_with_screenshare]() { |
+ CreateSenderCall(send_config); |
+ CreateReceiverCall(recv_config); |
+ |
+ receive_transport_.reset(test.CreateReceiveTransport(&task_queue_)); |
+ send_transport_.reset( |
+ test.CreateSendTransport(&task_queue_, sender_call_.get())); |
+ send_transport_->SetReceiver(receiver_call_->Receiver()); |
+ receive_transport_->SetReceiver(sender_call_->Receiver()); |
+ |
+ receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ CreateSendConfig(1, 0, 0, send_transport_.get()); |
+ CreateMatchingReceiveConfigs(receive_transport_.get()); |
+ |
+ // Modify send and receive configs. |
+ video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
+ video_receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
+ video_receive_configs_[0].renderer = &test; |
+ // RTT needed for RemoteNtpTimeEstimator for the receive stream. |
+ video_receive_configs_[0].rtp.rtcp_xr.receiver_reference_time_report = true; |
+ // Start with realtime video. |
+ video_encoder_config_.content_type = |
+ VideoEncoderConfig::ContentType::kRealtimeVideo; |
+ // Second encoder config for the second part of the test uses screenshare |
+ encoder_config_with_screenshare = video_encoder_config_.Copy(); |
+ encoder_config_with_screenshare.content_type = |
+ VideoEncoderConfig::ContentType::kScreen; |
+ |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
+ kDefaultHeight); |
+ Start(); |
+ }); |
test.PerformTest(); |
// Replace old send stream. |
- sender_call_->DestroyVideoSendStream(video_send_stream_); |
- video_send_stream_ = sender_call_->CreateVideoSendStream( |
- video_send_config_.Copy(), encoder_config_with_screenshare_.Copy()); |
- video_send_stream_->SetSource( |
- frame_generator_capturer_.get(), |
- VideoSendStream::DegradationPreference::kBalanced); |
- video_send_stream_->Start(); |
+ task_queue_.SendTask([this, &encoder_config_with_screenshare]() { |
+ sender_call_->DestroyVideoSendStream(video_send_stream_); |
+ video_send_stream_ = sender_call_->CreateVideoSendStream( |
+ video_send_config_.Copy(), encoder_config_with_screenshare.Copy()); |
+ video_send_stream_->SetSource( |
+ frame_generator_capturer_.get(), |
+ VideoSendStream::DegradationPreference::kBalanced); |
+ video_send_stream_->Start(); |
+ }); |
// Continue to run test but now with screenshare. |
test.PerformTest(); |
- send_transport_->StopSending(); |
- receive_transport_->StopSending(); |
- Stop(); |
- DestroyStreams(); |
- DestroyCalls(); |
- // Delete the call for Call stats to be reported. |
- sender_call_.reset(); |
- receiver_call_.reset(); |
+ task_queue_.SendTask([this]() { |
+ Stop(); |
+ DestroyStreams(); |
+ send_transport_.reset(); |
+ receive_transport_.reset(); |
+ DestroyCalls(); |
+ }); |
// Verify that stats have been updated for both screenshare and video. |
EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.EndToEndDelayInMs")); |
@@ -3097,9 +3183,11 @@ TEST_F(EndToEndTest, ReportsSetEncoderRates) { |
class EncoderRateStatsTest : public test::EndToEndTest, |
public test::FakeEncoder { |
public: |
- EncoderRateStatsTest() |
+ explicit EncoderRateStatsTest( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) |
: EndToEndTest(kDefaultTimeoutMs), |
FakeEncoder(Clock::GetRealTimeClock()), |
+ task_queue_(task_queue), |
send_stream_(nullptr), |
bitrate_kbps_(0) {} |
@@ -3131,11 +3219,14 @@ TEST_F(EndToEndTest, ReportsSetEncoderRates) { |
void PerformTest() override { |
ASSERT_TRUE(Wait()) |
<< "Timed out while waiting for encoder SetRates() call."; |
- WaitForEncoderTargetBitrateMatchStats(); |
- send_stream_->Stop(); |
- WaitForStatsReportZeroTargetBitrate(); |
- send_stream_->Start(); |
- WaitForEncoderTargetBitrateMatchStats(); |
+ |
+ task_queue_->SendTask([this]() { |
+ WaitForEncoderTargetBitrateMatchStats(); |
+ send_stream_->Stop(); |
+ WaitForStatsReportZeroTargetBitrate(); |
+ send_stream_->Start(); |
+ WaitForEncoderTargetBitrateMatchStats(); |
+ }); |
} |
void WaitForEncoderTargetBitrateMatchStats() { |
@@ -3165,10 +3256,11 @@ TEST_F(EndToEndTest, ReportsSetEncoderRates) { |
} |
private: |
+ test::SingleThreadedTaskQueueForTesting* const task_queue_; |
rtc::CriticalSection crit_; |
VideoSendStream* send_stream_; |
uint32_t bitrate_kbps_ GUARDED_BY(crit_); |
- } test; |
+ } test(&task_queue_); |
RunBaseTest(&test); |
} |
@@ -3375,10 +3467,12 @@ TEST_F(EndToEndTest, GetStats) { |
return true; |
} |
- test::PacketTransport* CreateSendTransport(Call* sender_call) override { |
+ test::PacketTransport* CreateSendTransport( |
+ test::SingleThreadedTaskQueueForTesting* task_queue, |
+ Call* sender_call) override { |
FakeNetworkPipe::Config network_config; |
network_config.loss_percent = 5; |
- return new test::PacketTransport(sender_call, this, |
+ return new test::PacketTransport(task_queue, sender_call, this, |
test::PacketTransport::kSender, |
payload_type_map_, network_config); |
} |
@@ -3483,8 +3577,7 @@ TEST_F(EndToEndTest, GetStats) { |
ADD_FAILURE() << "Timed out waiting for filled stats."; |
for (std::map<std::string, bool>::const_iterator it = |
receive_stats_filled_.begin(); |
- it != receive_stats_filled_.end(); |
- ++it) { |
+ it != receive_stats_filled_.end(); ++it) { |
if (!it->second) { |
ADD_FAILURE() << "Missing receive stats: " << it->first; |
} |
@@ -3492,8 +3585,7 @@ TEST_F(EndToEndTest, GetStats) { |
for (std::map<std::string, bool>::const_iterator it = |
send_stats_filled_.begin(); |
- it != send_stats_filled_.end(); |
- ++it) { |
+ it != send_stats_filled_.end(); ++it) { |
if (!it->second) { |
ADD_FAILURE() << "Missing send stats: " << it->first; |
} |
@@ -3982,91 +4074,111 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx, |
std::map<uint32_t, bool> ssrc_observed_ GUARDED_BY(crit_); |
} observer(use_rtx); |
+ std::unique_ptr<test::PacketTransport> send_transport; |
+ std::unique_ptr<test::PacketTransport> receive_transport; |
+ |
Call::Config config(event_log_.get()); |
- CreateCalls(config, config); |
+ VideoEncoderConfig one_stream; |
- test::PacketTransport send_transport( |
- sender_call_.get(), &observer, test::PacketTransport::kSender, |
- payload_type_map_, FakeNetworkPipe::Config()); |
- test::PacketTransport receive_transport( |
- nullptr, &observer, test::PacketTransport::kReceiver, payload_type_map_, |
- FakeNetworkPipe::Config()); |
- send_transport.SetReceiver(receiver_call_->Receiver()); |
- receive_transport.SetReceiver(sender_call_->Receiver()); |
+ task_queue_.SendTask([this, &observer, &send_transport, &receive_transport, |
+ &config, &one_stream, use_rtx]() { |
+ CreateCalls(config, config); |
- CreateSendConfig(kNumSsrcs, 0, 0, &send_transport); |
+ send_transport = rtc::MakeUnique<test::PacketTransport>( |
+ &task_queue_, sender_call_.get(), &observer, |
+ test::PacketTransport::kSender, payload_type_map_, |
+ FakeNetworkPipe::Config()); |
+ receive_transport = rtc::MakeUnique<test::PacketTransport>( |
+ &task_queue_, nullptr, &observer, test::PacketTransport::kReceiver, |
+ payload_type_map_, FakeNetworkPipe::Config()); |
+ send_transport->SetReceiver(receiver_call_->Receiver()); |
+ receive_transport->SetReceiver(sender_call_->Receiver()); |
- if (use_rtx) { |
- for (size_t i = 0; i < kNumSsrcs; ++i) { |
- video_send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]); |
+ CreateSendConfig(kNumSsrcs, 0, 0, send_transport.get()); |
+ |
+ if (use_rtx) { |
+ for (size_t i = 0; i < kNumSsrcs; ++i) { |
+ video_send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]); |
+ } |
+ video_send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
} |
- video_send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
- } |
- video_encoder_config_.video_stream_factory = |
- new rtc::RefCountedObject<VideoStreamFactory>(); |
- // Use the same total bitrates when sending a single stream to avoid lowering |
- // the bitrate estimate and requiring a subsequent rampup. |
- VideoEncoderConfig one_stream = video_encoder_config_.Copy(); |
- // one_stream.streams.resize(1); |
- one_stream.number_of_streams = 1; |
- CreateMatchingReceiveConfigs(&receive_transport); |
+ video_encoder_config_.video_stream_factory = |
+ new rtc::RefCountedObject<VideoStreamFactory>(); |
+ // Use the same total bitrates when sending a single stream to avoid |
+ // lowering the bitrate estimate and requiring a subsequent rampup. |
+ one_stream = video_encoder_config_.Copy(); |
+ // one_stream.streams.resize(1); |
+ one_stream.number_of_streams = 1; |
+ CreateMatchingReceiveConfigs(receive_transport.get()); |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(30, 1280, 720); |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(30, 1280, 720); |
+ |
+ Start(); |
+ }); |
- Start(); |
EXPECT_TRUE(observer.Wait()) |
<< "Timed out waiting for all SSRCs to send packets."; |
// Test stream resetting more than once to make sure that the state doesn't |
// get set once (this could be due to using std::map::insert for instance). |
for (size_t i = 0; i < 3; ++i) { |
- frame_generator_capturer_->Stop(); |
- sender_call_->DestroyVideoSendStream(video_send_stream_); |
- |
- // Re-create VideoSendStream with only one stream. |
- video_send_stream_ = sender_call_->CreateVideoSendStream( |
- video_send_config_.Copy(), one_stream.Copy()); |
- video_send_stream_->Start(); |
- if (provoke_rtcpsr_before_rtp) { |
- // Rapid Resync Request forces sending RTCP Sender Report back. |
- // Using this request speeds up this test because then there is no need |
- // to wait for a second for periodic Sender Report. |
- rtcp::RapidResyncRequest force_send_sr_back_request; |
- rtc::Buffer packet = force_send_sr_back_request.Build(); |
- static_cast<webrtc::test::DirectTransport&>(receive_transport) |
- .SendRtcp(packet.data(), packet.size()); |
- } |
- CreateFrameGeneratorCapturer(30, 1280, 720); |
- frame_generator_capturer_->Start(); |
+ task_queue_.SendTask([&]() { |
+ frame_generator_capturer_->Stop(); |
+ sender_call_->DestroyVideoSendStream(video_send_stream_); |
+ |
+ // Re-create VideoSendStream with only one stream. |
+ video_send_stream_ = sender_call_->CreateVideoSendStream( |
+ video_send_config_.Copy(), one_stream.Copy()); |
+ video_send_stream_->Start(); |
+ if (provoke_rtcpsr_before_rtp) { |
+ // Rapid Resync Request forces sending RTCP Sender Report back. |
+ // Using this request speeds up this test because then there is no need |
+ // to wait for a second for periodic Sender Report. |
+ rtcp::RapidResyncRequest force_send_sr_back_request; |
+ rtc::Buffer packet = force_send_sr_back_request.Build(); |
+ static_cast<webrtc::test::DirectTransport*>(receive_transport.get()) |
+ ->SendRtcp(packet.data(), packet.size()); |
+ } |
+ CreateFrameGeneratorCapturer(30, 1280, 720); |
+ frame_generator_capturer_->Start(); |
+ }); |
observer.ResetExpectedSsrcs(1); |
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for single RTP packet."; |
// Reconfigure back to use all streams. |
- video_send_stream_->ReconfigureVideoEncoder(video_encoder_config_.Copy()); |
+ task_queue_.SendTask([this]() { |
+ video_send_stream_->ReconfigureVideoEncoder(video_encoder_config_.Copy()); |
+ }); |
observer.ResetExpectedSsrcs(kNumSsrcs); |
EXPECT_TRUE(observer.Wait()) |
<< "Timed out waiting for all SSRCs to send packets."; |
// Reconfigure down to one stream. |
- video_send_stream_->ReconfigureVideoEncoder(one_stream.Copy()); |
+ task_queue_.SendTask([this, &one_stream]() { |
+ video_send_stream_->ReconfigureVideoEncoder(one_stream.Copy()); |
+ }); |
observer.ResetExpectedSsrcs(1); |
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for single RTP packet."; |
// Reconfigure back to use all streams. |
- video_send_stream_->ReconfigureVideoEncoder(video_encoder_config_.Copy()); |
+ task_queue_.SendTask([this]() { |
+ video_send_stream_->ReconfigureVideoEncoder(video_encoder_config_.Copy()); |
+ }); |
observer.ResetExpectedSsrcs(kNumSsrcs); |
EXPECT_TRUE(observer.Wait()) |
<< "Timed out waiting for all SSRCs to send packets."; |
} |
- send_transport.StopSending(); |
- receive_transport.StopSending(); |
- |
- Stop(); |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &send_transport, &receive_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ send_transport.reset(); |
+ receive_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
TEST_F(EndToEndTest, RestartingSendStreamPreservesRtpState) { |
@@ -4157,96 +4269,118 @@ TEST_F(EndToEndTest, MAYBE_TestFlexfecRtpStatePreservation) { |
rtc::CriticalSection crit_; |
} observer; |
- Call::Config config(event_log_.get()); |
- CreateCalls(config, config); |
+ constexpr int kFrameMaxWidth = 320; |
+ constexpr int kFrameMaxHeight = 180; |
+ constexpr int kFrameRate = 15; |
- FakeNetworkPipe::Config lossy_delayed_link; |
- lossy_delayed_link.loss_percent = 2; |
- lossy_delayed_link.queue_delay_ms = 50; |
- test::PacketTransport send_transport(sender_call_.get(), &observer, |
- test::PacketTransport::kSender, |
- payload_type_map_, lossy_delayed_link); |
- send_transport.SetReceiver(receiver_call_->Receiver()); |
- |
- FakeNetworkPipe::Config flawless_link; |
- test::PacketTransport receive_transport(nullptr, &observer, |
- test::PacketTransport::kReceiver, |
- payload_type_map_, flawless_link); |
- receive_transport.SetReceiver(sender_call_->Receiver()); |
- |
- // For reduced flakyness, we use a real VP8 encoder together with NACK |
- // and RTX. |
- const int kNumVideoStreams = 1; |
- const int kNumFlexfecStreams = 1; |
- CreateSendConfig(kNumVideoStreams, 0, kNumFlexfecStreams, &send_transport); |
- std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create()); |
- video_send_config_.encoder_settings.encoder = encoder.get(); |
- video_send_config_.encoder_settings.payload_name = "VP8"; |
- video_send_config_.encoder_settings.payload_type = kVideoSendPayloadType; |
- video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- video_send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); |
- video_send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
- |
- CreateMatchingReceiveConfigs(&receive_transport); |
- video_receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- video_receive_configs_[0].rtp.rtx_ssrc = kSendRtxSsrcs[0]; |
- video_receive_configs_[0].rtp.rtx_payload_types[kVideoSendPayloadType] = |
- kSendRtxPayloadType; |
- |
- // The matching FlexFEC receive config is not created by |
- // CreateMatchingReceiveConfigs since this is not a test::BaseTest. |
- // Set up the receive config manually instead. |
- FlexfecReceiveStream::Config flexfec_receive_config(&receive_transport); |
- flexfec_receive_config.payload_type = |
- video_send_config_.rtp.flexfec.payload_type; |
- flexfec_receive_config.remote_ssrc = video_send_config_.rtp.flexfec.ssrc; |
- flexfec_receive_config.protected_media_ssrcs = |
- video_send_config_.rtp.flexfec.protected_media_ssrcs; |
- flexfec_receive_config.local_ssrc = kReceiverLocalVideoSsrc; |
- flexfec_receive_config.transport_cc = true; |
- flexfec_receive_config.rtp_header_extensions.emplace_back( |
- RtpExtension::kTransportSequenceNumberUri, |
- test::kTransportSequenceNumberExtensionId); |
- flexfec_receive_configs_.push_back(flexfec_receive_config); |
- |
- CreateFlexfecStreams(); |
- CreateVideoStreams(); |
+ Call::Config config(event_log_.get()); |
- // RTCP might be disabled if the network is "down". |
- sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
- receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ std::unique_ptr<test::PacketTransport> send_transport; |
+ std::unique_ptr<test::PacketTransport> receive_transport; |
+ std::unique_ptr<VideoEncoder> encoder; |
+ |
+ task_queue_.SendTask([&]() { |
+ CreateCalls(config, config); |
+ |
+ FakeNetworkPipe::Config lossy_delayed_link; |
+ lossy_delayed_link.loss_percent = 2; |
+ lossy_delayed_link.queue_delay_ms = 50; |
+ |
+ send_transport = rtc::MakeUnique<test::PacketTransport>( |
+ &task_queue_, sender_call_.get(), &observer, |
+ test::PacketTransport::kSender, payload_type_map_, lossy_delayed_link); |
+ send_transport->SetReceiver(receiver_call_->Receiver()); |
+ |
+ FakeNetworkPipe::Config flawless_link; |
+ receive_transport = rtc::MakeUnique<test::PacketTransport>( |
+ &task_queue_, nullptr, &observer, test::PacketTransport::kReceiver, |
+ payload_type_map_, flawless_link); |
+ receive_transport->SetReceiver(sender_call_->Receiver()); |
+ |
+ // For reduced flakyness, we use a real VP8 encoder together with NACK |
+ // and RTX. |
+ const int kNumVideoStreams = 1; |
+ const int kNumFlexfecStreams = 1; |
+ CreateSendConfig(kNumVideoStreams, 0, kNumFlexfecStreams, |
+ send_transport.get()); |
+ encoder = rtc::WrapUnique(VP8Encoder::Create()); |
+ video_send_config_.encoder_settings.encoder = encoder.get(); |
+ video_send_config_.encoder_settings.payload_name = "VP8"; |
+ video_send_config_.encoder_settings.payload_type = kVideoSendPayloadType; |
+ video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
+ video_send_config_.rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[0]); |
+ video_send_config_.rtp.rtx.payload_type = kSendRtxPayloadType; |
- const int kFrameMaxWidth = 320; |
- const int kFrameMaxHeight = 180; |
- const int kFrameRate = 15; |
- CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight); |
+ CreateMatchingReceiveConfigs(receive_transport.get()); |
+ video_receive_configs_[0].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
+ video_receive_configs_[0].rtp.rtx_ssrc = kSendRtxSsrcs[0]; |
+ video_receive_configs_[0].rtp.rtx_payload_types[kVideoSendPayloadType] = |
+ kSendRtxPayloadType; |
+ |
+ // The matching FlexFEC receive config is not created by |
+ // CreateMatchingReceiveConfigs since this is not a test::BaseTest. |
+ // Set up the receive config manually instead. |
+ FlexfecReceiveStream::Config flexfec_receive_config( |
+ receive_transport.get()); |
+ flexfec_receive_config.payload_type = |
+ video_send_config_.rtp.flexfec.payload_type; |
+ flexfec_receive_config.remote_ssrc = video_send_config_.rtp.flexfec.ssrc; |
+ flexfec_receive_config.protected_media_ssrcs = |
+ video_send_config_.rtp.flexfec.protected_media_ssrcs; |
+ flexfec_receive_config.local_ssrc = kReceiverLocalVideoSsrc; |
+ flexfec_receive_config.transport_cc = true; |
+ flexfec_receive_config.rtp_header_extensions.emplace_back( |
+ RtpExtension::kTransportSequenceNumberUri, |
+ test::kTransportSequenceNumberExtensionId); |
+ flexfec_receive_configs_.push_back(flexfec_receive_config); |
+ |
+ CreateFlexfecStreams(); |
+ CreateVideoStreams(); |
+ |
+ // RTCP might be disabled if the network is "down". |
+ sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ |
+ CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight); |
+ |
+ Start(); |
+ }); |
// Initial test. |
- Start(); |
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets."; |
- // Ensure monotonicity when the VideoSendStream is restarted. |
- Stop(); |
- observer.ResetPacketCount(); |
- Start(); |
+ task_queue_.SendTask([this, &observer]() { |
+ // Ensure monotonicity when the VideoSendStream is restarted. |
+ Stop(); |
+ observer.ResetPacketCount(); |
+ Start(); |
+ }); |
+ |
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets."; |
- // Ensure monotonicity when the VideoSendStream is recreated. |
- frame_generator_capturer_->Stop(); |
- sender_call_->DestroyVideoSendStream(video_send_stream_); |
- observer.ResetPacketCount(); |
- video_send_stream_ = sender_call_->CreateVideoSendStream( |
- video_send_config_.Copy(), video_encoder_config_.Copy()); |
- video_send_stream_->Start(); |
- CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight); |
- frame_generator_capturer_->Start(); |
+ task_queue_.SendTask([this, &observer, |
+ kFrameRate, kFrameMaxWidth, kFrameMaxHeight]() { |
+ // Ensure monotonicity when the VideoSendStream is recreated. |
+ frame_generator_capturer_->Stop(); |
+ sender_call_->DestroyVideoSendStream(video_send_stream_); |
+ observer.ResetPacketCount(); |
+ video_send_stream_ = sender_call_->CreateVideoSendStream( |
+ video_send_config_.Copy(), video_encoder_config_.Copy()); |
+ video_send_stream_->Start(); |
+ CreateFrameGeneratorCapturer(kFrameRate, kFrameMaxWidth, kFrameMaxHeight); |
+ frame_generator_capturer_->Start(); |
+ }); |
+ |
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets."; |
// Cleanup. |
- send_transport.StopSending(); |
- receive_transport.StopSending(); |
- Stop(); |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &send_transport, &receive_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ send_transport.reset(); |
+ receive_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
TEST_F(EndToEndTest, RespectsNetworkState) { |
@@ -4261,9 +4395,11 @@ TEST_F(EndToEndTest, RespectsNetworkState) { |
static const int kNumAcceptedDowntimeRtcp = 1; |
class NetworkStateTest : public test::EndToEndTest, public test::FakeEncoder { |
public: |
- NetworkStateTest() |
+ explicit NetworkStateTest( |
+ test::SingleThreadedTaskQueueForTesting* task_queue) |
: EndToEndTest(kDefaultTimeoutMs), |
FakeEncoder(Clock::GetRealTimeClock()), |
+ task_queue_(task_queue), |
encoded_frames_(false, false), |
packet_event_(false, false), |
sender_call_(nullptr), |
@@ -4320,51 +4456,57 @@ TEST_F(EndToEndTest, RespectsNetworkState) { |
void PerformTest() override { |
EXPECT_TRUE(encoded_frames_.Wait(kDefaultTimeoutMs)) |
<< "No frames received by the encoder."; |
- // Wait for packets from both sender/receiver. |
- WaitForPacketsOrSilence(false, false); |
- // Sender-side network down for audio; there should be no effect on video |
- sender_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkDown); |
- WaitForPacketsOrSilence(false, false); |
+ task_queue_->SendTask([this]() { |
+ // Wait for packets from both sender/receiver. |
+ WaitForPacketsOrSilence(false, false); |
- // Receiver-side network down for audio; no change expected |
- receiver_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkDown); |
- WaitForPacketsOrSilence(false, false); |
+ // Sender-side network down for audio; there should be no effect on |
+ // video |
+ sender_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkDown); |
+ WaitForPacketsOrSilence(false, false); |
- // Sender-side network down. |
- sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkDown); |
- { |
- rtc::CritScope lock(&test_crit_); |
- // After network goes down we shouldn't be encoding more frames. |
- sender_state_ = kNetworkDown; |
- } |
- // Wait for receiver-packets and no sender packets. |
- WaitForPacketsOrSilence(true, false); |
+ // Receiver-side network down for audio; no change expected |
+ receiver_call_->SignalChannelNetworkState(MediaType::AUDIO, |
+ kNetworkDown); |
+ WaitForPacketsOrSilence(false, false); |
+ |
+ // Sender-side network down. |
+ sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkDown); |
+ { |
+ rtc::CritScope lock(&test_crit_); |
+ // After network goes down we shouldn't be encoding more frames. |
+ sender_state_ = kNetworkDown; |
+ } |
+ // Wait for receiver-packets and no sender packets. |
+ WaitForPacketsOrSilence(true, false); |
- // Receiver-side network down. |
- receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkDown); |
- WaitForPacketsOrSilence(true, true); |
+ // Receiver-side network down. |
+ receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, |
+ kNetworkDown); |
+ WaitForPacketsOrSilence(true, true); |
- // Network up for audio for both sides; video is still not expected to |
- // start |
- sender_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp); |
- receiver_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp); |
- WaitForPacketsOrSilence(true, true); |
+ // Network up for audio for both sides; video is still not expected to |
+ // start |
+ sender_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp); |
+ receiver_call_->SignalChannelNetworkState(MediaType::AUDIO, kNetworkUp); |
+ WaitForPacketsOrSilence(true, true); |
- // Network back up again for both. |
- { |
- rtc::CritScope lock(&test_crit_); |
- // It's OK to encode frames again, as we're about to bring up the |
- // network. |
- sender_state_ = kNetworkUp; |
- } |
- sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
- receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
- WaitForPacketsOrSilence(false, false); |
+ // Network back up again for both. |
+ { |
+ rtc::CritScope lock(&test_crit_); |
+ // It's OK to encode frames again, as we're about to bring up the |
+ // network. |
+ sender_state_ = kNetworkUp; |
+ } |
+ sender_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ receiver_call_->SignalChannelNetworkState(MediaType::VIDEO, kNetworkUp); |
+ WaitForPacketsOrSilence(false, false); |
- // TODO(skvlad): add tests to verify that the audio streams are stopped |
- // when the network goes down for audio once the workaround in |
- // paced_sender.cc is removed. |
+ // TODO(skvlad): add tests to verify that the audio streams are stopped |
+ // when the network goes down for audio once the workaround in |
+ // paced_sender.cc is removed. |
+ }); |
} |
int32_t Encode(const VideoFrame& input_image, |
@@ -4434,6 +4576,7 @@ TEST_F(EndToEndTest, RespectsNetworkState) { |
} |
} |
+ test::SingleThreadedTaskQueueForTesting* const task_queue_; |
rtc::CriticalSection test_crit_; |
rtc::Event encoded_frames_; |
rtc::Event packet_event_; |
@@ -4445,7 +4588,7 @@ TEST_F(EndToEndTest, RespectsNetworkState) { |
int sender_rtcp_ GUARDED_BY(test_crit_); |
int receiver_rtcp_ GUARDED_BY(test_crit_); |
int down_frames_ GUARDED_BY(test_crit_); |
- } test; |
+ } test(&task_queue_); |
RunBaseTest(&test); |
} |
@@ -4453,25 +4596,30 @@ TEST_F(EndToEndTest, RespectsNetworkState) { |
TEST_F(EndToEndTest, CallReportsRttForSender) { |
static const int kSendDelayMs = 30; |
static const int kReceiveDelayMs = 70; |
- CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
- FakeNetworkPipe::Config config; |
- config.queue_delay_ms = kSendDelayMs; |
- test::DirectTransport sender_transport(config, sender_call_.get(), |
- payload_type_map_); |
- config.queue_delay_ms = kReceiveDelayMs; |
- test::DirectTransport receiver_transport(config, receiver_call_.get(), |
- payload_type_map_); |
- sender_transport.SetReceiver(receiver_call_->Receiver()); |
- receiver_transport.SetReceiver(sender_call_->Receiver()); |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
+ std::unique_ptr<test::DirectTransport> receiver_transport; |
- CreateSendConfig(1, 0, 0, &sender_transport); |
- CreateMatchingReceiveConfigs(&receiver_transport); |
- |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
- kDefaultHeight); |
- Start(); |
+ task_queue_.SendTask([this, &sender_transport, &receiver_transport]() { |
+ FakeNetworkPipe::Config config; |
+ config.queue_delay_ms = kSendDelayMs; |
+ CreateCalls(Call::Config(event_log_.get()), Call::Config(event_log_.get())); |
+ sender_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, config, sender_call_.get(), payload_type_map_); |
+ config.queue_delay_ms = kReceiveDelayMs; |
+ receiver_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, config, receiver_call_.get(), payload_type_map_); |
+ sender_transport->SetReceiver(receiver_call_->Receiver()); |
+ receiver_transport->SetReceiver(sender_call_->Receiver()); |
+ |
+ CreateSendConfig(1, 0, 0, sender_transport.get()); |
+ CreateMatchingReceiveConfigs(receiver_transport.get()); |
+ |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
+ kDefaultHeight); |
+ Start(); |
+ }); |
int64_t start_time_ms = clock_->TimeInMilliseconds(); |
while (true) { |
@@ -4489,55 +4637,70 @@ TEST_F(EndToEndTest, CallReportsRttForSender) { |
SleepMs(10); |
} |
- sender_transport.StopSending(); |
- receiver_transport.StopSending(); |
- Stop(); |
- DestroyStreams(); |
- DestroyCalls(); |
+ task_queue_.SendTask([this, &sender_transport, &receiver_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ sender_transport.reset(); |
+ receiver_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
void EndToEndTest::VerifyNewVideoSendStreamsRespectNetworkState( |
MediaType network_to_bring_up, |
VideoEncoder* encoder, |
Transport* transport) { |
- CreateSenderCall(Call::Config(event_log_.get())); |
- sender_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp); |
+ task_queue_.SendTask([this, network_to_bring_up, encoder, transport]() { |
+ CreateSenderCall(Call::Config(event_log_.get())); |
+ sender_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp); |
- CreateSendConfig(1, 0, 0, transport); |
- video_send_config_.encoder_settings.encoder = encoder; |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
- kDefaultHeight); |
+ CreateSendConfig(1, 0, 0, transport); |
+ video_send_config_.encoder_settings.encoder = encoder; |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
+ kDefaultHeight); |
+ |
+ Start(); |
+ }); |
- Start(); |
SleepMs(kSilenceTimeoutMs); |
- Stop(); |
- DestroyStreams(); |
+ task_queue_.SendTask([this]() { |
+ Stop(); |
+ DestroyStreams(); |
+ DestroyCalls(); |
+ }); |
} |
void EndToEndTest::VerifyNewVideoReceiveStreamsRespectNetworkState( |
MediaType network_to_bring_up, |
Transport* transport) { |
- Call::Config config(event_log_.get()); |
- CreateCalls(config, config); |
- receiver_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp); |
+ std::unique_ptr<test::DirectTransport> sender_transport; |
- test::DirectTransport sender_transport(sender_call_.get(), payload_type_map_); |
- sender_transport.SetReceiver(receiver_call_->Receiver()); |
- CreateSendConfig(1, 0, 0, &sender_transport); |
- CreateMatchingReceiveConfigs(transport); |
- CreateVideoStreams(); |
- CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
- kDefaultHeight); |
+ task_queue_.SendTask([this, &sender_transport, network_to_bring_up, |
+ transport]() { |
+ Call::Config config(event_log_.get()); |
+ CreateCalls(config, config); |
+ receiver_call_->SignalChannelNetworkState(network_to_bring_up, kNetworkUp); |
+ sender_transport = rtc::MakeUnique<test::DirectTransport>( |
+ &task_queue_, sender_call_.get(), payload_type_map_); |
+ sender_transport->SetReceiver(receiver_call_->Receiver()); |
+ CreateSendConfig(1, 0, 0, sender_transport.get()); |
+ CreateMatchingReceiveConfigs(transport); |
+ CreateVideoStreams(); |
+ CreateFrameGeneratorCapturer(kDefaultFramerate, kDefaultWidth, |
+ kDefaultHeight); |
+ Start(); |
+ }); |
- Start(); |
SleepMs(kSilenceTimeoutMs); |
- Stop(); |
- |
- sender_transport.StopSending(); |
- DestroyStreams(); |
+ task_queue_.SendTask([this, &sender_transport]() { |
+ Stop(); |
+ DestroyStreams(); |
+ sender_transport.reset(); |
+ DestroyCalls(); |
+ }); |
} |
TEST_F(EndToEndTest, NewVideoSendStreamsRespectVideoNetworkDown) { |