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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 const uint16_t kRtpOneByteHeaderExtensionId = 0xBEDE; | 21 const uint16_t kRtpOneByteHeaderExtensionId = 0xBEDE; |
22 | 22 |
23 const size_t kRtpOneByteHeaderLength = 4; | 23 const size_t kRtpOneByteHeaderLength = 4; |
24 const size_t kTransmissionTimeOffsetLength = 4; | 24 const size_t kTransmissionTimeOffsetLength = 4; |
25 const size_t kAudioLevelLength = 2; | 25 const size_t kAudioLevelLength = 2; |
26 const size_t kAbsoluteSendTimeLength = 4; | 26 const size_t kAbsoluteSendTimeLength = 4; |
27 const size_t kVideoRotationLength = 2; | 27 const size_t kVideoRotationLength = 2; |
28 const size_t kTransportSequenceNumberLength = 3; | 28 const size_t kTransportSequenceNumberLength = 3; |
29 | 29 |
30 struct HeaderExtension { | 30 struct HeaderExtension { |
31 HeaderExtension(RTPExtensionType extension_type) | 31 explicit HeaderExtension(RTPExtensionType extension_type) |
32 : type(extension_type), length(0), active(true) { | 32 : type(extension_type), length(0), active(true) { |
33 Init(); | 33 Init(); |
34 } | 34 } |
35 | 35 |
36 HeaderExtension(RTPExtensionType extension_type, bool active) | 36 HeaderExtension(RTPExtensionType extension_type, bool active) |
37 : type(extension_type), length(0), active(active) { | 37 : type(extension_type), length(0), active(active) { |
38 Init(); | 38 Init(); |
39 } | 39 } |
40 | 40 |
41 void Init() { | 41 void Init() { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 RTPExtensionType Next(RTPExtensionType type) const; | 109 RTPExtensionType Next(RTPExtensionType type) const; |
110 | 110 |
111 private: | 111 private: |
112 int32_t Register(const RTPExtensionType type, const uint8_t id, bool active); | 112 int32_t Register(const RTPExtensionType type, const uint8_t id, bool active); |
113 std::map<uint8_t, HeaderExtension*> extensionMap_; | 113 std::map<uint8_t, HeaderExtension*> extensionMap_; |
114 }; | 114 }; |
115 } // namespace webrtc | 115 } // namespace webrtc |
116 | 116 |
117 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ | 117 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ |
118 | 118 |
OLD | NEW |