OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 using cricket::FakeWebRtcVideoEncoder; | 71 using cricket::FakeWebRtcVideoEncoder; |
72 using cricket::FakeWebRtcVideoEncoderFactory; | 72 using cricket::FakeWebRtcVideoEncoderFactory; |
73 using cricket::MediaContentDescription; | 73 using cricket::MediaContentDescription; |
74 using webrtc::DataBuffer; | 74 using webrtc::DataBuffer; |
75 using webrtc::DataChannelInterface; | 75 using webrtc::DataChannelInterface; |
76 using webrtc::DtmfSender; | 76 using webrtc::DtmfSender; |
77 using webrtc::DtmfSenderInterface; | 77 using webrtc::DtmfSenderInterface; |
78 using webrtc::DtmfSenderObserverInterface; | 78 using webrtc::DtmfSenderObserverInterface; |
79 using webrtc::FakeConstraints; | 79 using webrtc::FakeConstraints; |
80 using webrtc::MediaConstraintsInterface; | 80 using webrtc::MediaConstraintsInterface; |
| 81 using webrtc::MediaStreamInterface; |
81 using webrtc::MediaStreamTrackInterface; | 82 using webrtc::MediaStreamTrackInterface; |
82 using webrtc::MockCreateSessionDescriptionObserver; | 83 using webrtc::MockCreateSessionDescriptionObserver; |
83 using webrtc::MockDataChannelObserver; | 84 using webrtc::MockDataChannelObserver; |
84 using webrtc::MockSetSessionDescriptionObserver; | 85 using webrtc::MockSetSessionDescriptionObserver; |
85 using webrtc::MockStatsObserver; | 86 using webrtc::MockStatsObserver; |
| 87 using webrtc::ObserverInterface; |
86 using webrtc::PeerConnectionInterface; | 88 using webrtc::PeerConnectionInterface; |
87 using webrtc::PeerConnectionFactory; | 89 using webrtc::PeerConnectionFactory; |
88 using webrtc::SessionDescriptionInterface; | 90 using webrtc::SessionDescriptionInterface; |
89 using webrtc::StreamCollectionInterface; | 91 using webrtc::StreamCollectionInterface; |
90 | 92 |
91 static const int kMaxWaitMs = 10000; | 93 static const int kMaxWaitMs = 10000; |
92 // Disable for TSan v2, see | 94 // Disable for TSan v2, see |
93 // https://code.google.com/p/webrtc/issues/detail?id=1205 for details. | 95 // https://code.google.com/p/webrtc/issues/detail?id=1205 for details. |
94 // This declaration is also #ifdef'd as it causes uninitialized-variable | 96 // This declaration is also #ifdef'd as it causes uninitialized-variable |
95 // warnings. | 97 // warnings. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 virtual void ReceiveIceMessage(const std::string& sdp_mid, | 134 virtual void ReceiveIceMessage(const std::string& sdp_mid, |
133 int sdp_mline_index, | 135 int sdp_mline_index, |
134 const std::string& msg) = 0; | 136 const std::string& msg) = 0; |
135 | 137 |
136 protected: | 138 protected: |
137 SignalingMessageReceiver() {} | 139 SignalingMessageReceiver() {} |
138 virtual ~SignalingMessageReceiver() {} | 140 virtual ~SignalingMessageReceiver() {} |
139 }; | 141 }; |
140 | 142 |
141 class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, | 143 class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, |
142 public SignalingMessageReceiver { | 144 public SignalingMessageReceiver, |
| 145 public ObserverInterface { |
143 public: | 146 public: |
144 static PeerConnectionTestClient* CreateClient( | 147 static PeerConnectionTestClient* CreateClient( |
145 const std::string& id, | 148 const std::string& id, |
146 const MediaConstraintsInterface* constraints, | 149 const MediaConstraintsInterface* constraints, |
147 const PeerConnectionFactory::Options* options) { | 150 const PeerConnectionFactory::Options* options) { |
148 PeerConnectionTestClient* client(new PeerConnectionTestClient(id)); | 151 PeerConnectionTestClient* client(new PeerConnectionTestClient(id)); |
149 if (!client->Init(constraints, options)) { | 152 if (!client->Init(constraints, options)) { |
150 delete client; | 153 delete client; |
151 return nullptr; | 154 return nullptr; |
152 } | 155 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate( | 202 rtc::scoped_ptr<webrtc::IceCandidateInterface> candidate( |
200 webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, msg, nullptr)); | 203 webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, msg, nullptr)); |
201 EXPECT_TRUE(pc()->AddIceCandidate(candidate.get())); | 204 EXPECT_TRUE(pc()->AddIceCandidate(candidate.get())); |
202 } | 205 } |
203 | 206 |
204 // PeerConnectionObserver callbacks. | 207 // PeerConnectionObserver callbacks. |
205 void OnSignalingChange( | 208 void OnSignalingChange( |
206 webrtc::PeerConnectionInterface::SignalingState new_state) override { | 209 webrtc::PeerConnectionInterface::SignalingState new_state) override { |
207 EXPECT_EQ(pc()->signaling_state(), new_state); | 210 EXPECT_EQ(pc()->signaling_state(), new_state); |
208 } | 211 } |
209 void OnAddStream(webrtc::MediaStreamInterface* media_stream) override { | 212 void OnAddStream(MediaStreamInterface* media_stream) override { |
| 213 media_stream->RegisterObserver(this); |
210 for (size_t i = 0; i < media_stream->GetVideoTracks().size(); ++i) { | 214 for (size_t i = 0; i < media_stream->GetVideoTracks().size(); ++i) { |
211 const std::string id = media_stream->GetVideoTracks()[i]->id(); | 215 const std::string id = media_stream->GetVideoTracks()[i]->id(); |
212 ASSERT_TRUE(fake_video_renderers_.find(id) == | 216 ASSERT_TRUE(fake_video_renderers_.find(id) == |
213 fake_video_renderers_.end()); | 217 fake_video_renderers_.end()); |
214 fake_video_renderers_[id] = | 218 fake_video_renderers_[id] = |
215 new webrtc::FakeVideoTrackRenderer(media_stream->GetVideoTracks()[i]); | 219 new webrtc::FakeVideoTrackRenderer(media_stream->GetVideoTracks()[i]); |
216 } | 220 } |
217 } | 221 } |
218 void OnRemoveStream(webrtc::MediaStreamInterface* media_stream) override {} | 222 void OnRemoveStream(MediaStreamInterface* media_stream) override {} |
219 void OnRenegotiationNeeded() override {} | 223 void OnRenegotiationNeeded() override {} |
220 void OnIceConnectionChange( | 224 void OnIceConnectionChange( |
221 webrtc::PeerConnectionInterface::IceConnectionState new_state) override { | 225 webrtc::PeerConnectionInterface::IceConnectionState new_state) override { |
222 EXPECT_EQ(pc()->ice_connection_state(), new_state); | 226 EXPECT_EQ(pc()->ice_connection_state(), new_state); |
223 } | 227 } |
224 void OnIceGatheringChange( | 228 void OnIceGatheringChange( |
225 webrtc::PeerConnectionInterface::IceGatheringState new_state) override { | 229 webrtc::PeerConnectionInterface::IceGatheringState new_state) override { |
226 EXPECT_EQ(pc()->ice_gathering_state(), new_state); | 230 EXPECT_EQ(pc()->ice_gathering_state(), new_state); |
227 } | 231 } |
228 void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override { | 232 void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override { |
229 LOG(INFO) << id_ << "OnIceCandidate"; | 233 LOG(INFO) << id_ << "OnIceCandidate"; |
230 | 234 |
231 std::string ice_sdp; | 235 std::string ice_sdp; |
232 EXPECT_TRUE(candidate->ToString(&ice_sdp)); | 236 EXPECT_TRUE(candidate->ToString(&ice_sdp)); |
233 if (signaling_message_receiver_ == nullptr) { | 237 if (signaling_message_receiver_ == nullptr) { |
234 // Remote party may be deleted. | 238 // Remote party may be deleted. |
235 return; | 239 return; |
236 } | 240 } |
237 signaling_message_receiver_->ReceiveIceMessage( | 241 signaling_message_receiver_->ReceiveIceMessage( |
238 candidate->sdp_mid(), candidate->sdp_mline_index(), ice_sdp); | 242 candidate->sdp_mid(), candidate->sdp_mline_index(), ice_sdp); |
239 } | 243 } |
240 | 244 |
| 245 // MediaStreamInterface callback |
| 246 void OnChanged() override { |
| 247 // Track added or removed from MediaStream, so update our renderers. |
| 248 rtc::scoped_refptr<StreamCollectionInterface> remote_streams = |
| 249 pc()->remote_streams(); |
| 250 // Remove renderers for tracks that were removed. |
| 251 for (auto it = fake_video_renderers_.begin(); |
| 252 it != fake_video_renderers_.end();) { |
| 253 if (remote_streams->FindVideoTrack(it->first) == nullptr) { |
| 254 auto to_delete = it++; |
| 255 delete to_delete->second; |
| 256 fake_video_renderers_.erase(to_delete); |
| 257 } else { |
| 258 ++it; |
| 259 } |
| 260 } |
| 261 // Create renderers for new video tracks. |
| 262 for (size_t stream_index = 0; stream_index < remote_streams->count(); |
| 263 ++stream_index) { |
| 264 MediaStreamInterface* remote_stream = remote_streams->at(stream_index); |
| 265 for (size_t track_index = 0; |
| 266 track_index < remote_stream->GetVideoTracks().size(); |
| 267 ++track_index) { |
| 268 const std::string id = |
| 269 remote_stream->GetVideoTracks()[track_index]->id(); |
| 270 if (fake_video_renderers_.find(id) != fake_video_renderers_.end()) { |
| 271 continue; |
| 272 } |
| 273 fake_video_renderers_[id] = new webrtc::FakeVideoTrackRenderer( |
| 274 remote_stream->GetVideoTracks()[track_index]); |
| 275 } |
| 276 } |
| 277 } |
| 278 |
241 void SetVideoConstraints(const webrtc::FakeConstraints& video_constraint) { | 279 void SetVideoConstraints(const webrtc::FakeConstraints& video_constraint) { |
242 video_constraints_ = video_constraint; | 280 video_constraints_ = video_constraint; |
243 } | 281 } |
244 | 282 |
245 void AddMediaStream(bool audio, bool video) { | 283 void AddMediaStream(bool audio, bool video) { |
246 std::string stream_label = | 284 std::string stream_label = |
247 kStreamLabelBase + | 285 kStreamLabelBase + |
248 rtc::ToString<int>(static_cast<int>(pc()->local_streams()->count())); | 286 rtc::ToString<int>(static_cast<int>(pc()->local_streams()->count())); |
249 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream = | 287 rtc::scoped_refptr<MediaStreamInterface> stream = |
250 peer_connection_factory_->CreateLocalMediaStream(stream_label); | 288 peer_connection_factory_->CreateLocalMediaStream(stream_label); |
251 | 289 |
252 if (audio && can_receive_audio()) { | 290 if (audio && can_receive_audio()) { |
253 FakeConstraints constraints; | 291 FakeConstraints constraints; |
254 // Disable highpass filter so that we can get all the test audio frames. | 292 // Disable highpass filter so that we can get all the test audio frames. |
255 constraints.AddMandatory( | 293 constraints.AddMandatory( |
256 MediaConstraintsInterface::kHighpassFilter, false); | 294 MediaConstraintsInterface::kHighpassFilter, false); |
257 rtc::scoped_refptr<webrtc::AudioSourceInterface> source = | 295 rtc::scoped_refptr<webrtc::AudioSourceInterface> source = |
258 peer_connection_factory_->CreateAudioSource(&constraints); | 296 peer_connection_factory_->CreateAudioSource(&constraints); |
259 // TODO(perkj): Test audio source when it is implemented. Currently audio | 297 // TODO(perkj): Test audio source when it is implemented. Currently audio |
260 // always use the default input. | 298 // always use the default input. |
261 std::string label = stream_label + kAudioTrackLabelBase; | 299 std::string label = stream_label + kAudioTrackLabelBase; |
262 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( | 300 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( |
263 peer_connection_factory_->CreateAudioTrack(label, source)); | 301 peer_connection_factory_->CreateAudioTrack(label, source)); |
264 stream->AddTrack(audio_track); | 302 stream->AddTrack(audio_track); |
265 } | 303 } |
266 if (video && can_receive_video()) { | 304 if (video && can_receive_video()) { |
267 stream->AddTrack(CreateLocalVideoTrack(stream_label)); | 305 stream->AddTrack(CreateLocalVideoTrack(stream_label)); |
268 } | 306 } |
269 | 307 |
270 EXPECT_TRUE(pc()->AddStream(stream)); | 308 EXPECT_TRUE(pc()->AddStream(stream)); |
271 } | 309 } |
272 | 310 |
273 size_t NumberOfLocalMediaStreams() { return pc()->local_streams()->count(); } | 311 size_t NumberOfLocalMediaStreams() { return pc()->local_streams()->count(); } |
274 | 312 |
275 bool SessionActive() { | 313 bool SessionActive() { |
276 return pc()->signaling_state() == webrtc::PeerConnectionInterface::kStable; | 314 return pc()->signaling_state() == webrtc::PeerConnectionInterface::kStable; |
277 } | 315 } |
278 | 316 |
| 317 // Automatically add a stream when receiving an offer, if we don't have one. |
| 318 // Defaults to true. |
| 319 void set_auto_add_stream(bool auto_add_stream) { |
| 320 auto_add_stream_ = auto_add_stream; |
| 321 } |
| 322 |
279 void set_signaling_message_receiver( | 323 void set_signaling_message_receiver( |
280 SignalingMessageReceiver* signaling_message_receiver) { | 324 SignalingMessageReceiver* signaling_message_receiver) { |
281 signaling_message_receiver_ = signaling_message_receiver; | 325 signaling_message_receiver_ = signaling_message_receiver; |
282 } | 326 } |
283 | 327 |
284 void EnableVideoDecoderFactory() { | 328 void EnableVideoDecoderFactory() { |
285 video_decoder_factory_enabled_ = true; | 329 video_decoder_factory_enabled_ = true; |
286 fake_video_decoder_factory_->AddSupportedVideoCodecType( | 330 fake_video_decoder_factory_->AddSupportedVideoCodecType( |
287 webrtc::kVideoCodecVP8); | 331 webrtc::kVideoCodecVP8); |
288 } | 332 } |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 | 742 |
699 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store( | 743 rtc::scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store( |
700 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeDtlsIdentityStore() | 744 rtc::SSLStreamAdapter::HaveDtlsSrtp() ? new FakeDtlsIdentityStore() |
701 : nullptr); | 745 : nullptr); |
702 return peer_connection_factory_->CreatePeerConnection( | 746 return peer_connection_factory_->CreatePeerConnection( |
703 ice_servers, constraints, factory, dtls_identity_store.Pass(), this); | 747 ice_servers, constraints, factory, dtls_identity_store.Pass(), this); |
704 } | 748 } |
705 | 749 |
706 void HandleIncomingOffer(const std::string& msg) { | 750 void HandleIncomingOffer(const std::string& msg) { |
707 LOG(INFO) << id_ << "HandleIncomingOffer "; | 751 LOG(INFO) << id_ << "HandleIncomingOffer "; |
708 if (NumberOfLocalMediaStreams() == 0) { | 752 if (NumberOfLocalMediaStreams() == 0 && auto_add_stream_) { |
709 // If we are not sending any streams ourselves it is time to add some. | 753 // If we are not sending any streams ourselves it is time to add some. |
710 AddMediaStream(true, true); | 754 AddMediaStream(true, true); |
711 } | 755 } |
712 rtc::scoped_ptr<SessionDescriptionInterface> desc( | 756 rtc::scoped_ptr<SessionDescriptionInterface> desc( |
713 webrtc::CreateSessionDescription("offer", msg, nullptr)); | 757 webrtc::CreateSessionDescription("offer", msg, nullptr)); |
714 EXPECT_TRUE(DoSetRemoteDescription(desc.release())); | 758 EXPECT_TRUE(DoSetRemoteDescription(desc.release())); |
715 rtc::scoped_ptr<SessionDescriptionInterface> answer; | 759 rtc::scoped_ptr<SessionDescriptionInterface> answer; |
716 EXPECT_TRUE(DoCreateAnswer(answer.use())); | 760 EXPECT_TRUE(DoCreateAnswer(answer.use())); |
717 std::string sdp; | 761 std::string sdp; |
718 EXPECT_TRUE(answer->ToString(&sdp)); | 762 EXPECT_TRUE(answer->ToString(&sdp)); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 } | 849 } |
806 } | 850 } |
807 | 851 |
808 std::string id_; | 852 std::string id_; |
809 | 853 |
810 rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> allocator_factory_; | 854 rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> allocator_factory_; |
811 rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_; | 855 rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_; |
812 rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> | 856 rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> |
813 peer_connection_factory_; | 857 peer_connection_factory_; |
814 | 858 |
| 859 bool auto_add_stream_ = true; |
| 860 |
815 typedef std::pair<std::string, std::string> IceUfragPwdPair; | 861 typedef std::pair<std::string, std::string> IceUfragPwdPair; |
816 std::map<int, IceUfragPwdPair> ice_ufrag_pwd_; | 862 std::map<int, IceUfragPwdPair> ice_ufrag_pwd_; |
817 bool expect_ice_restart_ = false; | 863 bool expect_ice_restart_ = false; |
818 | 864 |
819 // Needed to keep track of number of frames send. | 865 // Needed to keep track of number of frames send. |
820 rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_; | 866 rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_; |
821 // Needed to keep track of number of frames received. | 867 // Needed to keep track of number of frames received. |
822 typedef std::map<std::string, webrtc::FakeVideoTrackRenderer*> RenderMap; | 868 typedef std::map<std::string, webrtc::FakeVideoTrackRenderer*> RenderMap; |
823 RenderMap fake_video_renderers_; | 869 RenderMap fake_video_renderers_; |
824 // Needed to keep track of number of frames received when external decoder | 870 // Needed to keep track of number of frames received when external decoder |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 if (initiating_client_->NumberOfLocalMediaStreams() == 0) { | 1002 if (initiating_client_->NumberOfLocalMediaStreams() == 0) { |
957 initiating_client_->AddMediaStream(true, true); | 1003 initiating_client_->AddMediaStream(true, true); |
958 } | 1004 } |
959 initiating_client_->Negotiate(); | 1005 initiating_client_->Negotiate(); |
960 const int kMaxWaitForActivationMs = 5000; | 1006 const int kMaxWaitForActivationMs = 5000; |
961 // Assert true is used here since next tests are guaranteed to fail and | 1007 // Assert true is used here since next tests are guaranteed to fail and |
962 // would eat up 5 seconds. | 1008 // would eat up 5 seconds. |
963 ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs); | 1009 ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs); |
964 VerifySessionDescriptions(); | 1010 VerifySessionDescriptions(); |
965 | 1011 |
966 | |
967 int audio_frame_count = kEndAudioFrameCount; | 1012 int audio_frame_count = kEndAudioFrameCount; |
968 // TODO(ronghuawu): Add test to cover the case of sendonly and recvonly. | 1013 // TODO(ronghuawu): Add test to cover the case of sendonly and recvonly. |
969 if (!initiating_client_->can_receive_audio() || | 1014 if (!initiating_client_->can_receive_audio() || |
970 !receiving_client_->can_receive_audio()) { | 1015 !receiving_client_->can_receive_audio()) { |
971 audio_frame_count = -1; | 1016 audio_frame_count = -1; |
972 } | 1017 } |
973 int video_frame_count = kEndVideoFrameCount; | 1018 int video_frame_count = kEndVideoFrameCount; |
974 if (!initiating_client_->can_receive_video() || | 1019 if (!initiating_client_->can_receive_video() || |
975 !receiving_client_->can_receive_video()) { | 1020 !receiving_client_->can_receive_video()) { |
976 video_frame_count = -1; | 1021 video_frame_count = -1; |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1555 std::string receiver_candidate_restart; | 1600 std::string receiver_candidate_restart; |
1556 EXPECT_TRUE(audio_candidates_reciever_restart->at(0)->ToString( | 1601 EXPECT_TRUE(audio_candidates_reciever_restart->at(0)->ToString( |
1557 &receiver_candidate_restart)); | 1602 &receiver_candidate_restart)); |
1558 | 1603 |
1559 // Verify that the first candidates in the local session descriptions has | 1604 // Verify that the first candidates in the local session descriptions has |
1560 // changed. | 1605 // changed. |
1561 EXPECT_NE(initiator_candidate, initiator_candidate_restart); | 1606 EXPECT_NE(initiator_candidate, initiator_candidate_restart); |
1562 EXPECT_NE(receiver_candidate, receiver_candidate_restart); | 1607 EXPECT_NE(receiver_candidate, receiver_candidate_restart); |
1563 } | 1608 } |
1564 | 1609 |
| 1610 // This test sets up a call between two parties with audio, and video. |
| 1611 // It then renegotiates setting the video m-line to "port 0", then later |
| 1612 // renegotiates again, enabling video. |
| 1613 TEST_F(JsepPeerConnectionP2PTestClient, LocalP2PTestVideoDisableEnable) { |
| 1614 ASSERT_TRUE(CreateTestClients()); |
| 1615 |
| 1616 // Do initial negotiation. Will result in video and audio sendonly m-lines. |
| 1617 receiving_client()->set_auto_add_stream(false); |
| 1618 initializing_client()->AddMediaStream(true, true); |
| 1619 initializing_client()->Negotiate(); |
| 1620 |
| 1621 // Negotiate again, disabling the video m-line (receiving client will |
| 1622 // set port to 0 due to mandatory "OfferToReceiveVideo: false" constraint). |
| 1623 receiving_client()->SetReceiveVideo(false); |
| 1624 initializing_client()->Negotiate(); |
| 1625 |
| 1626 // Enable video and do negotiation again, making sure video is received |
| 1627 // end-to-end. |
| 1628 receiving_client()->SetReceiveVideo(true); |
| 1629 receiving_client()->AddMediaStream(true, true); |
| 1630 LocalP2PTest(); |
| 1631 } |
| 1632 |
1565 // This test sets up a Jsep call between two parties with external | 1633 // This test sets up a Jsep call between two parties with external |
1566 // VideoDecoderFactory. | 1634 // VideoDecoderFactory. |
1567 // TODO(holmer): Disabled due to sometimes crashing on buildbots. | 1635 // TODO(holmer): Disabled due to sometimes crashing on buildbots. |
1568 // See issue webrtc/2378. | 1636 // See issue webrtc/2378. |
1569 TEST_F(JsepPeerConnectionP2PTestClient, | 1637 TEST_F(JsepPeerConnectionP2PTestClient, |
1570 DISABLED_LocalP2PTestWithVideoDecoderFactory) { | 1638 DISABLED_LocalP2PTestWithVideoDecoderFactory) { |
1571 ASSERT_TRUE(CreateTestClients()); | 1639 ASSERT_TRUE(CreateTestClients()); |
1572 EnableVideoDecoderFactory(); | 1640 EnableVideoDecoderFactory(); |
1573 LocalP2PTest(); | 1641 LocalP2PTest(); |
1574 } | 1642 } |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 server.urls.push_back("stun:hostname"); | 1811 server.urls.push_back("stun:hostname"); |
1744 server.urls.push_back("turn:hostname"); | 1812 server.urls.push_back("turn:hostname"); |
1745 servers.push_back(server); | 1813 servers.push_back(server); |
1746 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, | 1814 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, |
1747 &turn_configurations_)); | 1815 &turn_configurations_)); |
1748 EXPECT_EQ(1U, stun_configurations_.size()); | 1816 EXPECT_EQ(1U, stun_configurations_.size()); |
1749 EXPECT_EQ(1U, turn_configurations_.size()); | 1817 EXPECT_EQ(1U, turn_configurations_.size()); |
1750 } | 1818 } |
1751 | 1819 |
1752 #endif // if !defined(THREAD_SANITIZER) | 1820 #endif // if !defined(THREAD_SANITIZER) |
OLD | NEW |