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

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

Issue 2999243002: Drop calls to Trace::CreateTrace and Trace::ReturnTrace from Call.
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "webrtc/rtc_base/optional.h" 45 #include "webrtc/rtc_base/optional.h"
46 #include "webrtc/rtc_base/ptr_util.h" 46 #include "webrtc/rtc_base/ptr_util.h"
47 #include "webrtc/rtc_base/task_queue.h" 47 #include "webrtc/rtc_base/task_queue.h"
48 #include "webrtc/rtc_base/thread_annotations.h" 48 #include "webrtc/rtc_base/thread_annotations.h"
49 #include "webrtc/rtc_base/thread_checker.h" 49 #include "webrtc/rtc_base/thread_checker.h"
50 #include "webrtc/rtc_base/trace_event.h" 50 #include "webrtc/rtc_base/trace_event.h"
51 #include "webrtc/system_wrappers/include/clock.h" 51 #include "webrtc/system_wrappers/include/clock.h"
52 #include "webrtc/system_wrappers/include/cpu_info.h" 52 #include "webrtc/system_wrappers/include/cpu_info.h"
53 #include "webrtc/system_wrappers/include/metrics.h" 53 #include "webrtc/system_wrappers/include/metrics.h"
54 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" 54 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
55 #include "webrtc/system_wrappers/include/trace.h"
56 #include "webrtc/video/call_stats.h" 55 #include "webrtc/video/call_stats.h"
57 #include "webrtc/video/send_delay_stats.h" 56 #include "webrtc/video/send_delay_stats.h"
58 #include "webrtc/video/stats_counter.h" 57 #include "webrtc/video/stats_counter.h"
59 #include "webrtc/video/video_receive_stream.h" 58 #include "webrtc/video/video_receive_stream.h"
60 #include "webrtc/video/video_send_stream.h" 59 #include "webrtc/video/video_send_stream.h"
61 60
62 namespace webrtc { 61 namespace webrtc {
63 62
64 namespace { 63 namespace {
65 64
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 worker_queue_("call_worker_queue"), 416 worker_queue_("call_worker_queue"),
418 base_bitrate_config_(config.bitrate_config) { 417 base_bitrate_config_(config.bitrate_config) {
419 RTC_DCHECK(config.event_log != nullptr); 418 RTC_DCHECK(config.event_log != nullptr);
420 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0); 419 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
421 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps, 420 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
422 config.bitrate_config.min_bitrate_bps); 421 config.bitrate_config.min_bitrate_bps);
423 if (config.bitrate_config.max_bitrate_bps != -1) { 422 if (config.bitrate_config.max_bitrate_bps != -1) {
424 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 423 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
425 config.bitrate_config.start_bitrate_bps); 424 config.bitrate_config.start_bitrate_bps);
426 } 425 }
427 Trace::CreateTrace();
428 transport_send->send_side_cc()->RegisterNetworkObserver(this); 426 transport_send->send_side_cc()->RegisterNetworkObserver(this);
429 transport_send_ = std::move(transport_send); 427 transport_send_ = std::move(transport_send);
430 transport_send_->send_side_cc()->SignalNetworkState(kNetworkDown); 428 transport_send_->send_side_cc()->SignalNetworkState(kNetworkDown);
431 transport_send_->send_side_cc()->SetBweBitrates( 429 transport_send_->send_side_cc()->SetBweBitrates(
432 config_.bitrate_config.min_bitrate_bps, 430 config_.bitrate_config.min_bitrate_bps,
433 config_.bitrate_config.start_bitrate_bps, 431 config_.bitrate_config.start_bitrate_bps,
434 config_.bitrate_config.max_bitrate_bps); 432 config_.bitrate_config.max_bitrate_bps);
435 call_stats_->RegisterStatsObserver(&receive_side_cc_); 433 call_stats_->RegisterStatsObserver(&receive_side_cc_);
436 call_stats_->RegisterStatsObserver(transport_send_->send_side_cc()); 434 call_stats_->RegisterStatsObserver(transport_send_->send_side_cc());
437 435
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 int64_t first_sent_packet_ms = 476 int64_t first_sent_packet_ms =
479 transport_send_->send_side_cc()->GetFirstPacketTimeMs(); 477 transport_send_->send_side_cc()->GetFirstPacketTimeMs();
480 // Only update histograms after process threads have been shut down, so that 478 // Only update histograms after process threads have been shut down, so that
481 // they won't try to concurrently update stats. 479 // they won't try to concurrently update stats.
482 { 480 {
483 rtc::CritScope lock(&bitrate_crit_); 481 rtc::CritScope lock(&bitrate_crit_);
484 UpdateSendHistograms(first_sent_packet_ms); 482 UpdateSendHistograms(first_sent_packet_ms);
485 } 483 }
486 UpdateReceiveHistograms(); 484 UpdateReceiveHistograms();
487 UpdateHistograms(); 485 UpdateHistograms();
488
489 Trace::ReturnTrace();
490 } 486 }
491 487
492 rtc::Optional<RtpPacketReceived> Call::ParseRtpPacket( 488 rtc::Optional<RtpPacketReceived> Call::ParseRtpPacket(
493 const uint8_t* packet, 489 const uint8_t* packet,
494 size_t length, 490 size_t length,
495 const PacketTime* packet_time) const { 491 const PacketTime* packet_time) const {
496 RtpPacketReceived parsed_packet; 492 RtpPacketReceived parsed_packet;
497 if (!parsed_packet.Parse(packet, length)) 493 if (!parsed_packet.Parse(packet, length))
498 return rtc::Optional<RtpPacketReceived>(); 494 return rtc::Optional<RtpPacketReceived>();
499 495
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1418 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1423 receive_side_cc_.OnReceivedPacket( 1419 receive_side_cc_.OnReceivedPacket(
1424 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1420 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1425 header); 1421 header);
1426 } 1422 }
1427 } 1423 }
1428 1424
1429 } // namespace internal 1425 } // namespace internal
1430 1426
1431 } // namespace webrtc 1427 } // 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