Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter_unittest.cc

Issue 2638083002: Attach TransportFeedbackPacketLossTracker to ANA (PLR only) (Closed)
Patch Set: event_log_visualizer Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual void TearDown() { adapter_.reset(); } 51 virtual void TearDown() { adapter_.reset(); }
52 52
53 protected: 53 protected:
54 void OnReceivedEstimatedBitrate(uint32_t bitrate) {} 54 void OnReceivedEstimatedBitrate(uint32_t bitrate) {}
55 55
56 void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks, 56 void OnReceivedRtcpReceiverReport(const ReportBlockList& report_blocks,
57 int64_t rtt, 57 int64_t rtt,
58 int64_t now_ms) {} 58 int64_t now_ms) {}
59 59
60 void OnSentPacket(const PacketFeedback& packet_feedback) { 60 void OnSentPacket(const PacketFeedback& packet_feedback) {
61 adapter_->AddPacket(packet_feedback.sequence_number, 61 constexpr uint32_t ssrc = 0;
62 adapter_->AddPacket(ssrc, packet_feedback.sequence_number,
62 packet_feedback.payload_size, 63 packet_feedback.payload_size,
63 packet_feedback.pacing_info); 64 packet_feedback.pacing_info);
64 adapter_->OnSentPacket(packet_feedback.sequence_number, 65 adapter_->OnSentPacket(packet_feedback.sequence_number,
65 packet_feedback.send_time_ms); 66 packet_feedback.send_time_ms);
66 } 67 }
67 68
68 SimulatedClock clock_; 69 SimulatedClock clock_;
69 std::unique_ptr<TransportFeedbackAdapter> adapter_; 70 std::unique_ptr<TransportFeedbackAdapter> adapter_;
70 }; 71 };
71 72
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 adapter_->OnTransportFeedback(*feedback.get()); 317 adapter_->OnTransportFeedback(*feedback.get());
317 { 318 {
318 std::vector<PacketFeedback> expected_packets; 319 std::vector<PacketFeedback> expected_packets;
319 expected_packets.push_back(packet_feedback); 320 expected_packets.push_back(packet_feedback);
320 ComparePacketFeedbackVectors(expected_packets, 321 ComparePacketFeedbackVectors(expected_packets,
321 adapter_->GetTransportFeedbackVector()); 322 adapter_->GetTransportFeedbackVector());
322 } 323 }
323 } 324 }
324 } // namespace test 325 } // namespace test
325 } // namespace webrtc 326 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698