| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // packet. This confirms that the receiver will have the necessary lip | 46 // packet. This confirms that the receiver will have the necessary lip |
| 47 // sync info before it has to calculate the playout time of the first | 47 // sync info before it has to calculate the playout time of the first |
| 48 // frame. | 48 // frame. |
| 49 if (number_of_rtp_packets_ == 0) | 49 if (number_of_rtp_packets_ == 0) |
| 50 EXPECT_LE(1, number_of_rtcp_packets_); | 50 EXPECT_LE(1, number_of_rtcp_packets_); |
| 51 ++number_of_rtp_packets_; | 51 ++number_of_rtp_packets_; |
| 52 } | 52 } |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 | 55 |
| 56 int64 GetBytesSent() final { return 0; } | 56 int64_t GetBytesSent() final { return 0; } |
| 57 | 57 |
| 58 int number_of_rtp_packets() const { return number_of_rtp_packets_; } | 58 int number_of_rtp_packets() const { return number_of_rtp_packets_; } |
| 59 | 59 |
| 60 int number_of_rtcp_packets() const { return number_of_rtcp_packets_; } | 60 int number_of_rtcp_packets() const { return number_of_rtcp_packets_; } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 int number_of_rtp_packets_; | 63 int number_of_rtp_packets_; |
| 64 int number_of_rtcp_packets_; | 64 int number_of_rtcp_packets_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(TestPacketSender); | 66 DISALLOW_COPY_AND_ASSIGN(TestPacketSender); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 base::TimeDelta max_rtcp_timeout = | 153 base::TimeDelta max_rtcp_timeout = |
| 154 base::TimeDelta::FromMilliseconds(1 + kRtcpReportIntervalMs * 3 / 2); | 154 base::TimeDelta::FromMilliseconds(1 + kRtcpReportIntervalMs * 3 / 2); |
| 155 testing_clock_->Advance(max_rtcp_timeout); | 155 testing_clock_->Advance(max_rtcp_timeout); |
| 156 task_runner_->RunTasks(); | 156 task_runner_->RunTasks(); |
| 157 EXPECT_LE(1, transport_.number_of_rtp_packets()); | 157 EXPECT_LE(1, transport_.number_of_rtp_packets()); |
| 158 EXPECT_LE(1, transport_.number_of_rtcp_packets()); | 158 EXPECT_LE(1, transport_.number_of_rtcp_packets()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace cast | 161 } // namespace cast |
| 162 } // namespace media | 162 } // namespace media |
| OLD | NEW |