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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "media/cast/cast_defines.h" | 6 #include "media/cast/cast_defines.h" |
7 #include "media/cast/pacing/paced_sender.h" | 7 #include "media/cast/pacing/paced_sender.h" |
8 #include "media/cast/rtcp/rtcp_sender.h" | 8 #include "media/cast/rtcp/rtcp_sender.h" |
9 #include "media/cast/rtcp/test_rtcp_packet_builder.h" | 9 #include "media/cast/rtcp/test_rtcp_packet_builder.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 virtual bool SendRtcpPacket(const std::vector<uint8>& packet) OVERRIDE { | 27 virtual bool SendRtcpPacket(const std::vector<uint8>& packet) OVERRIDE { |
28 EXPECT_EQ(expected_packet_length_, packet.size()); | 28 EXPECT_EQ(expected_packet_length_, packet.size()); |
29 EXPECT_EQ(0, memcmp(expected_packet_, &(packet[0]), packet.size())); | 29 EXPECT_EQ(0, memcmp(expected_packet_, &(packet[0]), packet.size())); |
30 packet_count_++; | 30 packet_count_++; |
31 return true; | 31 return true; |
32 } | 32 } |
33 | 33 |
34 virtual bool SendPacket(const std::vector<uint8>& packet, | 34 virtual bool SendPacket(const std::vector<uint8>& packet, |
35 int num_of_packets) { | 35 int num_of_packets) OVERRIDE { |
36 return false; | 36 return false; |
37 } | 37 } |
38 | 38 |
39 virtual bool ResendPacket(const std::vector<uint8>& packet, | 39 virtual bool ResendPacket(const std::vector<uint8>& packet, |
40 int num_of_packets) { | 40 int num_of_packets) OVERRIDE { |
41 return false; | 41 return false; |
42 } | 42 } |
43 | 43 |
44 void SetExpectedRtcpPacket(const uint8* rtcp_buffer, int length) { | 44 void SetExpectedRtcpPacket(const uint8* rtcp_buffer, int length) { |
45 expected_packet_length_ = length; | 45 expected_packet_length_ = length; |
46 memcpy(expected_packet_, rtcp_buffer, length); | 46 memcpy(expected_packet_, rtcp_buffer, length); |
47 } | 47 } |
48 | 48 |
49 int packet_count() { return packet_count_; } | 49 int packet_count() { return packet_count_; } |
50 | 50 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 kMediaSsrc, | 276 kMediaSsrc, |
277 NULL, | 277 NULL, |
278 NULL, | 278 NULL, |
279 NULL); | 279 NULL); |
280 | 280 |
281 EXPECT_EQ(1, test_transport_.packet_count()); | 281 EXPECT_EQ(1, test_transport_.packet_count()); |
282 } | 282 } |
283 | 283 |
284 } // namespace cast | 284 } // namespace cast |
285 } // namespace media | 285 } // namespace media |
OLD | NEW |