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

Side by Side Diff: webrtc/pc/rtpsenderreceiver_unittest.cc

Issue 2979493003: Revert: Change VideoTrack implementation to invoke VideoTrackSourceInterface::AddOrUpdateSink on wt (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « webrtc/pc/rtpreceiver.cc ('k') | webrtc/pc/statscollector_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_ = 127 video_track_ = VideoTrack::Create(kVideoTrackId, source);
128 VideoTrack::Create(kVideoTrackId, source, rtc::Thread::Current());
129 EXPECT_TRUE(local_stream_->AddTrack(video_track_)); 128 EXPECT_TRUE(local_stream_->AddTrack(video_track_));
130 } 129 }
131 130
132 void CreateAudioRtpSender() { CreateAudioRtpSender(nullptr); } 131 void CreateAudioRtpSender() { CreateAudioRtpSender(nullptr); }
133 132
134 void CreateAudioRtpSender(rtc::scoped_refptr<LocalAudioSource> source) { 133 void CreateAudioRtpSender(rtc::scoped_refptr<LocalAudioSource> source) {
135 audio_track_ = AudioTrack::Create(kAudioTrackId, source); 134 audio_track_ = AudioTrack::Create(kAudioTrackId, source);
136 EXPECT_TRUE(local_stream_->AddTrack(audio_track_)); 135 EXPECT_TRUE(local_stream_->AddTrack(audio_track_));
137 audio_rtp_sender_ = 136 audio_rtp_sender_ =
138 new AudioRtpSender(local_stream_->GetAudioTracks()[0], 137 new AudioRtpSender(local_stream_->GetAudioTracks()[0],
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is 792 // Make sure the signal from "GetOnDestroyedSignal()" fires when the sender is
794 // destroyed, which is needed for the DTMF sender. 793 // destroyed, which is needed for the DTMF sender.
795 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) { 794 TEST_F(RtpSenderReceiverTest, TestOnDestroyedSignal) {
796 CreateAudioRtpSender(); 795 CreateAudioRtpSender();
797 EXPECT_FALSE(audio_sender_destroyed_signal_fired_); 796 EXPECT_FALSE(audio_sender_destroyed_signal_fired_);
798 audio_rtp_sender_ = nullptr; 797 audio_rtp_sender_ = nullptr;
799 EXPECT_TRUE(audio_sender_destroyed_signal_fired_); 798 EXPECT_TRUE(audio_sender_destroyed_signal_fired_);
800 } 799 }
801 800
802 } // namespace webrtc 801 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/rtpreceiver.cc ('k') | webrtc/pc/statscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698