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 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 10 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 static constexpr RTPExtensionType kId = kRtpExtensionVideoRotation; | 64 static constexpr RTPExtensionType kId = kRtpExtensionVideoRotation; |
65 static constexpr uint8_t kValueSizeBytes = 1; | 65 static constexpr uint8_t kValueSizeBytes = 1; |
66 static const char* kName; | 66 static const char* kName; |
67 static bool IsSupportedFor(MediaType type); | 67 static bool IsSupportedFor(MediaType type); |
68 static bool Parse(const uint8_t* data, VideoRotation* value); | 68 static bool Parse(const uint8_t* data, VideoRotation* value); |
69 static bool Write(uint8_t* data, VideoRotation value); | 69 static bool Write(uint8_t* data, VideoRotation value); |
70 static bool Parse(const uint8_t* data, uint8_t* value); | 70 static bool Parse(const uint8_t* data, uint8_t* value); |
71 static bool Write(uint8_t* data, uint8_t value); | 71 static bool Write(uint8_t* data, uint8_t value); |
72 }; | 72 }; |
73 | 73 |
74 class PlayoutDelayLimits { | |
75 public: | |
76 static constexpr RTPExtensionType kId = kRtpExtensionPlayoutDelay; | |
77 static constexpr uint8_t kValueSizeBytes = 3; | |
78 static const char* kName; | |
79 static bool IsSupportedFor(MediaType type); | |
80 // Playout delay in milliseconds. A playout delay limit (min or max) | |
81 // has 12 bits allocated. This allows a range of 0-4095 values which | |
82 // translates to a range of 0-40950 in milliseconds. | |
83 static constexpr int kGranularityMs = 10; | |
84 // Maximum playout delay value in milliseconds. | |
85 static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. | |
86 | |
87 static bool Parse(const uint8_t* data, int* min_ms, int* max_ms); | |
Irfan
2016/08/16 17:22:14
Parse it into PlayoutDelay variable ?
danilchap
2016/08/17 07:42:38
Done.
| |
88 static bool Write(uint8_t* data, int min_ms, int max_ms); | |
Irfan
2016/08/16 17:22:13
Similarly, Write a PlayoutDelay variable ?
danilchap
2016/08/17 07:42:38
Done.
| |
89 }; | |
90 | |
74 } // namespace webrtc | 91 } // namespace webrtc |
75 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ | 92 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_ |
OLD | NEW |