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 "media/cast/net/rtp/rtp_packetizer.h" | 5 #include "media/cast/net/rtp/rtp_packetizer.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdint.h> | 8 #include <stdint.h> |
8 | 9 |
| 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
10 #include "base/test/simple_test_tick_clock.h" | 12 #include "base/test/simple_test_tick_clock.h" |
11 #include "media/cast/net/pacing/paced_sender.h" | 13 #include "media/cast/net/pacing/paced_sender.h" |
12 #include "media/cast/net/rtp/packet_storage.h" | 14 #include "media/cast/net/rtp/packet_storage.h" |
13 #include "media/cast/net/rtp/rtp_parser.h" | 15 #include "media/cast/net/rtp/rtp_parser.h" |
14 #include "media/cast/test/fake_single_thread_task_runner.h" | 16 #include "media/cast/test/fake_single_thread_task_runner.h" |
15 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
16 | 18 |
17 namespace media { | 19 namespace media { |
18 namespace cast { | 20 namespace cast { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 video_frame_.reference_time = testing_clock_.NowTicks(); | 185 video_frame_.reference_time = testing_clock_.NowTicks(); |
184 rtp_packetizer_->SendFrameAsPackets(video_frame_); | 186 rtp_packetizer_->SendFrameAsPackets(video_frame_); |
185 RunTasks(33 + 1); | 187 RunTasks(33 + 1); |
186 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); | 188 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); |
187 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); | 189 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); |
188 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); | 190 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); |
189 } | 191 } |
190 | 192 |
191 } // namespace cast | 193 } // namespace cast |
192 } // namespace media | 194 } // namespace media |
OLD | NEW |