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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1292 } | 1292 } |
1293 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) { | 1293 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) { |
1294 ReadLockScoped read_lock(*send_crit_); | 1294 ReadLockScoped read_lock(*send_crit_); |
1295 for (auto& kv : audio_send_ssrcs_) { | 1295 for (auto& kv : audio_send_ssrcs_) { |
1296 if (kv.second->DeliverRtcp(packet, length)) | 1296 if (kv.second->DeliverRtcp(packet, length)) |
1297 rtcp_delivered = true; | 1297 rtcp_delivered = true; |
1298 } | 1298 } |
1299 } | 1299 } |
1300 | 1300 |
1301 if (rtcp_delivered) | 1301 if (rtcp_delivered) |
1302 event_log_->LogRtcpPacket(kIncomingPacket, packet, length); | 1302 event_log_->LogIncomingRtcpPacket( |
1303 rtc::ArrayView<const uint8_t>(packet, length)); | |
danilchap
2017/09/05 08:47:16
for this use case there is
rtc::MakeArrayView(pac
terelius
2017/09/07 12:53:55
Done.
| |
1303 | 1304 |
1304 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR; | 1305 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR; |
1305 } | 1306 } |
1306 | 1307 |
1307 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, | 1308 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, |
1308 const uint8_t* packet, | 1309 const uint8_t* packet, |
1309 size_t length, | 1310 size_t length, |
1310 const PacketTime& packet_time) { | 1311 const PacketTime& packet_time) { |
1311 TRACE_EVENT0("webrtc", "Call::DeliverRtp"); | 1312 TRACE_EVENT0("webrtc", "Call::DeliverRtp"); |
1312 | 1313 |
(...skipping 28 matching lines...) Expand all Loading... | |
1341 return DELIVERY_UNKNOWN_SSRC; | 1342 return DELIVERY_UNKNOWN_SSRC; |
1342 } | 1343 } |
1343 parsed_packet->IdentifyExtensions(it->second.extensions); | 1344 parsed_packet->IdentifyExtensions(it->second.extensions); |
1344 | 1345 |
1345 NotifyBweOfReceivedPacket(*parsed_packet, media_type); | 1346 NotifyBweOfReceivedPacket(*parsed_packet, media_type); |
1346 | 1347 |
1347 if (media_type == MediaType::AUDIO) { | 1348 if (media_type == MediaType::AUDIO) { |
1348 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) { | 1349 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) { |
1349 received_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1350 received_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1350 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1351 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1351 event_log_->LogRtpHeader(kIncomingPacket, packet, length); | 1352 event_log_->LogIncomingRtpHeader(*parsed_packet); |
1352 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); | 1353 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); |
1353 if (!first_received_rtp_audio_ms_) { | 1354 if (!first_received_rtp_audio_ms_) { |
1354 first_received_rtp_audio_ms_.emplace(arrival_time_ms); | 1355 first_received_rtp_audio_ms_.emplace(arrival_time_ms); |
1355 } | 1356 } |
1356 last_received_rtp_audio_ms_.emplace(arrival_time_ms); | 1357 last_received_rtp_audio_ms_.emplace(arrival_time_ms); |
1357 return DELIVERY_OK; | 1358 return DELIVERY_OK; |
1358 } | 1359 } |
1359 } else if (media_type == MediaType::VIDEO) { | 1360 } else if (media_type == MediaType::VIDEO) { |
1360 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) { | 1361 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) { |
1361 received_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1362 received_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1362 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); | 1363 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); |
1363 event_log_->LogRtpHeader(kIncomingPacket, packet, length); | 1364 event_log_->LogIncomingRtpHeader(*parsed_packet); |
1364 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); | 1365 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); |
1365 if (!first_received_rtp_video_ms_) { | 1366 if (!first_received_rtp_video_ms_) { |
1366 first_received_rtp_video_ms_.emplace(arrival_time_ms); | 1367 first_received_rtp_video_ms_.emplace(arrival_time_ms); |
1367 } | 1368 } |
1368 last_received_rtp_video_ms_.emplace(arrival_time_ms); | 1369 last_received_rtp_video_ms_.emplace(arrival_time_ms); |
1369 return DELIVERY_OK; | 1370 return DELIVERY_OK; |
1370 } | 1371 } |
1371 } | 1372 } |
1372 return DELIVERY_UNKNOWN_SSRC; | 1373 return DELIVERY_UNKNOWN_SSRC; |
1373 } | 1374 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1435 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1436 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1436 receive_side_cc_.OnReceivedPacket( | 1437 receive_side_cc_.OnReceivedPacket( |
1437 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1438 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1438 header); | 1439 header); |
1439 } | 1440 } |
1440 } | 1441 } |
1441 | 1442 |
1442 } // namespace internal | 1443 } // namespace internal |
1443 | 1444 |
1444 } // namespace webrtc | 1445 } // namespace webrtc |
OLD | NEW |