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

Unified Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h

Issue 2867713003: Remove hardcoded kValueSizeBytes values from variable-length header extensions. (Closed)
Patch Set: Patch 1 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
index 11bc9433a45709dd73255d0d0f3c64766488a613..a1227c835e10dedc533f4764913f67c1ac540c87 100644
--- a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
+++ b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h
@@ -128,6 +128,16 @@ enum RtxMode {
const size_t kRtxHeaderSize = 2;
+struct RtpExtensionSize {
+ RTPExtensionType type;
+ uint8_t value_size;
+};
+
+template <typename Extension>
+constexpr RtpExtensionSize CreateExtensionSize() {
+ return {Extension::kId, Extension::kValueSizeBytes};
+}
+
struct RTCPSenderInfo {
uint32_t NTPseconds;
uint32_t NTPfraction;

Powered by Google App Engine
This is Rietveld 408576698