OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" | 10 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 EXPECT_TRUE(packet.Parse(kPacketWithTO, sizeof(kPacketWithTO))); | 351 EXPECT_TRUE(packet.Parse(kPacketWithTO, sizeof(kPacketWithTO))); |
352 | 352 |
353 EXPECT_FALSE(packet.HasRawExtension(kAudioLevelExtensionId)); | 353 EXPECT_FALSE(packet.HasRawExtension(kAudioLevelExtensionId)); |
354 EXPECT_TRUE(packet.GetRawExtension(kAudioLevelExtensionId).empty()); | 354 EXPECT_TRUE(packet.GetRawExtension(kAudioLevelExtensionId).empty()); |
355 | 355 |
356 EXPECT_TRUE(packet.HasRawExtension(kTransmissionOffsetExtensionId)); | 356 EXPECT_TRUE(packet.HasRawExtension(kTransmissionOffsetExtensionId)); |
357 | 357 |
358 int32_t time_offset = 0; | 358 int32_t time_offset = 0; |
359 auto raw_extension = packet.GetRawExtension(kTransmissionOffsetExtensionId); | 359 auto raw_extension = packet.GetRawExtension(kTransmissionOffsetExtensionId); |
360 EXPECT_EQ(raw_extension.size(), TransmissionOffset::kValueSizeBytes); | 360 EXPECT_EQ(raw_extension.size(), TransmissionOffset::kValueSizeBytes); |
361 EXPECT_TRUE(TransmissionOffset::Parse(raw_extension.data(), &time_offset)); | 361 EXPECT_TRUE(TransmissionOffset::Parse(raw_extension, &time_offset)); |
362 | 362 |
363 EXPECT_EQ(time_offset, kTimeOffset); | 363 EXPECT_EQ(time_offset, kTimeOffset); |
364 } | 364 } |
365 | 365 |
366 } // namespace webrtc | 366 } // namespace webrtc |
OLD | NEW |