Index: webrtc/call/rampup_tests.cc |
diff --git a/webrtc/call/rampup_tests.cc b/webrtc/call/rampup_tests.cc |
index 292edc60836b4533d7ce5cb2c45fbee869821bd6..0a2a7384d8dd7d0ad1eec0a1c68a88ee3b8b939c 100644 |
--- a/webrtc/call/rampup_tests.cc |
+++ b/webrtc/call/rampup_tests.cc |
@@ -89,13 +89,34 @@ void RampUpTester::OnVideoStreamsCreated( |
send_stream_ = send_stream; |
} |
+MediaType RampUpTester::SelectMediaType() { |
+ if (num_video_streams_ > 0) { |
+ if (num_audio_streams_ > 0) { |
+ // Rely on call to set media type from payload type. |
+ return MediaType::ANY; |
+ } else { |
+ return MediaType::VIDEO; |
+ } |
+ } else { |
+ return MediaType::AUDIO; |
+ } |
+} |
+ |
test::PacketTransport* RampUpTester::CreateSendTransport(Call* sender_call) { |
send_transport_ = new test::PacketTransport(sender_call, this, |
test::PacketTransport::kSender, |
+ SelectMediaType(), |
forward_transport_config_); |
return send_transport_; |
} |
+test::PacketTransport* RampUpTester::CreateReceiveTransport() { |
+ return new test::PacketTransport(nullptr, this, |
+ test::PacketTransport::kReceiver, |
+ SelectMediaType(), |
+ FakeNetworkPipe::Config()); |
+} |
+ |
size_t RampUpTester::GetNumVideoStreams() const { |
return num_video_streams_; |
} |