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

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

Issue 1394573004: Fix RTPPayloadRegistry to correctly restore RTX, if a valid mapping exists. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: CR comments and git cl format Created 5 years, 2 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
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 vie_channel_->SetSSRC(config_.rtp.local_ssrc, kViEStreamTypeNormal, 0); 160 vie_channel_->SetSSRC(config_.rtp.local_ssrc, kViEStreamTypeNormal, 0);
161 // TODO(pbos): Support multiple RTX, per video payload. 161 // TODO(pbos): Support multiple RTX, per video payload.
162 Config::Rtp::RtxMap::const_iterator it = config_.rtp.rtx.begin(); 162 Config::Rtp::RtxMap::const_iterator it = config_.rtp.rtx.begin();
163 for (; it != config_.rtp.rtx.end(); ++it) { 163 for (; it != config_.rtp.rtx.end(); ++it) {
164 RTC_DCHECK(it->second.ssrc != 0); 164 RTC_DCHECK(it->second.ssrc != 0);
165 RTC_DCHECK(it->second.payload_type != 0); 165 RTC_DCHECK(it->second.payload_type != 0);
166 166
167 vie_channel_->SetRemoteSSRCType(kViEStreamTypeRtx, it->second.ssrc); 167 vie_channel_->SetRemoteSSRCType(kViEStreamTypeRtx, it->second.ssrc);
168 vie_channel_->SetRtxReceivePayloadType(it->second.payload_type, it->first); 168 vie_channel_->SetRtxReceivePayloadType(it->second.payload_type, it->first);
169 } 169 }
170 // TODO(holmer): When Chrome no longer depends on this being false by default,
171 // always use the mapping and remove this whole codepath.
172 vie_channel_->SetUseRtxPayloadMappingOnRestore(
173 config_.rtp.use_rtx_payload_mapping_on_restore);
170 174
171 // TODO(pbos): Remove channel_group_ usage from VideoReceiveStream. This 175 // TODO(pbos): Remove channel_group_ usage from VideoReceiveStream. This
172 // should be configured in call.cc. 176 // should be configured in call.cc.
173 channel_group_->SetChannelRembStatus(false, config_.rtp.remb, vie_channel_); 177 channel_group_->SetChannelRembStatus(false, config_.rtp.remb, vie_channel_);
174 178
175 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) { 179 for (size_t i = 0; i < config_.rtp.extensions.size(); ++i) {
176 const std::string& extension = config_.rtp.extensions[i].name; 180 const std::string& extension = config_.rtp.extensions[i].name;
177 int id = config_.rtp.extensions[i].id; 181 int id = config_.rtp.extensions[i].id;
178 // One-byte-extension local identifiers are in the range 1-14 inclusive. 182 // One-byte-extension local identifiers are in the range 1-14 inclusive.
179 RTC_DCHECK_GE(id, 1); 183 RTC_DCHECK_GE(id, 1);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return 0; 330 return 0;
327 } 331 }
328 332
329 void VideoReceiveStream::SignalNetworkState(NetworkState state) { 333 void VideoReceiveStream::SignalNetworkState(NetworkState state) {
330 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode 334 vie_channel_->SetRTCPMode(state == kNetworkUp ? config_.rtp.rtcp_mode
331 : RtcpMode::kOff); 335 : RtcpMode::kOff);
332 } 336 }
333 337
334 } // namespace internal 338 } // namespace internal
335 } // namespace webrtc 339 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698