Chromium Code Reviews| Index: webrtc/test/call_test.cc |
| diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc |
| index 893d7e07de4d87e516e9ae18217393b04d6a2723..329a0054c761d6edcc93e0401038c168ffcf2d92 100644 |
| --- a/webrtc/test/call_test.cc |
| +++ b/webrtc/test/call_test.cc |
| @@ -336,6 +336,8 @@ void CallTest::CreateVideoStreams() { |
| video_receive_streams_.push_back(receiver_call_->CreateVideoReceiveStream( |
| video_receive_configs_[i].Copy())); |
| } |
| + |
| + AssociateFlexfecStreamsWithVideoStreams(); |
| } |
| void CallTest::SetFakeVideoCaptureRotation(VideoRotation rotation) { |
| @@ -356,9 +358,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_) { |
|
brandtr
2017/08/01 08:34:15
nit: flexfec_recv_stream for consistency
eladalon
2017/08/01 09:30:28
Done.
|
| + for (auto* video_recv_stream : video_receive_streams_) { |
|
brandtr
2017/08/01 08:34:15
I'd prefer the explicit type names here, even if i
eladalon
2017/08/01 09:30:28
Done.
|
| + 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_) { |
|
brandtr
2017/08/01 08:34:15
Does it matter which order you loop over video/fle
eladalon
2017/08/01 09:30:28
Yeah, I just saw this while responding to your pre
|
| + 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; |