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

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

Issue 2999253002: Uncomment commented-out sequence-checks in call.cc (Closed)
Patch Set: 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
« 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 received_bytes_per_second_counter_.GetStats(); 585 received_bytes_per_second_counter_.GetStats();
586 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) { 586 if (recv_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
587 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps", 587 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Call.BitrateReceivedInKbps",
588 recv_bytes_per_sec.average * 8 / 1000); 588 recv_bytes_per_sec.average * 8 / 1000);
589 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBps, " 589 LOG(LS_INFO) << "WebRTC.Call.BitrateReceivedInBps, "
590 << recv_bytes_per_sec.ToStringWithMultiplier(8); 590 << recv_bytes_per_sec.ToStringWithMultiplier(8);
591 } 591 }
592 } 592 }
593 593
594 PacketReceiver* Call::Receiver() { 594 PacketReceiver* Call::Receiver() {
595 // TODO(solenberg): Some test cases in EndToEndTest use this from a different 595 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
596 // thread. Re-enable once that is fixed.
597 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
598 return this; 596 return this;
599 } 597 }
600 598
601 webrtc::AudioSendStream* Call::CreateAudioSendStream( 599 webrtc::AudioSendStream* Call::CreateAudioSendStream(
602 const webrtc::AudioSendStream::Config& config) { 600 const webrtc::AudioSendStream::Config& config) {
603 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream"); 601 TRACE_EVENT0("webrtc", "Call::CreateAudioSendStream");
604 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_); 602 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
605 event_log_->LogAudioSendStreamConfig(CreateRtcLogStreamConfig(config)); 603 event_log_->LogAudioSendStreamConfig(CreateRtcLogStreamConfig(config));
606 604
607 rtc::Optional<RtpState> suspended_rtp_state; 605 rtc::Optional<RtpState> suspended_rtp_state;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be 897 // Remove all SSRCs pointing to the FlexfecReceiveStreamImpl to be
900 // destroyed. 898 // destroyed.
901 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config)) 899 receive_side_cc_.GetRemoteBitrateEstimator(UseSendSideBwe(config))
902 ->RemoveStream(ssrc); 900 ->RemoveStream(ssrc);
903 } 901 }
904 902
905 delete receive_stream; 903 delete receive_stream;
906 } 904 }
907 905
908 Call::Stats Call::GetStats() const { 906 Call::Stats Call::GetStats() const {
909 // TODO(solenberg): Some test cases in EndToEndTest use this from a different 907 // TODO(solenberg): Some test cases in EndToEndTest use this from a different
eladalon 2017/08/18 14:37:58 We can take care of this separately, as it require
910 // thread. Re-enable once that is fixed. 908 // thread. Re-enable once that is fixed.
911 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_); 909 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
912 Stats stats; 910 Stats stats;
913 // Fetch available send/receive bitrates. 911 // Fetch available send/receive bitrates.
914 uint32_t send_bandwidth = 0; 912 uint32_t send_bandwidth = 0;
915 transport_send_->send_side_cc()->GetBitrateController()->AvailableBandwidth( 913 transport_send_->send_side_cc()->GetBitrateController()->AvailableBandwidth(
916 &send_bandwidth); 914 &send_bandwidth);
917 std::vector<unsigned int> ssrcs; 915 std::vector<unsigned int> ssrcs;
918 uint32_t recv_bandwidth = 0; 916 uint32_t recv_bandwidth = 0;
919 receive_side_cc_.GetRemoteBitrateEstimator(false)->LatestEstimate( 917 receive_side_cc_.GetRemoteBitrateEstimator(false)->LatestEstimate(
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 } 1365 }
1368 } 1366 }
1369 return DELIVERY_UNKNOWN_SSRC; 1367 return DELIVERY_UNKNOWN_SSRC;
1370 } 1368 }
1371 1369
1372 PacketReceiver::DeliveryStatus Call::DeliverPacket( 1370 PacketReceiver::DeliveryStatus Call::DeliverPacket(
1373 MediaType media_type, 1371 MediaType media_type,
1374 const uint8_t* packet, 1372 const uint8_t* packet,
1375 size_t length, 1373 size_t length,
1376 const PacketTime& packet_time) { 1374 const PacketTime& packet_time) {
1377 // TODO(solenberg): Tests call this function on a network thread, libjingle 1375 RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
1378 // calls on the worker thread. We should move towards always using a network
1379 // thread. Then this check can be enabled.
1380 // RTC_DCHECK_CALLED_SEQUENTIALLY(&configuration_sequence_checker_);
1381 if (RtpHeaderParser::IsRtcp(packet, length)) 1376 if (RtpHeaderParser::IsRtcp(packet, length))
1382 return DeliverRtcp(media_type, packet, length); 1377 return DeliverRtcp(media_type, packet, length);
1383 1378
1384 return DeliverRtp(media_type, packet, length, packet_time); 1379 return DeliverRtp(media_type, packet, length, packet_time);
1385 } 1380 }
1386 1381
1387 // TODO(brandtr): Update this member function when we support protecting 1382 // TODO(brandtr): Update this member function when we support protecting
1388 // audio packets with FlexFEC. 1383 // audio packets with FlexFEC.
1389 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) { 1384 void Call::OnRecoveredPacket(const uint8_t* packet, size_t length) {
1390 ReadLockScoped read_lock(*receive_crit_); 1385 ReadLockScoped read_lock(*receive_crit_);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1417 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1423 receive_side_cc_.OnReceivedPacket( 1418 receive_side_cc_.OnReceivedPacket(
1424 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1419 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1425 header); 1420 header);
1426 } 1421 }
1427 } 1422 }
1428 1423
1429 } // namespace internal 1424 } // namespace internal
1430 1425
1431 } // namespace webrtc 1426 } // 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