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

Unified Diff: webrtc/video/video_send_stream.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/video/video_receive_stream.cc ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 93ff1f1f951dabea1efe8968f5f6fd5c180c2ecd..66a6a321a14c652c48ce8e1715243509c81bbca2 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -22,6 +22,7 @@
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/congestion_controller/include/congestion_controller.h"
#include "webrtc/modules/pacing/packet_router.h"
+#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
#include "webrtc/modules/utility/include/process_thread.h"
#include "webrtc/video/call_stats.h"
#include "webrtc/video/video_capture_input.h"
@@ -228,16 +229,10 @@ VideoSendStream::VideoSendStream(
// One-byte-extension local identifiers are in the range 1-14 inclusive.
RTC_DCHECK_GE(id, 1);
RTC_DCHECK_LE(id, 14);
- if (extension == RtpExtension::kTOffset) {
- RTC_CHECK_EQ(0, vie_channel_.EnableSendTimestampOffset(id));
- } else if (extension == RtpExtension::kAbsSendTime) {
- RTC_CHECK_EQ(0, vie_channel_.EnableSendAbsoluteSendTime(id));
- } else if (extension == RtpExtension::kVideoRotation) {
- RTC_CHECK_EQ(0, vie_channel_.EnableSendVideoRotation(id));
- } else if (extension == RtpExtension::kTransportSequenceNumber) {
- RTC_CHECK_EQ(0, vie_channel_.EnableSendTransportSequenceNumber(id));
- } else {
- RTC_NOTREACHED() << "Registering unsupported RTP extension.";
+ RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
+ for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
+ RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension(
+ StringToRtpExtensionType(extension), id));
}
}
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698