| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 void FakeVideoSendStream::Start() { | 202 void FakeVideoSendStream::Start() { |
| 203 sending_ = true; | 203 sending_ = true; |
| 204 } | 204 } |
| 205 | 205 |
| 206 void FakeVideoSendStream::Stop() { | 206 void FakeVideoSendStream::Stop() { |
| 207 sending_ = false; | 207 sending_ = false; |
| 208 } | 208 } |
| 209 | 209 |
| 210 FakeVideoReceiveStream::FakeVideoReceiveStream( | 210 FakeVideoReceiveStream::FakeVideoReceiveStream( |
| 211 const webrtc::VideoReceiveStream::Config& config) | 211 webrtc::VideoReceiveStream::Config config) |
| 212 : config_(config), receiving_(false) { | 212 : config_(std::move(config)), receiving_(false) {} |
| 213 } | |
| 214 | 213 |
| 215 webrtc::VideoReceiveStream::Config FakeVideoReceiveStream::GetConfig() { | 214 const webrtc::VideoReceiveStream::Config& FakeVideoReceiveStream::GetConfig() { |
| 216 return config_; | 215 return config_; |
| 217 } | 216 } |
| 218 | 217 |
| 219 bool FakeVideoReceiveStream::IsReceiving() const { | 218 bool FakeVideoReceiveStream::IsReceiving() const { |
| 220 return receiving_; | 219 return receiving_; |
| 221 } | 220 } |
| 222 | 221 |
| 223 void FakeVideoReceiveStream::InjectFrame(const webrtc::VideoFrame& frame) { | 222 void FakeVideoReceiveStream::InjectFrame(const webrtc::VideoFrame& frame) { |
| 224 config_.renderer->OnFrame(frame); | 223 config_.renderer->OnFrame(frame); |
| 225 } | 224 } |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 static_cast<FakeVideoSendStream*>(send_stream)); | 366 static_cast<FakeVideoSendStream*>(send_stream)); |
| 368 if (it == video_send_streams_.end()) { | 367 if (it == video_send_streams_.end()) { |
| 369 ADD_FAILURE() << "DestroyVideoSendStream called with unknown parameter."; | 368 ADD_FAILURE() << "DestroyVideoSendStream called with unknown parameter."; |
| 370 } else { | 369 } else { |
| 371 delete *it; | 370 delete *it; |
| 372 video_send_streams_.erase(it); | 371 video_send_streams_.erase(it); |
| 373 } | 372 } |
| 374 } | 373 } |
| 375 | 374 |
| 376 webrtc::VideoReceiveStream* FakeCall::CreateVideoReceiveStream( | 375 webrtc::VideoReceiveStream* FakeCall::CreateVideoReceiveStream( |
| 377 const webrtc::VideoReceiveStream::Config& config) { | 376 webrtc::VideoReceiveStream::Config config) { |
| 378 video_receive_streams_.push_back(new FakeVideoReceiveStream(config)); | 377 video_receive_streams_.push_back( |
| 378 new FakeVideoReceiveStream(std::move(config))); |
| 379 ++num_created_receive_streams_; | 379 ++num_created_receive_streams_; |
| 380 return video_receive_streams_.back(); | 380 return video_receive_streams_.back(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void FakeCall::DestroyVideoReceiveStream( | 383 void FakeCall::DestroyVideoReceiveStream( |
| 384 webrtc::VideoReceiveStream* receive_stream) { | 384 webrtc::VideoReceiveStream* receive_stream) { |
| 385 auto it = std::find(video_receive_streams_.begin(), | 385 auto it = std::find(video_receive_streams_.begin(), |
| 386 video_receive_streams_.end(), | 386 video_receive_streams_.end(), |
| 387 static_cast<FakeVideoReceiveStream*>(receive_stream)); | 387 static_cast<FakeVideoReceiveStream*>(receive_stream)); |
| 388 if (it == video_receive_streams_.end()) { | 388 if (it == video_receive_streams_.end()) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 case webrtc::MediaType::ANY: | 460 case webrtc::MediaType::ANY: |
| 461 ADD_FAILURE() | 461 ADD_FAILURE() |
| 462 << "SignalChannelNetworkState called with unknown parameter."; | 462 << "SignalChannelNetworkState called with unknown parameter."; |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 | 465 |
| 466 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 466 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
| 467 last_sent_packet_ = sent_packet; | 467 last_sent_packet_ = sent_packet; |
| 468 } | 468 } |
| 469 } // namespace cricket | 469 } // namespace cricket |
| OLD | NEW |