Chromium Code Reviews| Index: webrtc/test/call_test.cc |
| diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc |
| index 638e70483a1bccaa48f775cffb1c88fc4096a51f..f658114ed9c32cfa38ae0ef070d5f5f7f64ee225 100644 |
| --- a/webrtc/test/call_test.cc |
| +++ b/webrtc/test/call_test.cc |
| @@ -336,8 +336,11 @@ void CallTest::CreateVideoStreams() { |
| video_receive_streams_.push_back(receiver_call_->CreateVideoReceiveStream( |
| video_receive_configs_[i].Copy())); |
| } |
| + |
| + AssociateFlexfecStreamsWithVideoStreams(); |
| } |
| +// TODO(eladalon): This is not the order in the header; fix in separate CL. |
|
stefan-webrtc
2017/07/07 09:36:24
I don't think you need to add this TODO, just crea
eladalon
2017/07/07 14:16:24
Done.
|
| void CallTest::SetFakeVideoCaptureRotation(VideoRotation rotation) { |
| frame_generator_capturer_->SetFakeRotation(rotation); |
| } |
| @@ -356,9 +359,30 @@ void CallTest::CreateFlexfecStreams() { |
| receiver_call_->CreateFlexfecReceiveStream( |
| flexfec_receive_configs_[i])); |
| } |
| + |
| + AssociateFlexfecStreamsWithVideoStreams(); |
| +} |
| + |
| +void CallTest::AssociateFlexfecStreamsWithVideoStreams() { |
| + // All FlexFEC streams protect all of the video streams. |
| + for (auto* flexfec_receive_stream : flexfec_receive_streams_) { |
| + for (auto* video_recv_stream : video_receive_streams_) { |
| + video_recv_stream->AddSecondarySink(flexfec_receive_stream); |
| + } |
| + } |
| +} |
| + |
| +void CallTest::DissociateFlexfecStreamsFromVideoStreams() { |
| + for (VideoReceiveStream* video_recv_stream : video_receive_streams_) { |
| + for (FlexfecReceiveStream* flexfec_recv_stream : flexfec_receive_streams_) { |
| + video_recv_stream->RemoveSecondarySink(flexfec_recv_stream); |
| + } |
| + } |
| } |
| void CallTest::DestroyStreams() { |
| + DissociateFlexfecStreamsFromVideoStreams(); |
| + |
| if (audio_send_stream_) |
| sender_call_->DestroyAudioSendStream(audio_send_stream_); |
| audio_send_stream_ = nullptr; |
| @@ -369,8 +393,9 @@ void CallTest::DestroyStreams() { |
| sender_call_->DestroyVideoSendStream(video_send_stream_); |
| video_send_stream_ = nullptr; |
| - for (VideoReceiveStream* video_recv_stream : video_receive_streams_) |
| + for (VideoReceiveStream* video_recv_stream : video_receive_streams_) { |
| receiver_call_->DestroyVideoReceiveStream(video_recv_stream); |
| + } |
| for (FlexfecReceiveStream* flexfec_recv_stream : flexfec_receive_streams_) |
| receiver_call_->DestroyFlexfecReceiveStream(flexfec_recv_stream); |