OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <functional> | 10 #include <functional> |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 send_stream_(nullptr), | 181 send_stream_(nullptr), |
182 audio_receive_stream_(nullptr), | 182 audio_receive_stream_(nullptr), |
183 video_receive_stream_(nullptr), | 183 video_receive_stream_(nullptr), |
184 frame_generator_capturer_(), | 184 frame_generator_capturer_(), |
185 fake_encoder_(Clock::GetRealTimeClock()), | 185 fake_encoder_(Clock::GetRealTimeClock()), |
186 fake_decoder_() { | 186 fake_decoder_() { |
187 test_->send_config_.rtp.ssrcs[0]++; | 187 test_->send_config_.rtp.ssrcs[0]++; |
188 test_->send_config_.encoder_settings.encoder = &fake_encoder_; | 188 test_->send_config_.encoder_settings.encoder = &fake_encoder_; |
189 send_stream_ = test_->sender_call_->CreateVideoSendStream( | 189 send_stream_ = test_->sender_call_->CreateVideoSendStream( |
190 test_->send_config_, test_->encoder_config_); | 190 test_->send_config_, test_->encoder_config_); |
191 DCHECK_EQ(1u, test_->encoder_config_.streams.size()); | 191 RTC_DCHECK_EQ(1u, test_->encoder_config_.streams.size()); |
192 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( | 192 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( |
193 send_stream_->Input(), | 193 send_stream_->Input(), |
194 test_->encoder_config_.streams[0].width, | 194 test_->encoder_config_.streams[0].width, |
195 test_->encoder_config_.streams[0].height, | 195 test_->encoder_config_.streams[0].height, |
196 30, | 196 30, |
197 Clock::GetRealTimeClock())); | 197 Clock::GetRealTimeClock())); |
198 send_stream_->Start(); | 198 send_stream_->Start(); |
199 frame_generator_capturer_->Start(); | 199 frame_generator_capturer_->Start(); |
200 | 200 |
201 if (receive_audio) { | 201 if (receive_audio) { |
202 AudioReceiveStream::Config receive_config; | 202 AudioReceiveStream::Config receive_config; |
203 receive_config.rtp.remote_ssrc = test_->send_config_.rtp.ssrcs[0]; | 203 receive_config.rtp.remote_ssrc = test_->send_config_.rtp.ssrcs[0]; |
204 // Bogus non-default id to prevent hitting a DCHECK when creating the | 204 // Bogus non-default id to prevent hitting a RTC_DCHECK when creating |
205 // AudioReceiveStream. Every receive stream has to correspond to an | 205 // the AudioReceiveStream. Every receive stream has to correspond to |
206 // underlying channel id. | 206 // an underlying channel id. |
207 receive_config.voe_channel_id = 0; | 207 receive_config.voe_channel_id = 0; |
208 receive_config.rtp.extensions.push_back( | 208 receive_config.rtp.extensions.push_back( |
209 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | 209 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); |
210 receive_config.combined_audio_video_bwe = true; | 210 receive_config.combined_audio_video_bwe = true; |
211 audio_receive_stream_ = test_->receiver_call_->CreateAudioReceiveStream( | 211 audio_receive_stream_ = test_->receiver_call_->CreateAudioReceiveStream( |
212 receive_config); | 212 receive_config); |
213 } else { | 213 } else { |
214 VideoReceiveStream::Decoder decoder; | 214 VideoReceiveStream::Decoder decoder; |
215 decoder.decoder = &fake_decoder_; | 215 decoder.decoder = &fake_decoder_; |
216 decoder.payload_type = | 216 decoder.payload_type = |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); | 359 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); |
360 receiver_trace_.PushExpectedLogLine( | 360 receiver_trace_.PushExpectedLogLine( |
361 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); | 361 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); |
362 receiver_trace_.PushExpectedLogLine(kSingleStreamLog); | 362 receiver_trace_.PushExpectedLogLine(kSingleStreamLog); |
363 streams_.push_back(new Stream(this, false)); | 363 streams_.push_back(new Stream(this, false)); |
364 streams_[0]->StopSending(); | 364 streams_[0]->StopSending(); |
365 streams_[1]->StopSending(); | 365 streams_[1]->StopSending(); |
366 EXPECT_EQ(kEventSignaled, receiver_trace_.Wait()); | 366 EXPECT_EQ(kEventSignaled, receiver_trace_.Wait()); |
367 } | 367 } |
368 } // namespace webrtc | 368 } // namespace webrtc |
OLD | NEW |