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

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

Issue 2224063004: Implement PlayoutDelay extension as a trait (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Feedback Created 4 years, 4 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, PlayoutDelay* playout_delay);
88 static bool Write(uint8_t* data, const PlayoutDelay& playout_delay);
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_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698