OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" | |
12 | 11 |
13 #include <limits> | 12 #include <limits> |
14 | 13 |
15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
16 | 15 |
17 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 16 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
17 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h" | |
åsapersson
2015/09/08 10:20:41
should be first according to style guide?
sprang_webrtc
2015/09/09 09:18:53
Done. No idea why it was moved here.
| |
18 | 18 |
19 using webrtc::rtcp::TransportFeedback; | 19 using webrtc::rtcp::TransportFeedback; |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 namespace { | 22 namespace { |
23 | 23 |
24 static const int kHeaderSize = 20; | 24 static const int kHeaderSize = 20; |
25 static const int kStatusChunkSize = 2; | 25 static const int kStatusChunkSize = 2; |
26 static const int kSmallDeltaSize = 1; | 26 static const int kSmallDeltaSize = 1; |
27 static const int kLargeDeltaSize = 2; | 27 static const int kLargeDeltaSize = 2; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 ((kPaddingBytes + 3) / 4)); | 425 ((kPaddingBytes + 3) / 4)); |
426 | 426 |
427 rtc::scoped_ptr<TransportFeedback> parsed_packet( | 427 rtc::scoped_ptr<TransportFeedback> parsed_packet( |
428 TransportFeedback::ParseFrom(mod_buffer, kExpectedSizeWithPadding)); | 428 TransportFeedback::ParseFrom(mod_buffer, kExpectedSizeWithPadding)); |
429 ASSERT_TRUE(parsed_packet.get() != nullptr); | 429 ASSERT_TRUE(parsed_packet.get() != nullptr); |
430 EXPECT_EQ(kExpectedSizeWords * 4, packet->Length()); // Padding not included. | 430 EXPECT_EQ(kExpectedSizeWords * 4, packet->Length()); // Padding not included. |
431 } | 431 } |
432 | 432 |
433 } // namespace | 433 } // namespace |
434 } // namespace webrtc | 434 } // namespace webrtc |
OLD | NEW |