Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h

Issue 2867713003: Remove hardcoded kValueSizeBytes values from variable-length header extensions. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 enum RtxMode { 122 enum RtxMode {
123 kRtxOff = 0x0, 123 kRtxOff = 0x0,
124 kRtxRetransmitted = 0x1, // Only send retransmissions over RTX. 124 kRtxRetransmitted = 0x1, // Only send retransmissions over RTX.
125 kRtxRedundantPayloads = 0x2 // Preventively send redundant payloads 125 kRtxRedundantPayloads = 0x2 // Preventively send redundant payloads
126 // instead of padding. 126 // instead of padding.
127 }; 127 };
128 128
129 const size_t kRtxHeaderSize = 2; 129 const size_t kRtxHeaderSize = 2;
130 130
131 struct RTPExtensionSizeInfo {
danilchap 2017/05/08 16:25:06 may be RtpExtensionSize or RtpHeaderExtensionSize:
erikvarga1 2017/05/09 11:40:03 Done. I saw RTP in a few places so I thought that
danilchap 2017/05/09 12:33:48 May be hide this struct in less public header and
erikvarga1 2017/05/09 13:30:30 Done.
132 RTPExtensionType type;
133 uint8_t value_size;
134 };
135
136 template <typename Extension>
137 constexpr RTPExtensionSizeInfo CreateExtensionSizeInfo() {
danilchap 2017/05/08 16:25:06 planning to use this function outside of the rtp_r
erikvarga1 2017/05/09 11:40:03 I don't think so. This is used solely for the RTP
danilchap 2017/05/09 12:33:48 Then do not declare it here: it seems you use it i
erikvarga1 2017/05/09 13:30:30 Done.
138 return {Extension::kId, Extension::kValueSizeBytes};
139 }
140
131 struct RTCPSenderInfo { 141 struct RTCPSenderInfo {
132 uint32_t NTPseconds; 142 uint32_t NTPseconds;
133 uint32_t NTPfraction; 143 uint32_t NTPfraction;
134 uint32_t RTPtimeStamp; 144 uint32_t RTPtimeStamp;
135 uint32_t sendPacketCount; 145 uint32_t sendPacketCount;
136 uint32_t sendOctetCount; 146 uint32_t sendOctetCount;
137 }; 147 };
138 148
139 struct RTCPReportBlock { 149 struct RTCPReportBlock {
140 RTCPReportBlock() 150 RTCPReportBlock()
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 class TransportSequenceNumberAllocator { 455 class TransportSequenceNumberAllocator {
446 public: 456 public:
447 TransportSequenceNumberAllocator() {} 457 TransportSequenceNumberAllocator() {}
448 virtual ~TransportSequenceNumberAllocator() {} 458 virtual ~TransportSequenceNumberAllocator() {}
449 459
450 virtual uint16_t AllocateSequenceNumber() = 0; 460 virtual uint16_t AllocateSequenceNumber() = 0;
451 }; 461 };
452 462
453 } // namespace webrtc 463 } // namespace webrtc
454 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_ 464 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698