OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 for (int j = 0; j < tracks_per_stream; ++j) { | 451 for (int j = 0; j < tracks_per_stream; ++j) { |
452 // Add a local audio track. | 452 // Add a local audio track. |
453 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( | 453 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( |
454 webrtc::AudioTrack::Create(kAudioTracks[i * tracks_per_stream + j], | 454 webrtc::AudioTrack::Create(kAudioTracks[i * tracks_per_stream + j], |
455 nullptr)); | 455 nullptr)); |
456 stream->AddTrack(audio_track); | 456 stream->AddTrack(audio_track); |
457 | 457 |
458 // Add a local video track. | 458 // Add a local video track. |
459 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 459 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
460 webrtc::VideoTrack::Create(kVideoTracks[i * tracks_per_stream + j], | 460 webrtc::VideoTrack::Create(kVideoTracks[i * tracks_per_stream + j], |
461 webrtc::FakeVideoTrackSource::Create(), | 461 webrtc::FakeVideoTrackSource::Create())); |
462 rtc::Thread::Current())); | |
463 stream->AddTrack(video_track); | 462 stream->AddTrack(video_track); |
464 } | 463 } |
465 | 464 |
466 local_collection->AddStream(stream); | 465 local_collection->AddStream(stream); |
467 } | 466 } |
468 return local_collection; | 467 return local_collection; |
469 } | 468 } |
470 | 469 |
471 // Check equality of StreamCollections. | 470 // Check equality of StreamCollections. |
472 bool CompareStreamCollections(StreamCollectionInterface* s1, | 471 bool CompareStreamCollections(StreamCollectionInterface* s1, |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 MediaStreamInterface* stream) { | 1086 MediaStreamInterface* stream) { |
1088 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( | 1087 rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track( |
1089 webrtc::AudioTrack::Create(track_id, nullptr)); | 1088 webrtc::AudioTrack::Create(track_id, nullptr)); |
1090 ASSERT_TRUE(stream->AddTrack(audio_track)); | 1089 ASSERT_TRUE(stream->AddTrack(audio_track)); |
1091 } | 1090 } |
1092 | 1091 |
1093 void AddVideoTrack(const std::string& track_id, | 1092 void AddVideoTrack(const std::string& track_id, |
1094 MediaStreamInterface* stream) { | 1093 MediaStreamInterface* stream) { |
1095 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( | 1094 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( |
1096 webrtc::VideoTrack::Create(track_id, | 1095 webrtc::VideoTrack::Create(track_id, |
1097 webrtc::FakeVideoTrackSource::Create(), | 1096 webrtc::FakeVideoTrackSource::Create())); |
1098 rtc::Thread::Current())); | |
1099 ASSERT_TRUE(stream->AddTrack(video_track)); | 1097 ASSERT_TRUE(stream->AddTrack(video_track)); |
1100 } | 1098 } |
1101 | 1099 |
1102 std::unique_ptr<SessionDescriptionInterface> CreateOfferWithOneAudioStream() { | 1100 std::unique_ptr<SessionDescriptionInterface> CreateOfferWithOneAudioStream() { |
1103 CreatePeerConnectionWithoutDtls(); | 1101 CreatePeerConnectionWithoutDtls(); |
1104 AddVoiceStream(kStreamLabel1); | 1102 AddVoiceStream(kStreamLabel1); |
1105 std::unique_ptr<SessionDescriptionInterface> offer; | 1103 std::unique_ptr<SessionDescriptionInterface> offer; |
1106 EXPECT_TRUE(DoCreateOffer(&offer, nullptr)); | 1104 EXPECT_TRUE(DoCreateOffer(&offer, nullptr)); |
1107 return offer; | 1105 return offer; |
1108 } | 1106 } |
(...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3651 EXPECT_NE(a, f); | 3649 EXPECT_NE(a, f); |
3652 | 3650 |
3653 PeerConnectionInterface::RTCConfiguration g; | 3651 PeerConnectionInterface::RTCConfiguration g; |
3654 g.disable_ipv6 = true; | 3652 g.disable_ipv6 = true; |
3655 EXPECT_NE(a, g); | 3653 EXPECT_NE(a, g); |
3656 | 3654 |
3657 PeerConnectionInterface::RTCConfiguration h( | 3655 PeerConnectionInterface::RTCConfiguration h( |
3658 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3656 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
3659 EXPECT_NE(a, h); | 3657 EXPECT_NE(a, h); |
3660 } | 3658 } |
OLD | NEW |