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

Side by Side Diff: media/cast/rtcp/rtcp_unittest.cc

Issue 343523005: Cast: Avoid retransmit if we sent the same packet recently (less than RTT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bugfix Created 6 years, 6 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
« no previous file with comments | « media/cast/rtcp/rtcp_sender_unittest.cc ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "media/cast/cast_defines.h" 8 #include "media/cast/cast_defines.h"
9 #include "media/cast/cast_environment.h" 9 #include "media/cast/cast_environment.h"
10 #include "media/cast/rtcp/mock_rtcp_receiver_feedback.h" 10 #include "media/cast/rtcp/mock_rtcp_receiver_feedback.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 rtcp_->IncomingRtcpPacket(&packet->data[0], packet->data.size()); 97 rtcp_->IncomingRtcpPacket(&packet->data[0], packet->data.size());
98 return true; 98 return true;
99 } 99 }
100 100
101 virtual bool SendPackets( 101 virtual bool SendPackets(
102 const transport::SendPacketVector& packets) OVERRIDE { 102 const transport::SendPacketVector& packets) OVERRIDE {
103 return false; 103 return false;
104 } 104 }
105 105
106 virtual bool ResendPackets( 106 virtual bool ResendPackets(
107 const transport::SendPacketVector& packets) OVERRIDE { 107 const transport::SendPacketVector& packets,
108 base::TimeDelta dedupe_window) OVERRIDE {
108 return false; 109 return false;
109 } 110 }
110 111
111 virtual void CancelSendingPacket( 112 virtual void CancelSendingPacket(
112 const transport::PacketKey& packet_key) OVERRIDE { 113 const transport::PacketKey& packet_key) OVERRIDE {
113 } 114 }
114 115
115 private: 116 private:
116 bool drop_packets_; 117 bool drop_packets_;
117 bool short_delay_; 118 bool short_delay_;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3); 539 base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3);
539 EXPECT_EQ(input_time, out_3); // Verify inverse. 540 EXPECT_EQ(input_time, out_3); // Verify inverse.
540 541
541 // Verify delta. 542 // Verify delta.
542 EXPECT_EQ((out_3 - out_2), time_delta); 543 EXPECT_EQ((out_3 - out_2), time_delta);
543 EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1); 544 EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1);
544 } 545 }
545 546
546 } // namespace cast 547 } // namespace cast
547 } // namespace media 548 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtcp/rtcp_sender_unittest.cc ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698