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

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

Issue 2469093003: Remove RED/RTX workaround from sender/receiver and VideoEngine2. (Closed)
Patch Set: Remove RED/RTX workaround from sender/receiver and VideoEngine2. Created 4 years, 1 month 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // TODO(pbos): Support multiple RTX, per video payload. 145 // TODO(pbos): Support multiple RTX, per video payload.
146 for (const auto& kv : config_.rtp.rtx) { 146 for (const auto& kv : config_.rtp.rtx) {
147 RTC_DCHECK(kv.second.ssrc != 0); 147 RTC_DCHECK(kv.second.ssrc != 0);
148 RTC_DCHECK(kv.second.payload_type != 0); 148 RTC_DCHECK(kv.second.payload_type != 0);
149 149
150 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc); 150 rtp_payload_registry_.SetRtxSsrc(kv.second.ssrc);
151 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type, 151 rtp_payload_registry_.SetRtxPayloadType(kv.second.payload_type,
152 kv.first); 152 kv.first);
153 } 153 }
154 154
155 // If set to true, the RTX payload type mapping supplied in
156 // |SetRtxPayloadType| will be used when restoring RTX packets. Without it,
157 // RTX packets will always be restored to the last non-RTX packet payload type
158 // received.
159 // TODO(holmer): When Chrome no longer depends on this being false by default,
160 // always use the mapping and remove this whole codepath.
161 rtp_payload_registry_.set_use_rtx_payload_mapping_on_restore(
162 config_.rtp.use_rtx_payload_mapping_on_restore);
163
164 if (IsFecEnabled()) { 155 if (IsFecEnabled()) {
165 VideoCodec ulpfec_codec = {}; 156 VideoCodec ulpfec_codec = {};
166 ulpfec_codec.codecType = kVideoCodecULPFEC; 157 ulpfec_codec.codecType = kVideoCodecULPFEC;
167 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName)); 158 strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName));
168 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type; 159 ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type;
169 RTC_CHECK(SetReceiveCodec(ulpfec_codec)); 160 RTC_CHECK(SetReceiveCodec(ulpfec_codec));
170 161
171 VideoCodec red_codec = {}; 162 VideoCodec red_codec = {};
172 red_codec.codecType = kVideoCodecRED; 163 red_codec.codecType = kVideoCodecRED;
173 strncpy(red_codec.plName, "red", sizeof(red_codec.plName)); 164 strncpy(red_codec.plName, "red", sizeof(red_codec.plName));
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 const std::string& extension, int id) { 529 const std::string& extension, int id) {
539 // One-byte-extension local identifiers are in the range 1-14 inclusive. 530 // One-byte-extension local identifiers are in the range 1-14 inclusive.
540 RTC_DCHECK_GE(id, 1); 531 RTC_DCHECK_GE(id, 1);
541 RTC_DCHECK_LE(id, 14); 532 RTC_DCHECK_LE(id, 14);
542 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension)); 533 RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
543 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( 534 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension(
544 StringToRtpExtensionType(extension), id)); 535 StringToRtpExtensionType(extension), id));
545 } 536 }
546 537
547 } // namespace webrtc 538 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698