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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 // TODO(danilchap): Create rtx packet with extra capacity for SRTP 1151 // TODO(danilchap): Create rtx packet with extra capacity for SRTP
1152 // when transport interface would be updated to take buffer class. 1152 // when transport interface would be updated to take buffer class.
1153 std::unique_ptr<RtpPacketToSend> rtx_packet(new RtpPacketToSend( 1153 std::unique_ptr<RtpPacketToSend> rtx_packet(new RtpPacketToSend(
1154 &rtp_header_extension_map_, packet.size() + kRtxHeaderSize)); 1154 &rtp_header_extension_map_, packet.size() + kRtxHeaderSize));
1155 // Add original RTP header. 1155 // Add original RTP header.
1156 rtx_packet->CopyHeaderFrom(packet); 1156 rtx_packet->CopyHeaderFrom(packet);
1157 { 1157 {
1158 rtc::CritScope lock(&send_critsect_); 1158 rtc::CritScope lock(&send_critsect_);
1159 if (!sending_media_) 1159 if (!sending_media_)
1160 return nullptr; 1160 return nullptr;
1161 // Replace payload type, if a specific type is set for RTX. 1161
1162 // Replace payload type.
1162 auto kv = rtx_payload_type_map_.find(packet.PayloadType()); 1163 auto kv = rtx_payload_type_map_.find(packet.PayloadType());
1163
1164 // Use rtx mapping associated with media codec if we can't find one,
1165 // assume it's red.
1166 // TODO(holmer): Remove once old Chrome versions don't rely on this.
1167 if (kv == rtx_payload_type_map_.end())
1168 kv = rtx_payload_type_map_.find(payload_type_);
1169 if (kv != rtx_payload_type_map_.end()) 1164 if (kv != rtx_payload_type_map_.end())
danilchap 2016/11/02 13:56:52 this look like hack 'If no payload type mapping ex
brandtr 2016/11/03 12:02:48 It should be safe to reject sending it, because al
1170 rtx_packet->SetPayloadType(kv->second); 1165 rtx_packet->SetPayloadType(kv->second);
1171 1166
1172 // Replace sequence number. 1167 // Replace sequence number.
1173 rtx_packet->SetSequenceNumber(sequence_number_rtx_++); 1168 rtx_packet->SetSequenceNumber(sequence_number_rtx_++);
1174 1169
1175 // Replace SSRC. 1170 // Replace SSRC.
1176 rtx_packet->SetSsrc(ssrc_rtx_); 1171 rtx_packet->SetSsrc(ssrc_rtx_);
1177 } 1172 }
1178 1173
1179 uint8_t* rtx_payload = 1174 uint8_t* rtx_payload =
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 rtc::CritScope lock(&send_critsect_); 1233 rtc::CritScope lock(&send_critsect_);
1239 1234
1240 RtpState state; 1235 RtpState state;
1241 state.sequence_number = sequence_number_rtx_; 1236 state.sequence_number = sequence_number_rtx_;
1242 state.start_timestamp = timestamp_offset_; 1237 state.start_timestamp = timestamp_offset_;
1243 1238
1244 return state; 1239 return state;
1245 } 1240 }
1246 1241
1247 } // namespace webrtc 1242 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698