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

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

Issue 2795723002: Simplify RTPSender::RegisterRtpHeaderExtension (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index 52b0891ea7390bcd7f8f04c3df56bd86b99a573f..6fdac6f63fb08507ec68781c4bff1e59b6ca693e 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -186,20 +186,7 @@ uint32_t RTPSender::NackOverheadRate() const {
int32_t RTPSender::RegisterRtpHeaderExtension(RTPExtensionType type,
uint8_t id) {
rtc::CritScope lock(&send_critsect_);
- switch (type) {
- case kRtpExtensionVideoRotation:
- case kRtpExtensionPlayoutDelay:
- case kRtpExtensionTransmissionTimeOffset:
- case kRtpExtensionAbsoluteSendTime:
- case kRtpExtensionAudioLevel:
- case kRtpExtensionTransportSequenceNumber:
- return rtp_header_extension_map_.Register(type, id);
- case kRtpExtensionNone:
- case kRtpExtensionNumberOfExtensions:
- LOG(LS_ERROR) << "Invalid RTP extension type for registration.";
- return -1;
- }
- return -1;
+ return rtp_header_extension_map_.RegisterByType(id, type) ? 0 : -1;
}
bool RTPSender::IsRtpHeaderExtensionRegistered(RTPExtensionType type) const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698