OLD | NEW |
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 "media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h" | 5 #include "media/cast/transport/rtp/rtp_packetizer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
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" |
| 11 #include "media/cast/logging/logging_impl.h" |
11 #include "media/cast/logging/simple_event_subscriber.h" | 12 #include "media/cast/logging/simple_event_subscriber.h" |
12 #include "media/cast/test/fake_single_thread_task_runner.h" | 13 #include "media/cast/test/fake_single_thread_task_runner.h" |
13 #include "media/cast/transport/pacing/paced_sender.h" | 14 #include "media/cast/transport/pacing/paced_sender.h" |
14 #include "media/cast/transport/rtp_sender/packet_storage/packet_storage.h" | 15 #include "media/cast/transport/rtp/packet_storage.h" |
15 #include "media/cast/transport/rtp_sender/rtp_packetizer/test/rtp_header_parser.
h" | 16 #include "media/cast/transport/rtp/rtp_header_parser.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
17 | 18 |
18 namespace media { | 19 namespace media { |
19 namespace cast { | 20 namespace cast { |
20 namespace transport { | 21 namespace transport { |
21 | 22 |
22 namespace { | 23 namespace { |
23 static const int kPayload = 127; | 24 static const int kPayload = 127; |
24 static const uint32 kTimestampMs = 10; | 25 static const uint32 kTimestampMs = 10; |
25 static const uint16 kSeqNum = 33; | 26 static const uint16 kSeqNum = 33; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 rtp_packetizer_->SendFrameAsPackets(video_frame_); | 167 rtp_packetizer_->SendFrameAsPackets(video_frame_); |
167 RunTasks(33 + 1); | 168 RunTasks(33 + 1); |
168 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); | 169 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); |
169 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); | 170 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); |
170 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); | 171 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); |
171 } | 172 } |
172 | 173 |
173 } // namespace transport | 174 } // namespace transport |
174 } // namespace cast | 175 } // namespace cast |
175 } // namespace media | 176 } // namespace media |
OLD | NEW |