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

Side by Side Diff: content/browser/renderer_host/media/video_capture_oracle.cc

Issue 84293002: LOG(INFO) -> VLOG(0) in content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whitespace Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/video_capture_oracle.h" 5 #include "content/browser/renderer_host/media/video_capture_oracle.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 bool was_paused = overdue_sample_count_ == redundant_capture_goal_; 124 bool was_paused = overdue_sample_count_ == redundant_capture_goal_;
125 if (HasUnrecordedEvent()) { 125 if (HasUnrecordedEvent()) {
126 last_sample_ = current_event_; 126 last_sample_ = current_event_;
127 overdue_sample_count_ = 0; 127 overdue_sample_count_ = 0;
128 } else { 128 } else {
129 ++overdue_sample_count_; 129 ++overdue_sample_count_;
130 } 130 }
131 bool is_paused = overdue_sample_count_ == redundant_capture_goal_; 131 bool is_paused = overdue_sample_count_ == redundant_capture_goal_;
132 132
133 LOG_IF(INFO, !was_paused && is_paused) 133 VLOG_IF(0, !was_paused && is_paused)
134 << "Tab content unchanged for " << redundant_capture_goal_ 134 << "Tab content unchanged for " << redundant_capture_goal_
135 << " frames; capture will halt until content changes."; 135 << " frames; capture will halt until content changes.";
136 LOG_IF(INFO, was_paused && !is_paused) 136 VLOG_IF(0, was_paused && !is_paused)
137 << "Content changed; capture will resume."; 137 << "Content changed; capture will resume.";
138 } 138 }
139 139
140 bool SmoothEventSampler::IsOverdueForSamplingAt(base::Time event_time) const { 140 bool SmoothEventSampler::IsOverdueForSamplingAt(base::Time event_time) const {
141 DCHECK(!event_time.is_null()); 141 DCHECK(!event_time.is_null());
142 142
143 // If we don't get events on compositor updates on this platform, then we 143 // If we don't get events on compositor updates on this platform, then we
144 // don't reliably know whether we're dirty. 144 // don't reliably know whether we're dirty.
145 if (events_are_reliable_) { 145 if (events_are_reliable_) {
146 if (!HasUnrecordedEvent() && 146 if (!HasUnrecordedEvent() &&
147 overdue_sample_count_ >= redundant_capture_goal_) { 147 overdue_sample_count_ >= redundant_capture_goal_) {
148 return false; // Not dirty. 148 return false; // Not dirty.
149 } 149 }
150 } 150 }
151 151
152 // If we're dirty but not yet old, then we've recently gotten updates, so we 152 // If we're dirty but not yet old, then we've recently gotten updates, so we
153 // won't request a sample just yet. 153 // won't request a sample just yet.
154 base::TimeDelta dirty_interval = event_time - last_sample_; 154 base::TimeDelta dirty_interval = event_time - last_sample_;
155 if (dirty_interval < capture_period_ * 4) 155 if (dirty_interval < capture_period_ * 4)
156 return false; 156 return false;
157 else 157 else
158 return true; 158 return true;
159 } 159 }
160 160
161 bool SmoothEventSampler::HasUnrecordedEvent() const { 161 bool SmoothEventSampler::HasUnrecordedEvent() const {
162 return !current_event_.is_null() && current_event_ != last_sample_; 162 return !current_event_.is_null() && current_event_ != last_sample_;
163 } 163 }
164 164
165 } // namespace content 165 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_service_impl.cc ('k') | content/browser/renderer_host/p2p/socket_host_udp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698