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

Unified Diff: webrtc/test/call_test.cc

Issue 2974453002: Protected streams report RTP messages directly to the FlexFec streams (Closed)
Patch Set: Appease lint. Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/video/rtp_video_stream_receiver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/call_test.cc
diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc
index 893d7e07de4d87e516e9ae18217393b04d6a2723..6e04fd64ae1a23eafe2539d0f05e7f8c04fb3175 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 (FlexfecReceiveStream* flexfec_recv_stream : flexfec_receive_streams_) {
+ for (VideoReceiveStream* video_recv_stream : video_receive_streams_) {
+ video_recv_stream->AddSecondarySink(flexfec_recv_stream);
+ }
+ }
+}
+
+void CallTest::DissociateFlexfecStreamsFromVideoStreams() {
+ for (FlexfecReceiveStream* flexfec_recv_stream : flexfec_receive_streams_) {
+ for (VideoReceiveStream* video_recv_stream : video_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;
« no previous file with comments | « webrtc/test/call_test.h ('k') | webrtc/video/rtp_video_stream_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698