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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_utility.cc

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: Remove static initialization from VideoContentType and remove memoization in AlrDetector Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
index 4b5ecfa6983d61cba3ebaf9adc74496858c7f4bf..ab963d369c97fe37e290a8972f96a4848277bd9c 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -244,7 +244,7 @@ bool RtpHeaderParser::Parse(RTPHeader* header,
// May not be present in packet.
header->extension.hasVideoContentType = false;
- header->extension.videoContentType = VideoContentType::UNSPECIFIED;
+ header->extension.videoContentType = VideoContentType::Unspecified();
header->extension.has_video_timing = false;
header->extension.video_timing = {0u, 0u, 0u, 0u, 0u, 0u, false};
@@ -452,11 +452,9 @@ void RtpHeaderParser::ParseOneByteExtensionHeader(
// | ID | len=0 | Content type |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- if (ptr[0] <
- static_cast<uint8_t>(VideoContentType::TOTAL_CONTENT_TYPES)) {
+ if (VideoContentType::IsValidContentType(ptr[0])) {
header->extension.hasVideoContentType = true;
- header->extension.videoContentType =
- static_cast<VideoContentType>(ptr[0]);
+ header->extension.videoContentType = ptr[0];
}
break;
}

Powered by Google App Engine
This is Rietveld 408576698