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

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

Issue 2997973002: Split LogRtpHeader and LogRtcpPacket into separate versions for incoming and outgoing packets.
Patch Set: Use RTC_DEPRECATED Created 3 years, 4 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
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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 } 1282 }
1283 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) { 1283 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) {
1284 ReadLockScoped read_lock(*send_crit_); 1284 ReadLockScoped read_lock(*send_crit_);
1285 for (auto& kv : audio_send_ssrcs_) { 1285 for (auto& kv : audio_send_ssrcs_) {
1286 if (kv.second->DeliverRtcp(packet, length)) 1286 if (kv.second->DeliverRtcp(packet, length))
1287 rtcp_delivered = true; 1287 rtcp_delivered = true;
1288 } 1288 }
1289 } 1289 }
1290 1290
1291 if (rtcp_delivered) 1291 if (rtcp_delivered)
1292 event_log_->LogRtcpPacket(kIncomingPacket, packet, length); 1292 event_log_->LogIncomingRtcpPacket(packet, length);
the sun 2017/08/22 11:44:31 Can you remove the PacketDirection enum?
terelius 2017/09/04 12:47:51 Not yet, since there apparently are downstream dep
1293 1293
1294 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR; 1294 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR;
1295 } 1295 }
1296 1296
1297 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, 1297 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
1298 const uint8_t* packet, 1298 const uint8_t* packet,
1299 size_t length, 1299 size_t length,
1300 const PacketTime& packet_time) { 1300 const PacketTime& packet_time) {
1301 TRACE_EVENT0("webrtc", "Call::DeliverRtp"); 1301 TRACE_EVENT0("webrtc", "Call::DeliverRtp");
1302 1302
(...skipping 28 matching lines...) Expand all
1331 return DELIVERY_UNKNOWN_SSRC; 1331 return DELIVERY_UNKNOWN_SSRC;
1332 } 1332 }
1333 parsed_packet->IdentifyExtensions(it->second.extensions); 1333 parsed_packet->IdentifyExtensions(it->second.extensions);
1334 1334
1335 NotifyBweOfReceivedPacket(*parsed_packet, media_type); 1335 NotifyBweOfReceivedPacket(*parsed_packet, media_type);
1336 1336
1337 if (media_type == MediaType::AUDIO) { 1337 if (media_type == MediaType::AUDIO) {
1338 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) { 1338 if (audio_receiver_controller_.OnRtpPacket(*parsed_packet)) {
1339 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1339 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1340 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length)); 1340 received_audio_bytes_per_second_counter_.Add(static_cast<int>(length));
1341 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1341 event_log_->LogIncomingRtpHeader(packet, length);
1342 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); 1342 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms();
1343 if (!first_received_rtp_audio_ms_) { 1343 if (!first_received_rtp_audio_ms_) {
1344 first_received_rtp_audio_ms_.emplace(arrival_time_ms); 1344 first_received_rtp_audio_ms_.emplace(arrival_time_ms);
1345 } 1345 }
1346 last_received_rtp_audio_ms_.emplace(arrival_time_ms); 1346 last_received_rtp_audio_ms_.emplace(arrival_time_ms);
1347 return DELIVERY_OK; 1347 return DELIVERY_OK;
1348 } 1348 }
1349 } else if (media_type == MediaType::VIDEO) { 1349 } else if (media_type == MediaType::VIDEO) {
1350 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) { 1350 if (video_receiver_controller_.OnRtpPacket(*parsed_packet)) {
1351 received_bytes_per_second_counter_.Add(static_cast<int>(length)); 1351 received_bytes_per_second_counter_.Add(static_cast<int>(length));
1352 received_video_bytes_per_second_counter_.Add(static_cast<int>(length)); 1352 received_video_bytes_per_second_counter_.Add(static_cast<int>(length));
1353 event_log_->LogRtpHeader(kIncomingPacket, packet, length); 1353 event_log_->LogIncomingRtpHeader(packet, length);
1354 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms(); 1354 const int64_t arrival_time_ms = parsed_packet->arrival_time_ms();
1355 if (!first_received_rtp_video_ms_) { 1355 if (!first_received_rtp_video_ms_) {
1356 first_received_rtp_video_ms_.emplace(arrival_time_ms); 1356 first_received_rtp_video_ms_.emplace(arrival_time_ms);
1357 } 1357 }
1358 last_received_rtp_video_ms_.emplace(arrival_time_ms); 1358 last_received_rtp_video_ms_.emplace(arrival_time_ms);
1359 return DELIVERY_OK; 1359 return DELIVERY_OK;
1360 } 1360 }
1361 } 1361 }
1362 return DELIVERY_UNKNOWN_SSRC; 1362 return DELIVERY_UNKNOWN_SSRC;
1363 } 1363 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1415 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1416 receive_side_cc_.OnReceivedPacket( 1416 receive_side_cc_.OnReceivedPacket(
1417 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1417 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1418 header); 1418 header);
1419 } 1419 }
1420 } 1420 }
1421 1421
1422 } // namespace internal 1422 } // namespace internal
1423 1423
1424 } // namespace webrtc 1424 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698