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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 0, 1); | 117 0, 1); |
118 params.codecs.push_back(kTelephoneEventCodec); | 118 params.codecs.push_back(kTelephoneEventCodec); |
119 voice_media_channel_->SetSendParameters(params); | 119 voice_media_channel_->SetSendParameters(params); |
120 } | 120 } |
121 | 121 |
122 void AddVideoTrack() { AddVideoTrack(false); } | 122 void AddVideoTrack() { AddVideoTrack(false); } |
123 | 123 |
124 void AddVideoTrack(bool is_screencast) { | 124 void AddVideoTrack(bool is_screencast) { |
125 rtc::scoped_refptr<VideoTrackSourceInterface> source( | 125 rtc::scoped_refptr<VideoTrackSourceInterface> source( |
126 FakeVideoTrackSource::Create(is_screencast)); | 126 FakeVideoTrackSource::Create(is_screencast)); |
127 video_track_ = VideoTrack::Create(kVideoTrackId, source); | 127 video_track_ = |
| 128 VideoTrack::Create(kVideoTrackId, source, rtc::Thread::Current()); |
128 EXPECT_TRUE(local_stream_->AddTrack(video_track_)); | 129 EXPECT_TRUE(local_stream_->AddTrack(video_track_)); |
129 } | 130 } |
130 | 131 |
131 void CreateAudioRtpSender() { CreateAudioRtpSender(nullptr); } | 132 void CreateAudioRtpSender() { CreateAudioRtpSender(nullptr); } |
132 | 133 |
133 void CreateAudioRtpSender(rtc::scoped_refptr<LocalAudioSource> source) { | 134 void CreateAudioRtpSender(rtc::scoped_refptr<LocalAudioSource> source) { |
134 audio_track_ = AudioTrack::Create(kAudioTrackId, source); | 135 audio_track_ = AudioTrack::Create(kAudioTrackId, source); |
135 EXPECT_TRUE(local_stream_->AddTrack(audio_track_)); | 136 EXPECT_TRUE(local_stream_->AddTrack(audio_track_)); |
136 audio_rtp_sender_ = | 137 audio_rtp_sender_ = |
137 new AudioRtpSender(local_stream_->GetAudioTracks()[0], | 138 new AudioRtpSender(local_stream_->GetAudioTracks()[0], |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is | 793 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is |
793 // destroyed, which is needed for the DTMF sender. | 794 // destroyed, which is needed for the DTMF sender. |
794 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) { | 795 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) { |
795 CreateAudioRtpSender(); | 796 CreateAudioRtpSender(); |
796 EXPECT_FALSE(audio_sender_destroyed_signal_fired_); | 797 EXPECT_FALSE(audio_sender_destroyed_signal_fired_); |
797 audio_rtp_sender_ = nullptr; | 798 audio_rtp_sender_ = nullptr; |
798 EXPECT_TRUE(audio_sender_destroyed_signal_fired_); | 799 EXPECT_TRUE(audio_sender_destroyed_signal_fired_); |
799 } | 800 } |
800 | 801 |
801 } // namespace webrtc | 802 } // namespace webrtc |
OLD | NEW |