Sebastian Jansson | 6bcd7f6 | 2018-02-27 17:07:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Sebastian Jansson | 8acd5f8 | 2018-02-28 16:47:49 +0100 | [diff] [blame] | 11 | #include "modules/congestion_controller/network_control/include/network_types.h" |
Sebastian Jansson | 6bcd7f6 | 2018-02-27 17:07:02 +0100 | [diff] [blame] | 12 | |
| 13 | namespace webrtc { |
| 14 | |
| 15 | StreamsConfig::StreamsConfig() = default; |
| 16 | StreamsConfig::StreamsConfig(const StreamsConfig&) = default; |
| 17 | StreamsConfig::~StreamsConfig() = default; |
| 18 | |
| 19 | PacketResult::PacketResult() = default; |
| 20 | PacketResult::PacketResult(const PacketResult& other) = default; |
| 21 | PacketResult::~PacketResult() = default; |
| 22 | |
| 23 | TransportPacketsFeedback::TransportPacketsFeedback() = default; |
| 24 | TransportPacketsFeedback::TransportPacketsFeedback( |
| 25 | const TransportPacketsFeedback& other) = default; |
| 26 | TransportPacketsFeedback::~TransportPacketsFeedback() = default; |
| 27 | |
| 28 | std::vector<PacketResult> TransportPacketsFeedback::ReceivedWithSendInfo() |
| 29 | const { |
| 30 | std::vector<PacketResult> res; |
| 31 | for (const PacketResult& fb : packet_feedbacks) { |
| 32 | if (fb.receive_time.IsFinite() && fb.sent_packet.has_value()) { |
| 33 | res.push_back(fb); |
| 34 | } |
| 35 | } |
| 36 | return res; |
| 37 | } |
| 38 | |
| 39 | std::vector<PacketResult> TransportPacketsFeedback::LostWithSendInfo() const { |
| 40 | std::vector<PacketResult> res; |
| 41 | for (const PacketResult& fb : packet_feedbacks) { |
| 42 | if (fb.receive_time.IsInfinite() && fb.sent_packet.has_value()) { |
| 43 | res.push_back(fb); |
| 44 | } |
| 45 | } |
| 46 | return res; |
| 47 | } |
| 48 | |
| 49 | std::vector<PacketResult> TransportPacketsFeedback::PacketsWithFeedback() |
| 50 | const { |
| 51 | return packet_feedbacks; |
| 52 | } |
| 53 | |
Sebastian Jansson | ae90578 | 2018-04-09 13:21:35 +0200 | [diff] [blame] | 54 | NetworkControlUpdate::NetworkControlUpdate() = default; |
| 55 | NetworkControlUpdate::NetworkControlUpdate(const NetworkControlUpdate&) = |
| 56 | default; |
| 57 | NetworkControlUpdate::~NetworkControlUpdate() = default; |
| 58 | |
Sebastian Jansson | 6bcd7f6 | 2018-02-27 17:07:02 +0100 | [diff] [blame] | 59 | } // namespace webrtc |