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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extension.h

Issue 2642783006: Move implmentation specific constants out of rtp_header_extension.h (Closed)
Patch Set: . Created 3 years, 11 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
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
13 13
14 #include <string> 14 #include <string>
15 15
16 #include "webrtc/base/array_view.h" 16 #include "webrtc/base/array_view.h"
17 #include "webrtc/base/basictypes.h" 17 #include "webrtc/base/basictypes.h"
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/config.h" 19 #include "webrtc/config.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 const uint16_t kRtpOneByteHeaderExtensionId = 0xBEDE;
25
26 const size_t kRtpOneByteHeaderLength = 4;
27 const size_t kTransmissionTimeOffsetLength = 4;
28 const size_t kAudioLevelLength = 2;
29 const size_t kAbsoluteSendTimeLength = 4;
30 const size_t kVideoRotationLength = 2;
31 const size_t kTransportSequenceNumberLength = 3;
32 const size_t kPlayoutDelayLength = 4;
33
34 // Playout delay in milliseconds. A playout delay limit (min or max)
35 // has 12 bits allocated. This allows a range of 0-4095 values which translates
36 // to a range of 0-40950 in milliseconds.
37 const int kPlayoutDelayGranularityMs = 10;
38 // Maximum playout delay value in milliseconds.
39 const int kPlayoutDelayMaxMs = 40950;
40
41 class RtpHeaderExtensionMap { 24 class RtpHeaderExtensionMap {
42 public: 25 public:
43 static constexpr RTPExtensionType kInvalidType = kRtpExtensionNone; 26 static constexpr RTPExtensionType kInvalidType = kRtpExtensionNone;
44 static constexpr uint8_t kInvalidId = 0; 27 static constexpr uint8_t kInvalidId = 0;
45 28
46 RtpHeaderExtensionMap(); 29 RtpHeaderExtensionMap();
47 explicit RtpHeaderExtensionMap(rtc::ArrayView<const RtpExtension> extensions); 30 explicit RtpHeaderExtensionMap(rtc::ArrayView<const RtpExtension> extensions);
48 31
49 template <typename Extension> 32 template <typename Extension>
50 bool Register(uint8_t id) { 33 bool Register(uint8_t id) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 71
89 size_t total_values_size_bytes_ = 0; 72 size_t total_values_size_bytes_ = 0;
90 RTPExtensionType types_[kMaxId + 1]; 73 RTPExtensionType types_[kMaxId + 1];
91 uint8_t ids_[kRtpExtensionNumberOfExtensions]; 74 uint8_t ids_[kRtpExtensionNumberOfExtensions];
92 }; 75 };
93 76
94 } // namespace webrtc 77 } // namespace webrtc
95 78
96 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_ 79 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSION_H_
97 80
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/playout_delay_oracle.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_header_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698