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

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

Issue 2999253002: Uncomment commented-out sequence-checks in call.cc (Closed)
Patch Set: Rebase 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 | no next file » | 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 received_bytes_per_second_counter_.GetStats(); 583 received_bytes_per_second_counter_.GetStats();
584 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { 584 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
585 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", 585 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps",
586 recv_bytes_per_sec.average * 8 / 1000); 586 recv_bytes_per_sec.average * 8 / 1000);
587 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBps, " 587 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBps, "
588 << recv_bytes_per_sec.ToStringWithMultiplier(8); 588 << recv_bytes_per_sec.ToStringWithMultiplier(8);
589 } 589 }
590 } 590 }
591 591
592 PacketReceiver* Call::Receiver() { 592 PacketReceiver* Call::Receiver() {
593 // TODO(solenberg): Some test cases in EndToEndTest use this from a different 593 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
594 // thread. Re-enable once that is fixed.
595 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
596 return this; 594 return this;
597 } 595 }
598 596
599 webrtc::AudioSendStream* Call::CreateAudioSendStream( 597 webrtc::AudioSendStream* Call::CreateAudioSendStream(
600 const webrtc::AudioSendStream::Config& config) { 598 const webrtc::AudioSendStream::Config& config) {
601 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream"); 599 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream");
602 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_); 600 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
603 event_log_->LogAudioSendStreamConfig(CreateRtcLogStreamConfig(config)); 601 event_log_->LogAudioSendStreamConfig(CreateRtcLogStreamConfig(config));
604 602
605 rtc::Optional<RtpState> suspended_rtp_state; 603 rtc::Optional<RtpState> suspended_rtp_state;
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1363 }
1366 } 1364 }
1367 return DELIVERY_UNKNOWN_SSRC; 1365 return DELIVERY_UNKNOWN_SSRC;
1368 } 1366 }
1369 1367
1370 PacketReceiver::DeliveryStatus Call::DeliverPacket( 1368 PacketReceiver::DeliveryStatus Call::DeliverPacket(
1371 MediaType media_type, 1369 MediaType media_type,
1372 const uint8_t* packet, 1370 const uint8_t* packet,
1373 size_t length, 1371 size_t length,
1374 const PacketTime& packet_time) { 1372 const PacketTime& packet_time) {
1375 // TODO(solenberg): Tests call this function on a network thread, libjingle 1373 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
1376 // calls on the worker thread. We should move towards always using a network
1377 // thread. Then this check can be enabled.
1378 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
1379 if (RtpHeaderParser::IsRtcp(packet, length)) 1374 if (RtpHeaderParser::IsRtcp(packet, length))
1380 return DeliverRtcp(media_type, packet, length); 1375 return DeliverRtcp(media_type, packet, length);
1381 1376
1382 return DeliverRtp(media_type, packet, length, packet_time); 1377 return DeliverRtp(media_type, packet, length, packet_time);
1383 } 1378 }
1384 1379
1385 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) { 1380 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) {
1386 rtc::Optional<RtpPacketReceived> parsed_packet = 1381 rtc::Optional<RtpPacketReceived> parsed_packet =
1387 ParseRtpPacket(packet, length, nullptr); 1382 ParseRtpPacket(packet, length, nullptr);
1388 if (!parsed_packet) 1383 if (!parsed_packet)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1428 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1434 receive_side_cc_.OnReceivedPacket( 1429 receive_side_cc_.OnReceivedPacket(
1435 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1430 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1436 header); 1431 header);
1437 } 1432 }
1438 } 1433 }
1439 1434
1440 } // namespace internal 1435 } // namespace internal
1441 1436
1442 } // namespace webrtc 1437 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698