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

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

Issue 1740133002: Simplify registration of RTP-header extensions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: header Created 4 years, 10 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 | « webrtc/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 7f33bc2ee57c1dc2b44aeade3feaaaf87f8072a2..46e5bcf00e4adf3bc2e2b7209166a60ba9d2520b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -17,6 +17,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/common_types.h"
+#include "webrtc/config.h"
#include "webrtc/system_wrappers/include/trace.h"
#ifdef _WIN32
@@ -26,6 +27,21 @@
namespace webrtc {
+RTPExtensionType StringToRtpExtensionType(const std::string& extension) {
+ if (extension == RtpExtension::kTOffset)
+ return kRtpExtensionTransmissionTimeOffset;
+ if (extension == RtpExtension::kAudioLevel)
+ return kRtpExtensionAudioLevel;
+ if (extension == RtpExtension::kAbsSendTime)
+ return kRtpExtensionAbsoluteSendTime;
+ if (extension == RtpExtension::kVideoRotation)
+ return kRtpExtensionVideoRotation;
+ if (extension == RtpExtension::kTransportSequenceNumber)
+ return kRtpExtensionTransportSequenceNumber;
+ RTC_NOTREACHED() << "Looking up unsupported RTP extension.";
+ return kRtpExtensionNone;
+}
+
RtpRtcp::Configuration::Configuration()
: audio(false),
receiver_only(false),
« no previous file with comments | « webrtc/modules/rtp_rtcp/include/rtp_rtcp.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698