blob: a786f613dc6ab72b8e51f769d44d116eb25315b6 [file] [log] [blame]
Sebastian Jansson6bcd7f62018-02-27 17:07:02 +01001/*
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 Jansson8acd5f82018-02-28 16:47:49 +010011#include "modules/congestion_controller/network_control/include/network_types.h"
Sebastian Jansson6bcd7f62018-02-27 17:07:02 +010012
13namespace webrtc {
14
15StreamsConfig::StreamsConfig() = default;
16StreamsConfig::StreamsConfig(const StreamsConfig&) = default;
17StreamsConfig::~StreamsConfig() = default;
18
19PacketResult::PacketResult() = default;
20PacketResult::PacketResult(const PacketResult& other) = default;
21PacketResult::~PacketResult() = default;
22
23TransportPacketsFeedback::TransportPacketsFeedback() = default;
24TransportPacketsFeedback::TransportPacketsFeedback(
25 const TransportPacketsFeedback& other) = default;
26TransportPacketsFeedback::~TransportPacketsFeedback() = default;
27
28std::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
39std::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
49std::vector<PacketResult> TransportPacketsFeedback::PacketsWithFeedback()
50 const {
51 return packet_feedbacks;
52}
53
Sebastian Janssonae905782018-04-09 13:21:35 +020054NetworkControlUpdate::NetworkControlUpdate() = default;
55NetworkControlUpdate::NetworkControlUpdate(const NetworkControlUpdate&) =
56 default;
57NetworkControlUpdate::~NetworkControlUpdate() = default;
58
Sebastian Jansson6bcd7f62018-02-27 17:07:02 +010059} // namespace webrtc