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

Side by Side Diff: webrtc/pc/mediamonitor.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing one more place where RTC_FROM_HERE wasn't used. Created 4 years, 6 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 2005 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2005 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 19 matching lines...) Expand all
30 MediaMonitor::~MediaMonitor() { 30 MediaMonitor::~MediaMonitor() {
31 monitoring_ = false; 31 monitoring_ = false;
32 monitor_thread_->Clear(this); 32 monitor_thread_->Clear(this);
33 worker_thread_->Clear(this); 33 worker_thread_->Clear(this);
34 } 34 }
35 35
36 void MediaMonitor::Start(uint32_t milliseconds) { 36 void MediaMonitor::Start(uint32_t milliseconds) {
37 rate_ = milliseconds; 37 rate_ = milliseconds;
38 if (rate_ < 100) 38 if (rate_ < 100)
39 rate_ = 100; 39 rate_ = 100;
40 worker_thread_->Post(this, MSG_MONITOR_START); 40 worker_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_START);
41 } 41 }
42 42
43 void MediaMonitor::Stop() { 43 void MediaMonitor::Stop() {
44 worker_thread_->Post(this, MSG_MONITOR_STOP); 44 worker_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_STOP);
45 rate_ = 0; 45 rate_ = 0;
46 } 46 }
47 47
48 void MediaMonitor::OnMessage(rtc::Message* message) { 48 void MediaMonitor::OnMessage(rtc::Message* message) {
49 rtc::CritScope cs(&crit_); 49 rtc::CritScope cs(&crit_);
50 50
51 switch (message->message_id) { 51 switch (message->message_id) {
52 case MSG_MONITOR_START: 52 case MSG_MONITOR_START:
53 ASSERT(rtc::Thread::Current() == worker_thread_); 53 ASSERT(rtc::Thread::Current() == worker_thread_);
54 if (!monitoring_) { 54 if (!monitoring_) {
(...skipping 22 matching lines...) Expand all
77 } 77 }
78 } 78 }
79 79
80 void MediaMonitor::PollMediaChannel() { 80 void MediaMonitor::PollMediaChannel() {
81 rtc::CritScope cs(&crit_); 81 rtc::CritScope cs(&crit_);
82 ASSERT(rtc::Thread::Current() == worker_thread_); 82 ASSERT(rtc::Thread::Current() == worker_thread_);
83 83
84 GetStats(); 84 GetStats();
85 85
86 // Signal the monitoring thread, start another poll timer 86 // Signal the monitoring thread, start another poll timer
87 monitor_thread_->Post(this, MSG_MONITOR_SIGNAL); 87 monitor_thread_->Post(RTC_FROM_HERE, this, MSG_MONITOR_SIGNAL);
88 worker_thread_->PostDelayed(rate_, this, MSG_MONITOR_POLL); 88 worker_thread_->PostDelayed(RTC_FROM_HERE, rate_, this, MSG_MONITOR_POLL);
89 } 89 }
90 90
91 } // namespace cricket 91 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/pc/channelmanager.cc ('k') | webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698