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

Side by Side Diff: webrtc/call/call.cc

Issue 3012273002: Ignore this CL - here as a baseline only (originally Bjorn's CL)
Patch Set: Created 3 years, 3 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
« no previous file with comments | « no previous file | webrtc/logging/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 } 1296 }
1297 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) { 1297 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) {
1298 ReadLockScoped read_lock(*send_crit_); 1298 ReadLockScoped read_lock(*send_crit_);
1299 for (auto& kv : audio_send_ssrcs_) { 1299 for (auto& kv : audio_send_ssrcs_) {
1300 if (kv.second->DeliverRtcp(packet, length)) 1300 if (kv.second->DeliverRtcp(packet, length))
1301 rtcp_delivered = true; 1301 rtcp_delivered = true;
1302 } 1302 }
1303 } 1303 }
1304 1304
1305 if (rtcp_delivered) 1305 if (rtcp_delivered)
1306 event_log_->LogRtcpPacket(kIncomingPacket, packet, length); 1306 event_log_->LogIncomingRtcpPacket(rtc::MakeArrayView(packet, length));
1307 1307
1308 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR; 1308 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR;
1309 } 1309 }
1310 1310
1311 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, 1311 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
1312 const uint8_t* packet, 1312 const uint8_t* packet,
1313 size_t length, 1313 size_t length,
1314 const PacketTime& packet_time) { 1314 const PacketTime& packet_time) {
1315 TRACE_EVENT0("webrtc", "Call::DeliverRtp"); 1315 TRACE_EVENT0("webrtc", "Call::DeliverRtp");
1316 1316
(...skipping 28 matching lines...) Expand all
1345 return DELIVERY_UNKNOWN_SSRC; 1345 return DELIVERY_UNKNOWN_SSRC;
1346 } 1346 }
1347 parsed_packet->IdentifyExtensions(it->second.extensions); 1347 parsed_packet->IdentifyExtensions(it->second.extensions);
1348 1348
1349 NotifyBweOfReceivedPacket(*parsed_packet, media_type); 1349 NotifyBweOfReceivedPacket(*parsed_packet, media_type);
1350 1350
1351 if (media_type == MediaType::AUDIO) { 1351 if (media_type == MediaType::AUDIO) {
1352 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) { 1352 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) {
1353 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1353 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1354 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length)); 1354 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length));
1355 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1355 event_log_->LogIncomingRtpHeader(*parsed_packet);
1356 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); 1356 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms();
1357 if (!first_received_rtp_audio_ms_) { 1357 if (!first_received_rtp_audio_ms_) {
1358 first_received_rtp_audio_ms_.emplace(arrival_time_ms); 1358 first_received_rtp_audio_ms_.emplace(arrival_time_ms);
1359 } 1359 }
1360 last_received_rtp_audio_ms_.emplace(arrival_time_ms); 1360 last_received_rtp_audio_ms_.emplace(arrival_time_ms);
1361 return DELIVERY_OK; 1361 return DELIVERY_OK;
1362 } 1362 }
1363 } else if (media_type == MediaType::VIDEO) { 1363 } else if (media_type == MediaType::VIDEO) {
1364 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) { 1364 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) {
1365 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1365 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1366 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); 1366 received_video_bytes_per_second_counter_.Add(static_cast<int>(length));
1367 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1367 event_log_->LogIncomingRtpHeader(*parsed_packet);
1368 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); 1368 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms();
1369 if (!first_received_rtp_video_ms_) { 1369 if (!first_received_rtp_video_ms_) {
1370 first_received_rtp_video_ms_.emplace(arrival_time_ms); 1370 first_received_rtp_video_ms_.emplace(arrival_time_ms);
1371 } 1371 }
1372 last_received_rtp_video_ms_.emplace(arrival_time_ms); 1372 last_received_rtp_video_ms_.emplace(arrival_time_ms);
1373 return DELIVERY_OK; 1373 return DELIVERY_OK;
1374 } 1374 }
1375 } 1375 }
1376 return DELIVERY_UNKNOWN_SSRC; 1376 return DELIVERY_UNKNOWN_SSRC;
1377 } 1377 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1439 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1440 receive_side_cc_.OnReceivedPacket( 1440 receive_side_cc_.OnReceivedPacket(
1441 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1441 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1442 header); 1442 header);
1443 } 1443 }
1444 } 1444 }
1445 1445
1446 } // namespace internal 1446 } // namespace internal
1447 1447
1448 } // namespace webrtc 1448 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/logging/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698