OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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/include/rtp_header_extension_map.h" | 11 #include "webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h" |
12 | 12 |
| 13 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
13 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" | 14 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
14 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | |
15 #include "webrtc/rtc_base/arraysize.h" | 15 #include "webrtc/rtc_base/arraysize.h" |
16 #include "webrtc/rtc_base/checks.h" | 16 #include "webrtc/rtc_base/checks.h" |
17 #include "webrtc/rtc_base/logging.h" | 17 #include "webrtc/rtc_base/logging.h" |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 namespace { | 20 namespace { |
21 | 21 |
22 using RtpUtility::Word32Align; | |
23 | |
24 struct ExtensionInfo { | 22 struct ExtensionInfo { |
25 RTPExtensionType type; | 23 RTPExtensionType type; |
26 const char* uri; | 24 const char* uri; |
27 }; | 25 }; |
28 | 26 |
29 template <typename Extension> | 27 template <typename Extension> |
30 constexpr ExtensionInfo CreateExtensionInfo() { | 28 constexpr ExtensionInfo CreateExtensionInfo() { |
31 return {Extension::kId, Extension::kUri}; | 29 return {Extension::kId, Extension::kUri}; |
32 } | 30 } |
33 | 31 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return false; | 138 return false; |
141 } | 139 } |
142 RTC_DCHECK(!IsRegistered(type)); | 140 RTC_DCHECK(!IsRegistered(type)); |
143 | 141 |
144 types_[id] = type; | 142 types_[id] = type; |
145 ids_[type] = id; | 143 ids_[type] = id; |
146 return true; | 144 return true; |
147 } | 145 } |
148 | 146 |
149 } // namespace webrtc | 147 } // namespace webrtc |
OLD | NEW |