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 | 10 |
11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_packet.h" |
12 | 12 |
13 #include <cstring> | 13 #include <cstring> |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/base/logging.h" | 16 #include "webrtc/base/logging.h" |
17 #include "webrtc/base/random.h" | 17 #include "webrtc/base/random.h" |
18 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
19 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | |
20 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 19 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
| 20 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions_manager.h" |
21 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 21 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 namespace rtp { | 24 namespace rtp { |
25 namespace { | 25 namespace { |
26 constexpr size_t kFixedHeaderSize = 12; | 26 constexpr size_t kFixedHeaderSize = 12; |
27 constexpr uint8_t kRtpVersion = 2; | 27 constexpr uint8_t kRtpVersion = 2; |
28 constexpr uint16_t kOneByteExtensionId = 0xBEDE; | 28 constexpr uint16_t kOneByteExtensionId = 0xBEDE; |
29 constexpr size_t kOneByteHeaderSize = 1; | 29 constexpr size_t kOneByteHeaderSize = 1; |
30 constexpr size_t kDefaultPacketSize = 1500; | 30 constexpr size_t kDefaultPacketSize = 1500; |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 uint8_t* Packet::WriteAt(size_t offset) { | 500 uint8_t* Packet::WriteAt(size_t offset) { |
501 return buffer_.data() + offset; | 501 return buffer_.data() + offset; |
502 } | 502 } |
503 | 503 |
504 void Packet::WriteAt(size_t offset, uint8_t byte) { | 504 void Packet::WriteAt(size_t offset, uint8_t byte) { |
505 buffer_.data()[offset] = byte; | 505 buffer_.data()[offset] = byte; |
506 } | 506 } |
507 | 507 |
508 } // namespace rtp | 508 } // namespace rtp |
509 } // namespace webrtc | 509 } // namespace webrtc |
OLD | NEW |