OLD | NEW |
---|---|
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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1204 if (status == DELIVERY_OK) | 1204 if (status == DELIVERY_OK) |
1205 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); | 1205 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); |
1206 return status; | 1206 return status; |
1207 } | 1207 } |
1208 } | 1208 } |
1209 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { | 1209 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { |
1210 auto it = video_receive_ssrcs_.find(ssrc); | 1210 auto it = video_receive_ssrcs_.find(ssrc); |
1211 if (it != video_receive_ssrcs_.end()) { | 1211 if (it != video_receive_ssrcs_.end()) { |
1212 received_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1212 received_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1213 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1213 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1214 // TODO(brandtr): Notify the BWE of received media packets here. | 1214 it->second->OnRtpPacket(*parsed_packet); |
1215 auto status = it->second->DeliverRtp(packet, length, packet_time) | 1215 // Deliver media packets to FlexFEC subsystem. |
1216 ? DELIVERY_OK | |
1217 : DELIVERY_PACKET_ERROR; | |
1218 // Deliver media packets to FlexFEC subsystem. RTP header extensions need | |
1219 // not be parsed, as FlexFEC is oblivious to the semantic meaning of the | |
1220 // packet contents beyond the 12 byte RTP base header. The BWE is fed | |
1221 // information about these media packets from the regular media pipeline. | |
1222 if (parsed_packet) { | 1216 if (parsed_packet) { |
stefan-webrtc
2017/02/10 13:22:34
Isn't this guaranteed to be true given 1190?
nisse-webrtc
2017/02/10 13:27:40
Good catch. Deleted this test and the one a few li
| |
1223 auto it_bounds = flexfec_receive_ssrcs_media_.equal_range(ssrc); | 1217 auto it_bounds = flexfec_receive_ssrcs_media_.equal_range(ssrc); |
1224 for (auto it = it_bounds.first; it != it_bounds.second; ++it) | 1218 for (auto it = it_bounds.first; it != it_bounds.second; ++it) |
1225 it->second->AddAndProcessReceivedPacket(*parsed_packet); | 1219 it->second->AddAndProcessReceivedPacket(*parsed_packet); |
1226 } | 1220 } |
1227 if (status == DELIVERY_OK) | 1221 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); |
brandtr
2017/02/10 12:50:55
Maybe check with terelius@ that this change is OK.
nisse-webrtc
2017/02/10 13:20:27
Discussed off-line.
| |
1228 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); | 1222 return DELIVERY_OK; |
1229 return status; | |
1230 } | 1223 } |
1231 } | 1224 } |
1232 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { | 1225 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { |
1233 auto it = flexfec_receive_ssrcs_protection_.find(ssrc); | 1226 auto it = flexfec_receive_ssrcs_protection_.find(ssrc); |
1234 if (it != flexfec_receive_ssrcs_protection_.end()) { | 1227 if (it != flexfec_receive_ssrcs_protection_.end()) { |
1235 if (parsed_packet) { | 1228 if (parsed_packet) { |
1236 auto status = it->second->AddAndProcessReceivedPacket(*parsed_packet) | 1229 auto status = it->second->AddAndProcessReceivedPacket(*parsed_packet) |
1237 ? DELIVERY_OK | 1230 ? DELIVERY_OK |
1238 : DELIVERY_PACKET_ERROR; | 1231 : DELIVERY_PACKET_ERROR; |
1239 if (status == DELIVERY_OK) | 1232 if (status == DELIVERY_OK) |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1297 if (media_type != MediaType::AUDIO || | 1290 if (media_type != MediaType::AUDIO || |
1298 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1291 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1299 congestion_controller_->OnReceivedPacket( | 1292 congestion_controller_->OnReceivedPacket( |
1300 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1293 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1301 header); | 1294 header); |
1302 } | 1295 } |
1303 } | 1296 } |
1304 | 1297 |
1305 } // namespace internal | 1298 } // namespace internal |
1306 } // namespace webrtc | 1299 } // namespace webrtc |
OLD | NEW |