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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1247293002: Add support for transport wide sequence numbers (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/video/video_send_stream.h" 11 #include "webrtc/video/video_send_stream.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <sstream> 14 #include <sstream>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
20 #include "webrtc/modules/pacing/include/packet_router.h"
20 #include "webrtc/system_wrappers/interface/logging.h" 21 #include "webrtc/system_wrappers/interface/logging.h"
21 #include "webrtc/system_wrappers/interface/trace_event.h" 22 #include "webrtc/system_wrappers/interface/trace_event.h"
22 #include "webrtc/video/video_capture_input.h" 23 #include "webrtc/video/video_capture_input.h"
23 #include "webrtc/video_engine/vie_channel.h" 24 #include "webrtc/video_engine/vie_channel.h"
24 #include "webrtc/video_engine/vie_channel_group.h" 25 #include "webrtc/video_engine/vie_channel_group.h"
25 #include "webrtc/video_engine/vie_defines.h" 26 #include "webrtc/video_engine/vie_defines.h"
26 #include "webrtc/video_engine/vie_encoder.h" 27 #include "webrtc/video_engine/vie_encoder.h"
27 #include "webrtc/video_send_stream.h" 28 #include "webrtc/video_send_stream.h"
28 29
29 namespace webrtc { 30 namespace webrtc {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 int id = config_.rtp.extensions[i].id; 131 int id = config_.rtp.extensions[i].id;
131 // One-byte-extension local identifiers are in the range 1-14 inclusive. 132 // One-byte-extension local identifiers are in the range 1-14 inclusive.
132 DCHECK_GE(id, 1); 133 DCHECK_GE(id, 1);
133 DCHECK_LE(id, 14); 134 DCHECK_LE(id, 14);
134 if (extension == RtpExtension::kTOffset) { 135 if (extension == RtpExtension::kTOffset) {
135 CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id)); 136 CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id));
136 } else if (extension == RtpExtension::kAbsSendTime) { 137 } else if (extension == RtpExtension::kAbsSendTime) {
137 CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id)); 138 CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id));
138 } else if (extension == RtpExtension::kVideoRotation) { 139 } else if (extension == RtpExtension::kVideoRotation) {
139 CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id)); 140 CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id));
141 } else if (extension == RtpExtension::kTransportSequenceNumber) {
142 CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id));
143 channel_group->GetPacketRouter()->EnableTransportWideFeedback();
140 } else { 144 } else {
141 RTC_NOTREACHED() << "Registering unsupported RTP extension."; 145 RTC_NOTREACHED() << "Registering unsupported RTP extension.";
142 } 146 }
143 } 147 }
144 148
145 // TODO(pbos): Consider configuring REMB in Call. 149 // TODO(pbos): Consider configuring REMB in Call.
146 channel_group_->SetChannelRembStatus(true, false, vie_channel_); 150 channel_group_->SetChannelRembStatus(true, false, vie_channel_);
147 151
148 // Enable NACK, FEC or both. 152 // Enable NACK, FEC or both.
149 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; 153 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0;
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 vie_channel_->IsSendingFecEnabled()); 504 vie_channel_->IsSendingFecEnabled());
501 505
502 // Restart the media flow 506 // Restart the media flow
503 vie_encoder_->Restart(); 507 vie_encoder_->Restart();
504 508
505 return true; 509 return true;
506 } 510 }
507 511
508 } // namespace internal 512 } // namespace internal
509 } // namespace webrtc 513 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698