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

Side by Side Diff: media/capture/content/thread_safe_capture_oracle.cc

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#7 Created 3 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/capture/content/thread_safe_capture_oracle.h" 5 #include "media/capture/content/thread_safe_capture_oracle.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 void ThreadSafeCaptureOracle::ReportError( 193 void ThreadSafeCaptureOracle::ReportError(
194 const tracked_objects::Location& from_here, 194 const tracked_objects::Location& from_here,
195 const std::string& reason) { 195 const std::string& reason) {
196 base::AutoLock guard(lock_); 196 base::AutoLock guard(lock_);
197 if (client_) 197 if (client_)
198 client_->OnError(from_here, reason); 198 client_->OnError(from_here, reason);
199 } 199 }
200 200
201 void ThreadSafeCaptureOracle::ReportStarted() {
202 base::AutoLock guard(lock_);
203 if (client_)
204 client_->OnStarted();
205 }
206
201 void ThreadSafeCaptureOracle::DidCaptureFrame( 207 void ThreadSafeCaptureOracle::DidCaptureFrame(
202 int frame_number, 208 int frame_number,
203 VideoCaptureDevice::Client::Buffer buffer, 209 VideoCaptureDevice::Client::Buffer buffer,
204 base::TimeTicks capture_begin_time, 210 base::TimeTicks capture_begin_time,
205 base::TimeDelta estimated_frame_duration, 211 base::TimeDelta estimated_frame_duration,
206 scoped_refptr<VideoFrame> frame, 212 scoped_refptr<VideoFrame> frame,
207 base::TimeTicks reference_time, 213 base::TimeTicks reference_time,
208 bool success) { 214 bool success) {
209 TRACE_EVENT_ASYNC_END2("gpu.capture", "Capture", buffer.id(), "success", 215 TRACE_EVENT_ASYNC_END2("gpu.capture", "Capture", buffer.id(), "success",
210 success, "timestamp", 216 success, "timestamp",
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 248 }
243 249
244 void ThreadSafeCaptureOracle::OnConsumerReportingUtilization( 250 void ThreadSafeCaptureOracle::OnConsumerReportingUtilization(
245 int frame_number, 251 int frame_number,
246 double utilization) { 252 double utilization) {
247 base::AutoLock guard(lock_); 253 base::AutoLock guard(lock_);
248 oracle_.RecordConsumerFeedback(frame_number, utilization); 254 oracle_.RecordConsumerFeedback(frame_number, utilization);
249 } 255 }
250 256
251 } // namespace media 257 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698