OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 int FakeVideoSendStream::GetLastHeight() const { | 156 int FakeVideoSendStream::GetLastHeight() const { |
157 return last_frame_.height(); | 157 return last_frame_.height(); |
158 } | 158 } |
159 | 159 |
160 int64_t FakeVideoSendStream::GetLastTimestamp() const { | 160 int64_t FakeVideoSendStream::GetLastTimestamp() const { |
161 RTC_DCHECK(last_frame_.ntp_time_ms() == 0); | 161 RTC_DCHECK(last_frame_.ntp_time_ms() == 0); |
162 return last_frame_.render_time_ms(); | 162 return last_frame_.render_time_ms(); |
163 } | 163 } |
164 | 164 |
165 void FakeVideoSendStream::IncomingCapturedFrame( | 165 void FakeVideoSendStream::OnFrame(const webrtc::VideoFrame& frame) { |
166 const webrtc::VideoFrame& frame) { | |
167 ++num_swapped_frames_; | 166 ++num_swapped_frames_; |
168 last_frame_.ShallowCopy(frame); | 167 last_frame_.ShallowCopy(frame); |
169 } | 168 } |
170 | 169 |
171 void FakeVideoSendStream::SetStats( | 170 void FakeVideoSendStream::SetStats( |
172 const webrtc::VideoSendStream::Stats& stats) { | 171 const webrtc::VideoSendStream::Stats& stats) { |
173 stats_ = stats; | 172 stats_ = stats; |
174 } | 173 } |
175 | 174 |
176 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { | 175 webrtc::VideoSendStream::Stats FakeVideoSendStream::GetStats() { |
(...skipping 20 matching lines...) Expand all Loading... |
197 } else { | 196 } else { |
198 ADD_FAILURE() << "Unsupported encoder payload: " | 197 ADD_FAILURE() << "Unsupported encoder payload: " |
199 << config_.encoder_settings.payload_name; | 198 << config_.encoder_settings.payload_name; |
200 } | 199 } |
201 } | 200 } |
202 encoder_config_ = std::move(config); | 201 encoder_config_ = std::move(config); |
203 codec_settings_set_ = config.encoder_specific_settings != NULL; | 202 codec_settings_set_ = config.encoder_specific_settings != NULL; |
204 ++num_encoder_reconfigurations_; | 203 ++num_encoder_reconfigurations_; |
205 } | 204 } |
206 | 205 |
207 webrtc::VideoCaptureInput* FakeVideoSendStream::Input() { | |
208 return this; | |
209 } | |
210 | |
211 void FakeVideoSendStream::Start() { | 206 void FakeVideoSendStream::Start() { |
212 sending_ = true; | 207 sending_ = true; |
213 } | 208 } |
214 | 209 |
215 void FakeVideoSendStream::Stop() { | 210 void FakeVideoSendStream::Stop() { |
216 sending_ = false; | 211 sending_ = false; |
217 } | 212 } |
218 | 213 |
| 214 void FakeVideoSendStream::SetSource( |
| 215 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) { |
| 216 if (source) |
| 217 source->AddOrUpdateSink(this, rtc::VideoSinkWants()); |
| 218 } |
| 219 |
219 FakeVideoReceiveStream::FakeVideoReceiveStream( | 220 FakeVideoReceiveStream::FakeVideoReceiveStream( |
220 webrtc::VideoReceiveStream::Config config) | 221 webrtc::VideoReceiveStream::Config config) |
221 : config_(std::move(config)), receiving_(false) {} | 222 : config_(std::move(config)), receiving_(false) {} |
222 | 223 |
223 const webrtc::VideoReceiveStream::Config& FakeVideoReceiveStream::GetConfig() { | 224 const webrtc::VideoReceiveStream::Config& FakeVideoReceiveStream::GetConfig() { |
224 return config_; | 225 return config_; |
225 } | 226 } |
226 | 227 |
227 bool FakeVideoReceiveStream::IsReceiving() const { | 228 bool FakeVideoReceiveStream::IsReceiving() const { |
228 return receiving_; | 229 return receiving_; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 } | 481 } |
481 | 482 |
482 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, | 483 bool FakeCall::StartEventLog(rtc::PlatformFile log_file, |
483 int64_t max_size_bytes) { | 484 int64_t max_size_bytes) { |
484 return false; | 485 return false; |
485 } | 486 } |
486 | 487 |
487 void FakeCall::StopEventLog() {} | 488 void FakeCall::StopEventLog() {} |
488 | 489 |
489 } // namespace cricket | 490 } // namespace cricket |
OLD | NEW |