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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 static_cast<FakeVideoReceiveStream*>(receive_stream)); | 470 static_cast<FakeVideoReceiveStream*>(receive_stream)); |
471 if (it == video_receive_streams_.end()) { | 471 if (it == video_receive_streams_.end()) { |
472 ADD_FAILURE() << "DestroyVideoReceiveStream called with unknown parameter."; | 472 ADD_FAILURE() << "DestroyVideoReceiveStream called with unknown parameter."; |
473 } else { | 473 } else { |
474 delete *it; | 474 delete *it; |
475 video_receive_streams_.erase(it); | 475 video_receive_streams_.erase(it); |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
479 webrtc::FlexfecReceiveStream* FakeCall::CreateFlexfecReceiveStream( | 479 webrtc::FlexfecReceiveStream* FakeCall::CreateFlexfecReceiveStream( |
480 webrtc::FlexfecReceiveStream::Config config) { | 480 const webrtc::FlexfecReceiveStream::Config& config) { |
481 flexfec_receive_streams_.push_back( | 481 flexfec_receive_streams_.push_back(FakeFlexfecReceiveStream(config)); |
482 FakeFlexfecReceiveStream(std::move(config))); | |
483 ++num_created_receive_streams_; | 482 ++num_created_receive_streams_; |
484 return &flexfec_receive_streams_.back(); | 483 return &flexfec_receive_streams_.back(); |
485 } | 484 } |
486 | 485 |
487 void FakeCall::DestroyFlexfecReceiveStream( | 486 void FakeCall::DestroyFlexfecReceiveStream( |
488 webrtc::FlexfecReceiveStream* receive_stream) { | 487 webrtc::FlexfecReceiveStream* receive_stream) { |
489 for (auto it = flexfec_receive_streams_.begin(); | 488 for (auto it = flexfec_receive_streams_.begin(); |
490 it != flexfec_receive_streams_.end(); ++it) { | 489 it != flexfec_receive_streams_.end(); ++it) { |
491 if (&(*it) == receive_stream) { | 490 if (&(*it) == receive_stream) { |
492 flexfec_receive_streams_.erase(it); | 491 flexfec_receive_streams_.erase(it); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 } | 582 } |
584 | 583 |
585 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { | 584 void FakeCall::OnSentPacket(const rtc::SentPacket& sent_packet) { |
586 last_sent_packet_ = sent_packet; | 585 last_sent_packet_ = sent_packet; |
587 if (sent_packet.packet_id >= 0) { | 586 if (sent_packet.packet_id >= 0) { |
588 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; | 587 last_sent_nonnegative_packet_id_ = sent_packet.packet_id; |
589 } | 588 } |
590 } | 589 } |
591 | 590 |
592 } // namespace cricket | 591 } // namespace cricket |
OLD | NEW |