| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <deque> | 9 #include <deque> |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 class PacedSenderTest : public ::testing::Test { | 93 class PacedSenderTest : public ::testing::Test { |
| 94 protected: | 94 protected: |
| 95 PacedSenderTest() { | 95 PacedSenderTest() { |
| 96 testing_clock_.Advance( | 96 testing_clock_.Advance( |
| 97 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 97 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
| 98 task_runner_ = new FakeSingleThreadTaskRunner(&testing_clock_); | 98 task_runner_ = new FakeSingleThreadTaskRunner(&testing_clock_); |
| 99 paced_sender_.reset(new PacedSender(kTargetBurstSize, kMaxBurstSize, | 99 paced_sender_.reset(new PacedSender(kTargetBurstSize, kMaxBurstSize, |
| 100 &testing_clock_, &packet_events_, | 100 &testing_clock_, &packet_events_, |
| 101 &mock_transport_, task_runner_)); | 101 &mock_transport_, task_runner_)); |
| 102 paced_sender_->RegisterAudioSsrc(kAudioSsrc); | 102 paced_sender_->RegisterSsrc(kAudioSsrc, true); |
| 103 paced_sender_->RegisterVideoSsrc(kVideoSsrc); | 103 paced_sender_->RegisterSsrc(kVideoSsrc, false); |
| 104 } | 104 } |
| 105 | 105 |
| 106 static void UpdateCastTransportStatus(CastTransportStatus status) { | 106 static void UpdateCastTransportStatus(CastTransportStatus status) { |
| 107 NOTREACHED(); | 107 NOTREACHED(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 SendPacketVector CreateSendPacketVector(size_t packet_size, | 110 SendPacketVector CreateSendPacketVector(size_t packet_size, |
| 111 int num_of_packets_in_frame, | 111 int num_of_packets_in_frame, |
| 112 bool audio) { | 112 bool audio) { |
| 113 DCHECK_GE(packet_size, 12u); | 113 DCHECK_GE(packet_size, 12u); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 first_ten_packets.push_back(packets[i]); | 533 first_ten_packets.push_back(packets[i]); |
| 534 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(0), 2); | 534 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(0), 2); |
| 535 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(4), 6); | 535 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(4), 6); |
| 536 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(2), 2); | 536 mock_transport_.AddExpectedSizesAndPacketIds(kSize1, UINT16_C(2), 2); |
| 537 SendWithoutBursting(first_ten_packets); | 537 SendWithoutBursting(first_ten_packets); |
| 538 ASSERT_TRUE(mock_transport_.expecting_nothing_else()); | 538 ASSERT_TRUE(mock_transport_.expecting_nothing_else()); |
| 539 } | 539 } |
| 540 | 540 |
| 541 } // namespace cast | 541 } // namespace cast |
| 542 } // namespace media | 542 } // namespace media |
| OLD | NEW |